demoteTransfer-view1.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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=3"
  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. //选择按钮
  84. function openDepartmentSelect1() {
  85. //$.dialog.setting.zIndex = getzIndex();
  86. var orgIds = $("#inPostid").val();
  87. $.dialog({content: 'url:projectPostDetailController.do?postZTree&orgIds='+orgIds,
  88. zIndex:getzIndex(), title: '岗位类型列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  89. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect1, focus: true},
  90. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  91. ]}).zindex();
  92. }
  93. function callbackDepartmentSelect1() {
  94. var iframe = this.iframe.contentWindow;
  95. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  96. var nodes = treeObj.getCheckedNodes(true);
  97. if(nodes.length>0){
  98. var ids='',names='';
  99. for(i=0;i<nodes.length;i++){
  100. var node = nodes[i];
  101. ids += node.id+',';
  102. names += node.name+',';
  103. }
  104. setCookie(ids);
  105. $('#dutiesName').val(names);
  106. $('#dutiesName').blur();
  107. $('#inPostid').val(ids);
  108. }
  109. }
  110. function callbackClean1(){
  111. $('#dutiesName').val('');
  112. $('#inPostid').val('');
  113. }
  114. function openDepartmentSelect3() {
  115. //$.dialog.setting.zIndex = getzIndex();
  116. var orgIds = $("#inDutiesid").val();
  117. $.dialog({content: 'url:dutiesController.do?departSelect&orgIds='+orgIds, zIndex: getzIndex(), title: '职务列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  118. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect3, focus: true},
  119. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  120. ]}).zindex();
  121. }
  122. function callbackDepartmentSelect3() {
  123. var iframe = this.iframe.contentWindow;
  124. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  125. var nodes = treeObj.getCheckedNodes();
  126. if(nodes.length>0){
  127. var ids='',names='';
  128. for(var i=0;i<nodes.length;i++){
  129. var node = nodes[i];
  130. ids += node.id+',';
  131. names += node.name+',';
  132. }
  133. $('#duties3').val(names);
  134. $('#duties3').blur();
  135. $('#inDutiesid').val(ids);
  136. }
  137. }
  138. function callbackClean3(){
  139. $('#duties3').val('');
  140. $('#inDutiesid').val('');
  141. }
  142. $(function(){
  143. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  144. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  145. });
  146. </script>
  147. </head>
  148. <body>
  149. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="demoteTransferController.do?doUpdate" tiptype="1" callback="callback">
  150. <input id="id" name="id" type="hidden" value="${demoteTransferPage.id }"/>
  151. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  152. <tr>
  153. <td align="right" style="width: 15%;">
  154. <label class="Validform_label">
  155. <span color="red" class="requiredIcon">*</span>
  156. 调动方式:
  157. </label>
  158. </td>
  159. <td class="value" colspan="5">
  160. <label class="Validform_label">人事调动(降职)</label>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  165. <td class="value" colspan="5">
  166. <input id="userid" name="userid" type="hidden" value="${user.id}"/>
  167. <input name="realName" class="inputxt" value="${user.realName}" id="realName" readonly="readonly" datatype="*"/>
  168. <span class="Validform_checktip"></span>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td align="right">
  173. <label class="Validform_label">
  174. 调出单位:
  175. </label>
  176. </td>
  177. <td class="value" style="width: 10%;">
  178. <label class="Validform_label danwei">${map.departname}</label>
  179. <input type="hidden" name="belongUnitid" id="belongUnitid" value="${map.departid}"/>
  180. </td>
  181. <td align="right" style="width: 5%;">
  182. <label class="Validform_label">
  183. 原职级:
  184. </label>
  185. </td>
  186. <td class="value" style="width: 10%;">
  187. <label class="Validform_label zhiwei">${map.dutiesName}</label>
  188. <input type="hidden" name="oldDutiesid" id="oldDutiesid" value="${map.dutiesid}"/>
  189. </td>
  190. <td align="right" style="width: 5%;">
  191. <label class="Validform_label">
  192. 原岗位:
  193. </label>
  194. </td>
  195. <td class="value" style="width: 55%;">
  196. <label class="Validform_label gangwei">${map.postname}</label>
  197. <input type="hidden" name="oldPostid" id="oldPostid" value="${map.postid}"/>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td align="right">
  202. <label class="Validform_label">
  203. <span color="red" class="requiredIcon">*</span>
  204. 调入单位:
  205. </label>
  206. </td>
  207. <td class="value" colspan="5">
  208. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  209. <input id="duties" name="duties" type="text" value="${tname}" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  210. <input id="inUnitid" name="inUnitid" type="hidden" value="${tid}" />
  211. <c:if test="${not empty flage}">
  212. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  213. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  214. </c:if>
  215. </td>
  216. </tr>
  217. <tr >
  218. <td align="right">
  219. <label class="Validform_label">
  220. <span color="red" class="requiredIcon">*</span>
  221. 调出日期:
  222. </label>
  223. </td>
  224. <td class="value">
  225. <input id="outTime" name="outTime" type="text" datatype="*" nullmsg="调出日期不可为空!" readonly="readonly" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${demoteTransferPage.outTime}"/>'/>
  226. <label class="Validform_label" style="display: none;">调出日期</label>
  227. </td>
  228. <td align="right">
  229. <label class="Validform_label">
  230. <span color="red" class="requiredIcon">*</span>
  231. 调入日期:
  232. </label>
  233. </td>
  234. <td class="value">
  235. <input id="inTime" name="inTime" type="text" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" value='<fmt:formatDate pattern="yyyy-MM-dd" value="${demoteTransferPage.inTime}"/>' ignore="checked" />
  236. <label class="Validform_label" style="display: none;">调入日期</label>
  237. </td>
  238. </tr>
  239. <tr>
  240. <td align="right" >
  241. <label class="Validform_label">
  242. 职务、岗位变动
  243. </label>
  244. </td>
  245. <td align="right" colspan="5">
  246. &nbsp;
  247. </td>
  248. </tr>
  249. <tr>
  250. <td align="right" >
  251. <span>
  252. <label class="Validform_label">
  253. <span color="red" class="requiredIcon">*</span>
  254. 调入职务:
  255. </label>
  256. </span>
  257. </td>
  258. <td colspan="5" class="value">
  259. <span >
  260. <input id="duties3" name="duties3" type="text" readonly="readonly" value="${map.dutiesName1}" datatype="*" nullmsg="调入职务不可为空!" class="inputxt" placeholder="请选择职务"/>
  261. <input id="inDutiesid" name="inDutiesid" type="hidden" value="${map.dutiesid1}"/>
  262. <c:if test="${not empty flage}">
  263. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect3()">选择</a>
  264. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean3()">清空</a>
  265. </c:if>
  266. </span>
  267. </td>
  268. </tr>
  269. <tr>
  270. <td align="right">
  271. <span>
  272. <label class="Validform_label">
  273. 调入岗位:
  274. </label>
  275. </span>
  276. </td>
  277. <td colspan="5" class="value">
  278. <span >
  279. <input id="dutiesName" name="dutiesName" type="text" readonly="readonly" value="${map.postname1}" class="inputxt" placeholder="请选择岗位">
  280. <input id="inPostid" name="inPostid" type="hidden" value="${map.postid1}">
  281. <c:if test="${not empty flage}">
  282. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect1()">选择</a>
  283. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean1()">清空</a>
  284. </c:if>
  285. <span class="Validform_checktip"></span>
  286. <label class="Validform_label" style="display: none;">岗位类型</label>
  287. </span>
  288. </td>
  289. </tr>
  290. <tr>
  291. <td align="right">
  292. <label class="Validform_label">
  293. <span color="red" class="requiredIcon">*</span>
  294. 调动原因:
  295. </label>
  296. </td>
  297. <td class="value" colspan="5" >
  298. <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)">${demoteTransferPage.transferReason}</textarea>
  299. <span class="Validform_checktip"></span>
  300. <label class="Validform_label" style="display: none;">调动原因</label>
  301. </td>
  302. </tr>
  303. <tr>
  304. <td style="text-align:center;" colspan="6">
  305. <input id="eli" value="${flage}" type="hidden"/>
  306. <c:forEach items="${transitionList}" var="trans">
  307. <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}"
  308. onclick="popWriteOption1('<t:mutiLang langKey="common.task.operate"/>',800,300,'${trans.Transition }','${taskId}',${nextCodeCount},'${trans.nextnode}','${trans.nextnodeName}')" >${trans.Transition }<tton>
  309. </c:forEach>
  310. </td>
  311. </tr>
  312. </table>
  313. </t:formvalid>
  314. </body>
  315. <script src = "webpage/cn/com/lzt/demotetransfer/demoteTransfer.js"></script>
  316. <script type="text/javascript">
  317. function callbackTable(msg){
  318. window.parent.callbackTable(msg);
  319. }
  320. function popWriteOption1(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId){
  321. if($("#eli").val() != ''){
  322. var unitid = $("#inUnitid").val();
  323. var transferReason = $("#transferReason").val();
  324. var inDutiesid = $("#inDutiesid").val();
  325. if(unitid != '' && transferReason != '' && inDutiesid != ''){
  326. $.ajax({
  327. cache: true,
  328. type: "POST",
  329. url:"demoteTransferController.do?doUpdate",
  330. data:$('#formobj').serialize(),// 你的formid
  331. dataType:"json",
  332. async: false,
  333. success: function(data) {
  334. dealProcFlowNoOption(title,taskId,nextNodeId,nextNodeCount,false);
  335. }
  336. });
  337. }else{
  338. if(unitid == ''){
  339. layer.alert("调入单位不可为空!");
  340. return;
  341. }
  342. if(transferReason == ''){
  343. layer.alert("调动原因不可为空!");
  344. return;
  345. }
  346. if(inDutiesid == ''){
  347. layer.alert("调入职务不可为空!");
  348. return;
  349. }
  350. }
  351. }else{
  352. popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId);
  353. }
  354. }
  355. </script>