snapRegularborrow-update.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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&transferType=5";
  17. layer.close(index);
  18. });
  19. }
  20. else{
  21. layer.alert(data.msg);
  22. }
  23. }
  24. function oncang(){
  25. var tem = $("#outTime").val();
  26. $("#inTime").val(getNextDay(new Date(tem).Format("yyyy-MM-dd")));
  27. var intem = $("#inTime").val();
  28. var start=new Date(intem.replace("-", "/").replace("-", "/"));
  29. var deadDate = $("#deadDate").val();
  30. var end=new Date(deadDate.replace("-", "/").replace("-", "/"));
  31. if(start > end){
  32. layer.alert("<调动终止日>必须在<调入日期>之后");
  33. $("#deadDate").val(intem);
  34. }
  35. }
  36. //取得后一天日期
  37. function getNextDay(d){
  38. d = new Date(d);
  39. d = +d + 1000*60*60*24;
  40. d = new Date(d);
  41. //return d;
  42. //格式化
  43. var temp1 = d.getMonth()+1;
  44. var temp2 = d.getDate();
  45. if(temp1 < 10){
  46. temp1 = "0"+temp1;
  47. }
  48. if(temp2 < 10){
  49. temp2 = "0"+temp2;
  50. }
  51. return d.getFullYear()+"-"+temp1+"-"+temp2;
  52. }
  53. //日期格式化
  54. Date.prototype.Format = function (fmt) { //author: meizz
  55. var o = {
  56. "M+": this.getMonth() + 1, //月份
  57. "d+": this.getDate(), //日
  58. "h+": this.getHours(), //小时
  59. "m+": this.getMinutes(), //分
  60. "s+": this.getSeconds(), //秒
  61. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  62. "S": this.getMilliseconds() //毫秒
  63. };
  64. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  65. for (var k in o)
  66. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  67. return fmt;
  68. }
  69. </script>
  70. <script type="text/javascript">
  71. function updateoldDutiesid(){
  72. var userid = $("#userid").val();
  73. if(userid != ''){
  74. $.ajax({
  75. url:"samelevelTransferController.do?updateoldDutiesid",
  76. data:{id:userid},
  77. dataType:"json",
  78. type:"POST",
  79. success:function(result){
  80. $(".danwei").text(result.attributes.departName);
  81. $(".zhiwei").text(result.attributes.dutiesName);
  82. $(".gangwei").text(result.attributes.postName);
  83. $("#belongUnitid").val(result.attributes.departid);
  84. $("#oldDutiesid").val(result.attributes.dutiesid);
  85. $("#oldPostid").val(result.attributes.postid);
  86. }
  87. });
  88. }
  89. }
  90. function openDepartmentSelect() {
  91. // $.dialog.setting.zIndex = getzIndex();
  92. // var orgIds = $("#inUnitid").val();
  93. // $.dialog({content: 'url:departController.do?departSelect&orgIds='+orgIds, zIndex: 2101, title: '入职单位', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  94. // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  95. // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  96. // ]}).zindex();
  97. var orgIds = $("#inUnitid").val();
  98. $.dialog({
  99. content: 'url:dialogDealController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '400px', opacity: 0.4, button: [
  100. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  101. var iframe = this.iframe.contentWindow;
  102. if(iframe.getReason().length>0){
  103. var strData=eval(iframe.getReason());
  104. for(var key in strData[0]){
  105. if(key=="strPId"){
  106. $("#inUnitid").val(strData[0][key]);
  107. }else if(key=="strDepartName"){
  108. $("#duties").val(strData[0][key]);
  109. }
  110. }
  111. }
  112. }, focus: true},
  113. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){
  114. $('#duties').val('');
  115. $('#inUnitid').val('');
  116. }}
  117. ]}).zindex();
  118. }
  119. function callbackDepartmentSelect() {
  120. // var iframe = this.iframe.contentWindow;
  121. // var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  122. // var nodes = treeObj.getCheckedNodes(true);
  123. // if(nodes.length>0){
  124. // var ids='',names='';
  125. // for(var i=0;i<nodes.length;i++){
  126. // var node = nodes[i];
  127. // ids += node.id+',';
  128. // names += node.name+',';
  129. // }
  130. // if(ids != ''){
  131. // $.ajax({
  132. // url:"modifyController.do?getorgid",
  133. // data:{orgid:ids},
  134. // dataType:"json",
  135. // type:"POST",
  136. // success:function(result){
  137. // $('#inUnitid').val(ids);
  138. // $('#duties').val(result.msg);
  139. // $('#duties').blur();
  140. // }
  141. // });
  142. // }
  143. // }
  144. }
  145. function callbackClean(){
  146. $('#duties').val('');
  147. $('#inUnitid').val('');
  148. }
  149. $(function(){
  150. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  151. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  152. })
  153. </script>
  154. <style type="text/css">
  155. .fixed-h{
  156. float:left;
  157. width:100%;
  158. min-height:630px;
  159. overflow:auto;
  160. background:#ffffff;
  161. }
  162. </style>
  163. </head>
  164. <body>
  165. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="snapRegularborrowController.do?doUpdate" tiptype="1" callback="callback">
  166. <input id="id" name="id" type="hidden" value="${snapRegularborrowPage.id }"/>
  167. <div class="fixed-h">
  168. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  169. <tr>
  170. <td align="right" style="width: 15%;">
  171. <label class="Validform_label">
  172. <span color="red" class="requiredIcon">*</span>
  173. 调动方式:
  174. </label>
  175. </td>
  176. <td class="value" colspan="5">
  177. <label class="Validform_label">临时调动(定期)</label>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  182. <td class="value" colspan="5">
  183. <input id="userid" name="userid" type="hidden" value="${user.id}"/>
  184. <input name="realName" class="inputxt" value="${user.realName}" id="realName" readonly="readonly" datatype="*"/>
  185. <t:choose hiddenName="userid" hiddenid="id" fun="updateoldDutiesid" left="50%" 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>
  186. <span class="Validform_checktip"></span>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td align="right">
  191. <label class="Validform_label">
  192. 调出单位:
  193. </label>
  194. </td>
  195. <td class="value" style="width: 22%;">
  196. <label class="Validform_label danwei">${map.departname}</label>
  197. <input type="hidden" name="belongUnitid" id="belongUnitid" value="${map.departid}"/>
  198. </td>
  199. <td align="right" style="width: 3%;">
  200. <label class="Validform_label">
  201. 原职级:
  202. </label>
  203. </td>
  204. <td class="value" style="width: 10%;">
  205. <label class="Validform_label zhiwei">${map.dutiesName}</label>
  206. <input type="hidden" name="oldDutiesid" id="oldDutiesid" value="${map.dutiesid}"/>
  207. </td>
  208. <td align="right" style="width: 5%;">
  209. <label class="Validform_label">
  210. 原岗位:
  211. </label>
  212. </td>
  213. <td class="value" style="width: 45%;">
  214. <label class="Validform_label gangwei">${map.postname}</label>
  215. <input type="hidden" name="oldPostid" id="oldPostid" value="${map.postid}"/>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td align="right">
  220. <label class="Validform_label">
  221. <span color="red" class="requiredIcon">*</span>
  222. 调入单位:
  223. </label>
  224. </td>
  225. <td class="value" colspan="5">
  226. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  227. <input id="duties" name="duties" type="text" value="${tname}" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  228. <input id="inUnitid" name="inUnitid" type="hidden" value="${tid}" />
  229. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  230. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  231. </td>
  232. </tr>
  233. <tr style="height:30px;">
  234. <td align="right">
  235. <label class="Validform_label">
  236. <span color="red" class="requiredIcon">*</span>
  237. 调出日期:
  238. </label>
  239. </td>
  240. <td class="value">
  241. <input id="outTime" name="outTime" type="text" style="width: 150px" readonly="readonly" class="Wdate" onchange="oncang();" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" datatype="*" nullmsg="调出日期不可为空!" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${snapRegularborrowPage.outTime}"/>'/>
  242. <span class="Validform_checktip"></span>
  243. <label class="Validform_label" style="display: none;">调出日期</label>
  244. </td>
  245. <td align="right">
  246. <label class="Validform_label">
  247. <span color="red" class="requiredIcon">*</span>
  248. 调入日期:
  249. </label>
  250. </td>
  251. <td class="value">
  252. <input id="inTime" name="inTime" type="text" style="width: 150px" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${snapRegularborrowPage.inTime}"/>'/>
  253. <label class="Validform_label" style="display: none;">调入日期</label>
  254. </td>
  255. </tr>
  256. <tr>
  257. <td align="right">
  258. <label class="Validform_label">
  259. <span color="red" class="requiredIcon">*</span>
  260. 调动终止日:
  261. </label>
  262. </td>
  263. <td class="value">
  264. <input id="deadDate" name="deadDate" readonly="readonly" type="text" style="width: 150px" datatype="*" nullmsg="调动终止日不可为空!" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'inTime\')}'})" value='<fmt:formatDate value='${snapRegularborrowPage.deadDate}' type="date" pattern="yyyy-MM-dd"/>'/>
  265. <span class="Validform_checktip"></span>
  266. <label class="Validform_label" style="display: none;">调动终止日</label>
  267. </td>
  268. </tr>
  269. <tr>
  270. <td align="right">
  271. <label class="Validform_label">
  272. <span color="red" class="requiredIcon">*</span>
  273. 固定周期:
  274. </label>
  275. </td>
  276. <td class="value" colspan="5">
  277. <t:dictSelect field="fixedCycle" type="checkbox" typeGroupCode="cycle_type" datatype="*" defaultVal="${snapRegularborrowPage.fixedCycle}" hasLabel="false" title="固定周期"></t:dictSelect>
  278. <span class="Validform_checktip"></span>
  279. <label class="Validform_label" style="display: none;">固定周期</label>
  280. </td>
  281. </tr>
  282. <tr>
  283. <td align="right">
  284. <label class="Validform_label">
  285. <span color="red" class="requiredIcon">*</span>
  286. 调动原因:
  287. </label>
  288. </td>
  289. <td class="value" colspan="5" >
  290. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="transferReason" maxlength="200" name="transferReason" datatype="*" nullmsg="调动原因不可为空!" placeholder="请输入调动原因(最多输入文字数200)">${snapRegularborrowPage.transferReason}</textarea>
  291. <span class="Validform_checktip"></span>
  292. <label class="Validform_label" style="display: none;">调动原因</label>
  293. </td>
  294. </tr>
  295. <tr>
  296. <td height="100px" align="center" colspan="6">
  297. </td>
  298. </tr>
  299. <tr>
  300. <td height="50px" align="center" colspan="6">
  301. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  302. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  303. <a style="margin-left:0px" href="samelevelTransferController.do?list&transferType=5" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return">返回</a>
  304. </td>
  305. </tr>
  306. </table>
  307. </div>
  308. </t:formvalid>
  309. </body>
  310. <script src = "webpage/cn/com/lzt/snapregularborrow/snapRegularborrow.js"></script>