samelevelTransfer-add.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>人事平调申请表</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script src="plug-in/layer/layer.js"></script>
  9. <script>
  10. function btn_ok(){
  11. $("#btnsub").click();
  12. }
  13. function callback(data){
  14. if(data.success){
  15. layer.alert(data.msg,{ icon: 0 , closeBtn: 0 } , function(index){
  16. window.location.href="samelevelTransferController.do?list";
  17. layer.close(index);
  18. });
  19. }
  20. else{
  21. layer.alert(data.msg);
  22. }
  23. }
  24. $(function(){
  25. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  26. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  27. var tem = getCurrentMonthLast().Format("yyyy-MM-dd");
  28. $("#outTime").val(tem);
  29. $("#inTime").val(getNextDayss(tem));
  30. layer.alert("一线员工调动时,要选择调入的部门(工程部、保洁部等)。否则无法排班!");
  31. });
  32. //取得当月的最后一天
  33. function getCurrentMonthLast(){
  34. var date=new Date();
  35. var currentMonth=date.getMonth();
  36. var nextMonth=++currentMonth;
  37. var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
  38. var oneDay=1000*60*60*24;
  39. return new Date(nextMonthFirstDay-oneDay);
  40. }
  41. //取得后一天日期
  42. function getNextDayss(d){
  43. d = new Date(d);
  44. d = +d + 1000*60*60*24;
  45. d = new Date(d);
  46. //return d;
  47. //格式化
  48. var temp1 = d.getMonth()+1;
  49. var temp2 = d.getDate();
  50. if(temp1 < 10){
  51. temp1 = "0"+temp1;
  52. }
  53. if(temp2 < 10){
  54. temp2 = "0"+temp2;
  55. }
  56. return d.getFullYear()+"-"+temp1+"-"+temp2;
  57. }
  58. //日期格式化
  59. Date.prototype.Format = function (fmt) { //author: meizz
  60. var o = {
  61. "M+": this.getMonth() + 1, //月份
  62. "d+": this.getDate(), //日
  63. "h+": this.getHours(), //小时
  64. "m+": this.getMinutes(), //分
  65. "s+": this.getSeconds(), //秒
  66. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  67. "S": this.getMilliseconds() //毫秒
  68. };
  69. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  70. for (var k in o)
  71. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  72. return fmt;
  73. }
  74. </script>
  75. <script type="text/javascript">
  76. function updateoldDutiesid(){
  77. var userid = $("#userid").val();
  78. if(userid != ''){
  79. $.ajax({
  80. url:"samelevelTransferController.do?updateoldDutiesid",
  81. data:{id:userid},
  82. dataType:"json",
  83. type:"POST",
  84. success:function(result){
  85. $(".danwei").text(result.attributes.departName);
  86. $(".zhiwei").text(result.attributes.dutiesName);
  87. $(".gangwei").text(result.attributes.postName);
  88. $("#belongUnitid").val(result.attributes.departid);
  89. $("#oldDutiesid").val(result.attributes.dutiesid);
  90. $("#oldPostid").val(result.attributes.postid);
  91. }
  92. });
  93. }
  94. }
  95. function openDepartmentSelect() {
  96. // $.dialog.setting.zIndex = getzIndex();
  97. // var orgIds = $("#inUnitid").val();
  98. // $.dialog({content: 'url:departController.do?departSelect&orgIds='+orgIds, zIndex: 2101, title: '入职单位', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  99. // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  100. // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  101. // ]}).zindex();
  102. var orgIds = $("#inUnitid").val();
  103. $.dialog({
  104. content: 'url:dialogDealController.do?projectDepartTableAllWithChild&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '400px', opacity: 0.4, button: [
  105. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  106. var iframe = this.iframe.contentWindow;
  107. if(iframe.getReason().length>0){
  108. var strData=eval(iframe.getReason());
  109. for(var key in strData[0]){
  110. if(key=="strPId"){
  111. $("#inUnitid").val(strData[0][key]);
  112. }else if(key=="strDepartName"){
  113. $("#duties").val(strData[0][key]);
  114. }
  115. }
  116. }
  117. }, focus: true},
  118. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){
  119. $('#duties').val('');
  120. $('#inUnitid').val('');
  121. }}
  122. ]}).zindex();
  123. }
  124. function callbackDepartmentSelect() {
  125. // var iframe = this.iframe.contentWindow;
  126. // var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  127. // // var nodes = treeObj.getSelectedNodes();
  128. // var nodes = treeObj.getCheckedNodes(true);
  129. // if(nodes.length>0){
  130. // var ids='',names='';
  131. // for(var i=0;i<nodes.length;i++){
  132. // var node = nodes[i];
  133. // ids += node.id+',';
  134. // names += node.name+',';
  135. // }
  136. // if(ids != ''){
  137. // $.ajax({
  138. // url:"modifyController.do?getorgid",
  139. // data:{orgid:ids},
  140. // dataType:"json",
  141. // type:"POST",
  142. // success:function(result){
  143. // $('#inUnitid').val(ids);
  144. // $('#duties').val(result.msg);
  145. // $('#duties').blur();
  146. // }
  147. // });
  148. // }
  149. // }
  150. }
  151. function callbackClean(){
  152. $('#duties').val('');
  153. $('#inUnitid').val('');
  154. }
  155. </script>
  156. <style type="text/css">
  157. .fixed-h{
  158. float:left;
  159. width:100%;
  160. min-height:630px;
  161. overflow:auto;
  162. background:#ffffff;
  163. }
  164. </style>
  165. </head>
  166. <body>
  167. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="samelevelTransferController.do?doAdd" tiptype="1" callback="callback">
  168. <input id="id" name="id" type="hidden" value="${samelevelTransferPage.id }"/>
  169. <div class="fixed-h">
  170. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  171. <tr>
  172. <td align="right" style="width: 15%;">
  173. <label class="Validform_label">
  174. <span color="red" class="requiredIcon">*</span>
  175. 调动方式:
  176. </label>
  177. </td>
  178. <td class="value" colspan="5">
  179. <label class="Validform_label">人事调动(平调)</label>
  180. </td>
  181. </tr>
  182. <tr>
  183. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  184. <td class="value" colspan="5">
  185. <input id="userid" name="userid" type="hidden" value=""/>
  186. <input name="realName" class="inputxt" value="" id="realName" readonly="readonly" datatype="*"/>
  187. <t:choose hiddenName="userid" hiddenid="id" left="50%" fun="updateoldDutiesid" width="670" height="450" url="correctionController.do?userWorkflow&type=samelevel_transfer" name="userList1" icon="icon-select" title="选择调动员工" textname="realName" isclear="true" isInit="true"></t:choose>
  188. <span class="Validform_checktip"></span>
  189. </td>
  190. </tr>
  191. <tr>
  192. <td align="right">
  193. <label class="Validform_label">
  194. 调出单位:
  195. </label>
  196. </td>
  197. <td class="value" style="width: 10%;">
  198. <label class="Validform_label danwei"></label>
  199. <input type="hidden" name="belongUnitid" id="belongUnitid"/>
  200. </td>
  201. <td align="right" style="width: 5%;">
  202. <label class="Validform_label">
  203. 原职级:
  204. </label>
  205. </td>
  206. <td class="value" style="width: 10%;">
  207. <label class="Validform_label zhiwei"></label>
  208. <input type="hidden" name="oldDutiesid" id="oldDutiesid"/>
  209. </td>
  210. <td align="right" style="width: 5%;">
  211. <label class="Validform_label">
  212. 原岗位:
  213. </label>
  214. </td>
  215. <td class="value" style="width: 55%;">
  216. <label class="Validform_label gangwei"></label>
  217. <input type="hidden" name="oldPostid" id="oldPostid"/>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td align="right">
  222. <label class="Validform_label">
  223. <span color="red" class="requiredIcon">*</span>
  224. 调入单位:
  225. </label>
  226. </td>
  227. <td class="value" colspan="5">
  228. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  229. <input id="duties" name="duties" type="text" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  230. <input id="inUnitid" name="inUnitid" type="hidden" />
  231. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  232. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  233. </td>
  234. </tr>
  235. <tr style="height:30px;">
  236. <td align="right">
  237. <label class="Validform_label">
  238. <span color="red" class="requiredIcon">*</span>
  239. 调出日期:
  240. </label>
  241. </td>
  242. <td class="value">
  243. <input id="outTime" name="outTime" type="text" style="width: 150px" datatype="*" nullmsg="调出日期不可为空!" readonly="readonly"/>
  244. <label class="Validform_label" style="display: none;">调出日期</label>
  245. </td>
  246. <td align="right">
  247. <label class="Validform_label">
  248. <span color="red" class="requiredIcon">*</span>
  249. 调入日期:
  250. </label>
  251. </td>
  252. <td class="value">
  253. <input id="inTime" name="inTime" type="text" style="width: 150px" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" ignore="checked" />
  254. <label class="Validform_label" style="display: none;">调入日期</label>
  255. </td>
  256. </tr>
  257. <tr>
  258. <td align="right">
  259. <label class="Validform_label">
  260. <span color="red" class="requiredIcon">*</span>
  261. 调动原因:
  262. </label>
  263. </td>
  264. <td class="value" colspan="5" >
  265. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="transferReason" maxlength="200" name="transferReason" datatype="*" nullmsg="调动原因不可为空!" placeholder="请输入调动原因(最多输入文字数200)"></textarea>
  266. <span class="Validform_checktip"></span>
  267. <label class="Validform_label" style="display: none;">调动原因</label>
  268. </td>
  269. </tr>
  270. <tr>
  271. <td height="100px" align="center" colspan="2">
  272. </td>
  273. </tr>
  274. <tr>
  275. <td height="50px" align="center" colspan="6">
  276. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  277. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  278. <a style="margin-left:0px" href="samelevelTransferController.do?list&transferType=1" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return">返回</a>
  279. </td>
  280. </tr>
  281. </table>
  282. </div>
  283. </t:formvalid>
  284. </body>
  285. <script src = "webpage/cn/com/lzt/sameleveltransfer/samelevelTransfer.js"></script>