snapSingleborrow-view1.jsp 11 KB

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