snapRegularborrow-view1.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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, 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. </script>
  25. <script type="text/javascript">
  26. function updateoldDutiesid(){
  27. var userid = $("#userid").val();
  28. if(userid != ''){
  29. $.ajax({
  30. url:"samelevelTransferController.do?updateoldDutiesid",
  31. data:{id:userid},
  32. dataType:"json",
  33. type:"POST",
  34. success:function(result){
  35. $(".danwei").text(result.attributes.departName);
  36. $(".zhiwei").text(result.attributes.dutiesName);
  37. $(".gangwei").text(result.attributes.postName);
  38. $("#belongUnitid").val(result.attributes.departid);
  39. $("#oldDutiesid").val(result.attributes.dutiesid);
  40. $("#oldPostid").val(result.attributes.postid);
  41. }
  42. });
  43. }
  44. }
  45. function openDepartmentSelect() {
  46. //$.dialog.setting.zIndex = getzIndex();
  47. var orgIds = $("#inUnitid").val();
  48. $.dialog({content: 'url:samelevelTransferController.do?departSelect&orgIds='+orgIds, zIndex: getzIndex(), title: '入职单位', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  49. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  50. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  51. ]}).zindex();
  52. }
  53. function callbackDepartmentSelect() {
  54. var iframe = this.iframe.contentWindow;
  55. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  56. var nodes = treeObj.getSelectedNodes();
  57. if(nodes.length>0){
  58. var ids='',names='';
  59. for(var i=0;i<nodes.length;i++){
  60. var node = nodes[i];
  61. ids += node.id+',';
  62. names += node.name+',';
  63. }
  64. if(ids != ''){
  65. $.ajax({
  66. url:"modifyController.do?getorgid",
  67. data:{orgid:ids},
  68. dataType:"json",
  69. type:"POST",
  70. success:function(result){
  71. $('#inUnitid').val(ids);
  72. $('#duties').val(result.msg);
  73. $('#duties').blur();
  74. }
  75. });
  76. }
  77. }
  78. }
  79. function callbackClean(){
  80. $('#duties').val('');
  81. $('#inUnitid').val('');
  82. }
  83. $(function(){
  84. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  85. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  86. })
  87. </script>
  88. </head>
  89. <body>
  90. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="snapRegularborrowController.do?doUpdate" tiptype="1" callback="callback">
  91. <input id="id" name="id" type="hidden" value="${snapRegularborrowPage.id }"/>
  92. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  93. <tr>
  94. <td align="right" style="width: 15%;">
  95. <label class="Validform_label">
  96. <span color="red" class="requiredIcon">*</span>
  97. 调动方式:
  98. </label>
  99. </td>
  100. <td class="value" colspan="5">
  101. <label class="Validform_label">临时调动(定期)</label>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  106. <td class="value" colspan="5">
  107. <input id="userid" name="userid" type="hidden" value="${user.id}"/>
  108. <input name="realName" class="inputxt" value="${user.realName}" id="realName" readonly="readonly" datatype="*"/>
  109. <span class="Validform_checktip"></span>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td align="right">
  114. <label class="Validform_label">
  115. 调出单位:
  116. </label>
  117. </td>
  118. <td class="value" style="width: 22%;">
  119. <label class="Validform_label danwei">${map.departname}</label>
  120. <input type="hidden" name="belongUnitid" id="belongUnitid" value="${map.departid}"/>
  121. </td>
  122. <td align="right" style="width: 3%;">
  123. <label class="Validform_label">
  124. 原职级:
  125. </label>
  126. </td>
  127. <td class="value" style="width: 10%;">
  128. <label class="Validform_label zhiwei">${map.dutiesName}</label>
  129. <input type="hidden" name="oldDutiesid" id="oldDutiesid" value="${map.dutiesid}"/>
  130. </td>
  131. <td align="right" style="width: 5%;">
  132. <label class="Validform_label">
  133. 原岗位:
  134. </label>
  135. </td>
  136. <td class="value" style="width: 45%;">
  137. <label class="Validform_label gangwei">${map.postname}</label>
  138. <input type="hidden" name="oldPostid" id="oldPostid" value="${map.postid}"/>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td align="right">
  143. <label class="Validform_label">
  144. <span color="red" class="requiredIcon">*</span>
  145. 调入单位:
  146. </label>
  147. </td>
  148. <td class="value" colspan="5">
  149. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  150. <input id="duties" name="duties" type="text" value="${tname}" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  151. <input id="inUnitid" name="inUnitid" type="hidden" value="${tid}" />
  152. <c:if test="${not empty flage}">
  153. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  154. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  155. </c:if>
  156. </td>
  157. </tr>
  158. <tr style="height:30px;">
  159. <td align="right">
  160. <label class="Validform_label">
  161. <span color="red" class="requiredIcon">*</span>
  162. 调出日期:
  163. </label>
  164. </td>
  165. <td class="value">
  166. <c:if test="${not empty flage}">
  167. <input id="outTime" name="outTime" type="text" style="width: 150px" readonly="readonly" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'inTime\')}'})" value='<fmt:formatDate value="${snapRegularborrowPage.outTime}"/>'/>
  168. </c:if>
  169. <c:if test="${empty flage}">
  170. <input id="outTime" name="outTime" type="text" style="width: 150px" disabled="disabled" class="Wdate" value='<fmt:formatDate value="${snapRegularborrowPage.outTime}"/>'/>
  171. </c:if>
  172. <span class="Validform_checktip"></span>
  173. <label class="Validform_label" style="display: none;">调出日期</label>
  174. </td>
  175. <td align="right">
  176. <label class="Validform_label">
  177. <span color="red" class="requiredIcon">*</span>
  178. 调入日期:
  179. </label>
  180. </td>
  181. <td class="value">
  182. <input id="inTime" name="inTime" type="text" style="width: 150px" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${snapRegularborrowPage.inTime}"/>'/>
  183. <label class="Validform_label" style="display: none;">调入日期</label>
  184. </td>
  185. </tr>
  186. <tr>
  187. <td align="right">
  188. <label class="Validform_label">
  189. <span color="red" class="requiredIcon">*</span>
  190. 调动终止日:
  191. </label>
  192. </td>
  193. <td class="value">
  194. <input id="deadDate" name="deadDate" type="text" disabled="disabled" style="width: 150px" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'inTime\')}'})" datatype="*" nullmsg="调动终止日不可为空!" value='<fmt:formatDate value='${snapRegularborrowPage.deadDate}' type="date" pattern="yyyy-MM-dd"/>'/>
  195. <span class="Validform_checktip"></span>
  196. <label class="Validform_label" style="display: none;">调动终止日</label>
  197. </td>
  198. </tr>
  199. <tr>
  200. <td align="right">
  201. <label class="Validform_label">
  202. 固定周期:
  203. </label>
  204. </td>
  205. <td class="value" colspan="5">
  206. <c:if test="${empty flage}">
  207. <t:dictSelect field="fixedCycle" type="checkbox" typeGroupCode="cycle_type" readonly="readonly" datatype="*" defaultVal="${snapRegularborrowPage.fixedCycle}" hasLabel="false" title="固定周期"></t:dictSelect>
  208. </c:if>
  209. <c:if test="${not empty flage}">
  210. <t:dictSelect field="fixedCycle" type="checkbox" typeGroupCode="cycle_type" datatype="*" defaultVal="${snapRegularborrowPage.fixedCycle}" hasLabel="false" title="固定周期"></t:dictSelect>
  211. </c:if>
  212. <span class="Validform_checktip"></span>
  213. <label class="Validform_label" style="display: none;">固定周期</label>
  214. </td>
  215. </tr>
  216. <tr>
  217. <td align="right">
  218. <label class="Validform_label">
  219. <span color="red" class="requiredIcon">*</span>
  220. 调动原因:
  221. </label>
  222. </td>
  223. <td class="value" colspan="5" >
  224. <textarea style="width:600px;height: 80px;" class="inputxt" <c:if test="${empty flage}"> disabled="disabled" </c:if> rows="6" id="transferReason" maxlength="200" name="transferReason" datatype="*" nullmsg="调动原因不可为空!" placeholder="请输入调动原因(最多输入文字数200)">${snapRegularborrowPage.transferReason}</textarea>
  225. <span class="Validform_checktip"></span>
  226. <label class="Validform_label" style="display: none;">调动原因</label>
  227. </td>
  228. </tr>
  229. <tr>
  230. <td style="text-align:center;" colspan="6">
  231. <input id="eli" value="${flage}" type="hidden"/>
  232. <c:forEach items="${transitionList}" var="trans">
  233. <li style="list-style:none;"><button class="btn btn-default" style="width:80px; height:35px;border-radius:5px;background:#3275C6;border:0 none;margin-right:5px;color:white;" type="button" id="${trans.nextnode}"
  234. onclick="popWriteOption1('<t:mutiLang langKey="common.task.operate"/>',800,300,'${trans.Transition }','${taskId}',${nextCodeCount},'${trans.nextnode}','${trans.nextnodeName}')" >${trans.Transition }<tton>
  235. </c:forEach>
  236. </td>
  237. </tr>
  238. </table>
  239. </t:formvalid>
  240. </body>
  241. <script src = "webpage/cn/com/lzt/snapregularborrow/snapRegularborrow.js"></script>
  242. <script type="text/javascript">
  243. function callbackTable(msg){
  244. window.parent.callbackTable(msg);
  245. }
  246. function popWriteOption1(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId){
  247. if($("#eli").val() != ''){
  248. var unitid = $("#inUnitid").val();
  249. var transferReason = $("#transferReason").val();
  250. if(unitid != '' && transferReason != ''){
  251. $.ajax({
  252. cache: true,
  253. type: "POST",
  254. url:"snapRegularborrowController.do?doUpdate",
  255. data:$('#formobj').serialize(),// 你的formid
  256. dataType:"json",
  257. async: false,
  258. success: function(data) {
  259. dealProcFlowNoOption(title,taskId,nextNodeId,nextNodeCount,false);
  260. }
  261. });
  262. }else{
  263. if(unitid == ''){
  264. layer.alert('调动单位不可为空!');
  265. }
  266. if(transferReason == ''){
  267. layer.alert('调动原因不可为空!');
  268. }
  269. }
  270. }else{
  271. popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId);
  272. }
  273. }
  274. </script>