samelevelTransfer-view1.jsp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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"
  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. </script>
  84. </head>
  85. <body>
  86. <t:formvalid formid="formobj" tipSweep="true" dialog="false" usePlugin="password" layout="table" action="samelevelTransferController.do?doUpdate" tiptype="1" callback="callback">
  87. <input id="id" name="id" type="hidden" value="${samelevelTransferPage.id }"/>
  88. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  89. <tr>
  90. <td align="right" style="width: 15%;">
  91. <label class="Validform_label">
  92. <span color="red" class="requiredIcon">*</span>
  93. 调动方式:
  94. </label>
  95. </td>
  96. <td class="value" colspan="5">
  97. <label class="Validform_label">人事调动(平调)</label>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  102. <td class="value" colspan="5">
  103. <input id="userid" name="userid" type="hidden" value="${user.id}"/>
  104. <input name="realName" class="inputxt" value="${user.realName}" id="realName" readonly="readonly" datatype="*"/>
  105. <span class="Validform_checktip"></span>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td align="right" >
  110. <label class="Validform_label">
  111. 调出单位:
  112. </label>
  113. </td>
  114. <td class="value" style="width: 10%;">
  115. <label class="Validform_label danwei">${map.departname}</label>
  116. <input type="hidden" name="belongUnitid" id="belongUnitid" value="${map.departid}"/>
  117. </td>
  118. <td align="right" style="width: 5%;">
  119. <label class="Validform_label">
  120. 原职级:
  121. </label>
  122. </td>
  123. <td class="value" style="width: 10%;">
  124. <label class="Validform_label zhiwei">${map.dutiesName}</label>
  125. <input type="hidden" name="oldDutiesid" id="oldDutiesid" value="${map.dutiesid}"/>
  126. </td>
  127. <td align="right" style="width: 5%;">
  128. <label class="Validform_label">
  129. 原岗位:
  130. </label>
  131. </td>
  132. <td class="value" style="width: 55%;">
  133. <label class="Validform_label gangwei">${map.postname}</label>
  134. <input type="hidden" name="oldPostid" id="oldPostid" value="${map.postid}"/>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td align="right" >
  139. <label class="Validform_label">
  140. <span color="red" class="requiredIcon">*</span>
  141. 调入单位:
  142. </label>
  143. </td>
  144. <td class="value" colspan="5">
  145. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  146. <input id="duties" name="duties" type="text" value="${tname}" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  147. <input id="inUnitid" name="inUnitid" type="hidden" value="${tid}" />
  148. <c:if test="${not empty flage}">
  149. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  150. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  151. </c:if>
  152. </td>
  153. </tr>
  154. <tr style="height:30px;">
  155. <td align="right" >
  156. <label class="Validform_label">
  157. <span color="red" class="requiredIcon">*</span>
  158. 调出日期:
  159. </label>
  160. </td>
  161. <td class="value">
  162. <input id="outTime" name="outTime" type="text" style="width: 150px" datatype="*" nullmsg="调出日期不可为空!" readonly="readonly" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${samelevelTransferPage.outTime}"/>'/>
  163. <label class="Validform_label" style="display: none;">调出日期</label>
  164. </td>
  165. <td align="right">
  166. <label class="Validform_label">
  167. <span color="red" class="requiredIcon">*</span>
  168. 调入日期:
  169. </label>
  170. </td>
  171. <td class="value">
  172. <input id="inTime" name="inTime" type="text" style="width: 150px" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${samelevelTransferPage.inTime}"/>' ignore="checked" />
  173. <label class="Validform_label" style="display: none;">调入日期</label>
  174. </td>
  175. </tr>
  176. <tr>
  177. <td align="right" >
  178. <label class="Validform_label">
  179. <span color="red" class="requiredIcon">*</span>
  180. 调动原因:
  181. </label>
  182. </td>
  183. <td class="value" colspan="5" >
  184. <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)">${samelevelTransferPage.transferReason}</textarea>
  185. <span class="Validform_checktip"></span>
  186. <label class="Validform_label" style="display: none;">调动原因</label>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td style="text-align:center;" colspan="6">
  191. <input id="eli" value="${flage}" type="hidden"/>
  192. <c:forEach items="${transitionList}" var="trans">
  193. <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}"
  194. onclick="popWriteOption1('<t:mutiLang langKey="common.task.operate"/>',800,300,'${trans.Transition }','${taskId}',${nextCodeCount},'${trans.nextnode}','${trans.nextnodeName}')" >${trans.Transition }<tton>
  195. </c:forEach>
  196. </td>
  197. </tr>
  198. </table>
  199. </t:formvalid>
  200. </body>
  201. <script src = "webpage/cn/com/lzt/sameleveltransfer/samelevelTransfer.js"></script>
  202. <script type="text/javascript">
  203. function callbackTable(msg){
  204. window.parent.callbackTable(msg);
  205. }
  206. function popWriteOption1(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId){
  207. if($("#eli").val() != ''){
  208. var unitid = $("#inUnitid").val();
  209. var transferReason = $("#transferReason").val();
  210. if(unitid != '' && transferReason != ''){
  211. $.ajax({
  212. cache: true,
  213. type: "POST",
  214. url:"samelevelTransferController.do?doUpdate",
  215. data:$('#formobj').serialize(),// 你的formid
  216. dataType:"json",
  217. async: false,
  218. success: function(data) {
  219. dealProcFlowNoOption(title,taskId,nextNodeId,nextNodeCount,false);
  220. }
  221. });
  222. }else{
  223. if(unitid == ''){
  224. layer.alert('调动单位不可为空!');
  225. }
  226. if(transferReason == ''){
  227. layer.alert('调动原因不可为空!');
  228. }
  229. }
  230. }else{
  231. popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId);
  232. }
  233. }
  234. </script>