promotionTransfer-add.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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=2";
  17. layer.close(index);
  18. });
  19. }
  20. else{
  21. layer.alert(data.msg);
  22. }
  23. }
  24. $(function(){
  25. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  26. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  27. var tem = getCurrentMonthLast().Format("yyyy-MM-dd");
  28. $("#outTime").val(tem)
  29. $("#inTime").val(getNextDay(tem));
  30. });
  31. //取得当月的最后一天
  32. function getCurrentMonthLast(){
  33. var date=new Date();
  34. var currentMonth=date.getMonth();
  35. var nextMonth=++currentMonth;
  36. var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
  37. var oneDay=1000*60*60*24;
  38. return new Date(nextMonthFirstDay-oneDay);
  39. }
  40. //取得后一天日期
  41. function getNextDay(d){
  42. d = new Date(d);
  43. d = +d + 1000*60*60*24;
  44. d = new Date(d);
  45. //return d;
  46. //格式化
  47. var temp1 = d.getMonth()+1;
  48. var temp2 = d.getDate();
  49. if(temp1 < 10){
  50. temp1 = "0"+temp1;
  51. }
  52. if(temp2 < 10){
  53. temp2 = "0"+temp2;
  54. }
  55. return d.getFullYear()+"-"+temp1+"-"+temp2;
  56. }
  57. //日期格式化
  58. Date.prototype.Format = function (fmt) { //author: meizz
  59. var o = {
  60. "M+": this.getMonth() + 1, //月份
  61. "d+": this.getDate(), //日
  62. "h+": this.getHours(), //小时
  63. "m+": this.getMinutes(), //分
  64. "s+": this.getSeconds(), //秒
  65. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  66. "S": this.getMilliseconds() //毫秒
  67. };
  68. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  69. for (var k in o)
  70. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  71. return fmt;
  72. }
  73. </script>
  74. <script type="text/javascript">
  75. function updateoldDutiesid(){
  76. var userid = $("#userid").val();
  77. if(userid != ''){
  78. $.ajax({
  79. url:"samelevelTransferController.do?updateoldDutiesid",
  80. data:{id:userid},
  81. dataType:"json",
  82. type:"POST",
  83. success:function(result){
  84. $(".danwei").text(result.attributes.departName);
  85. $(".zhiwei").text(result.attributes.dutiesName);
  86. $(".gangwei").text(result.attributes.postName);
  87. $("#belongUnitid").val(result.attributes.departid);
  88. $("#oldDutiesid").val(result.attributes.dutiesid);
  89. $("#oldPostid").val(result.attributes.postid);
  90. }
  91. });
  92. }
  93. }
  94. function openDepartmentSelect() {
  95. $.dialog.setting.zIndex = getzIndex();
  96. var orgIds = $("#inUnitid").val();
  97. $.dialog({content: 'url:departController.do?departSelect&orgIds='+orgIds, zIndex: 2101, title: '入职单位', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  98. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  99. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  100. ]}).zindex();
  101. }
  102. function callbackDepartmentSelect() {
  103. var iframe = this.iframe.contentWindow;
  104. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  105. var nodes = treeObj.getCheckedNodes(true);
  106. if(nodes.length>0){
  107. var ids='',names='';
  108. for(var i=0;i<nodes.length;i++){
  109. var node = nodes[i];
  110. ids += node.id+',';
  111. names += node.name+',';
  112. }
  113. if(ids != ''){
  114. $.ajax({
  115. url:"modifyController.do?getorgid",
  116. data:{orgid:ids},
  117. dataType:"json",
  118. type:"POST",
  119. success:function(result){
  120. $('#inUnitid').val(ids);
  121. $('#duties').val(result.msg);
  122. $('#duties').blur();
  123. }
  124. });
  125. }
  126. }
  127. }
  128. function callbackClean(){
  129. $('#duties').val('');
  130. $('#inUnitid').val('');
  131. }
  132. //选择按钮
  133. function openDepartmentSelect1() {
  134. $.dialog.setting.zIndex = getzIndex();
  135. var orgIds = $("#inPostid").val();
  136. $.dialog({content: 'url:projectPostDetailController.do?postZTree&orgIds='+orgIds,
  137. zIndex:2100, title: '岗位类型列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  138. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect1, focus: true},
  139. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  140. ]}).zindex();
  141. }
  142. function callbackDepartmentSelect1() {
  143. var iframe = this.iframe.contentWindow;
  144. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  145. var nodes = treeObj.getCheckedNodes(true);
  146. if(nodes.length>0){
  147. var ids='',names='';
  148. for(i=0;i<nodes.length;i++){
  149. var node = nodes[i];
  150. ids += node.id+',';
  151. names += node.name+',';
  152. }
  153. setCookie(ids);
  154. $('#dutiesName').val(names);
  155. $('#dutiesName').blur();
  156. $('#inPostid').val(ids);
  157. }
  158. }
  159. function callbackClean1(){
  160. $('#dutiesName').val('');
  161. $('#inPostid').val('');
  162. }
  163. function openDepartmentSelect3() {
  164. $.dialog.setting.zIndex = getzIndex();
  165. var orgIds = $("#inDutiesid").val();
  166. $.dialog({content: 'url:dutiesController.do?departSelect&orgIds='+orgIds, zIndex: 2100, title: '职务列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  167. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect3, focus: true},
  168. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  169. ]}).zindex();
  170. }
  171. function callbackDepartmentSelect3() {
  172. var iframe = this.iframe.contentWindow;
  173. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  174. var nodes = treeObj.getCheckedNodes();
  175. if(nodes.length>0){
  176. var ids='',names='';
  177. for(var i=0;i<nodes.length;i++){
  178. var node = nodes[i];
  179. ids += node.id+',';
  180. names += node.name+',';
  181. }
  182. $('#duties3').val(names);
  183. $('#duties3').blur();
  184. $('#inDutiesid').val(ids);
  185. }
  186. }
  187. function callbackClean3(){
  188. $('#duties3').val('');
  189. $('#inDutiesid').val('');
  190. }
  191. </script>
  192. <style type="text/css">
  193. .fixed-h{
  194. float:left;
  195. width:100%;
  196. min-height:630px;
  197. overflow:auto;
  198. background:#ffffff;
  199. }
  200. </style>
  201. </head>
  202. <body>
  203. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="promotionTransferController.do?doAdd" tiptype="1" callback="callback">
  204. <input id="id" name="id" type="hidden" value="${promotionTransferPage.id }"/>
  205. <div class="fixed-h">
  206. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  207. <tr>
  208. <td align="right" style="width: 15%;">
  209. <label class="Validform_label">
  210. <span color="red" class="requiredIcon">*</span>
  211. 调动方式:
  212. </label>
  213. </td>
  214. <td class="value" colspan="5">
  215. <label class="Validform_label">人事调动(晋升)</label>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>调动员工:</label></td>
  220. <td class="value" colspan="5">
  221. <input id="userid" name="userid" type="hidden" value=""/>
  222. <input name="realName" class="inputxt" value="" id="realName" readonly="readonly" datatype="*"/>
  223. <t:choose hiddenName="userid" hiddenid="id" left="50%" fun="updateoldDutiesid" 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>
  224. <span class="Validform_checktip"></span>
  225. </td>
  226. </tr>
  227. <tr>
  228. <td align="right">
  229. <label class="Validform_label">
  230. 调出单位:
  231. </label>
  232. </td>
  233. <td class="value" style="width: 10%;">
  234. <label class="Validform_label danwei"></label>
  235. <input type="hidden" name="belongUnitid" id="belongUnitid"/>
  236. </td>
  237. <td align="right" style="width: 5%;">
  238. <label class="Validform_label">
  239. 原职级:
  240. </label>
  241. </td>
  242. <td class="value" style="width: 10%;">
  243. <label class="Validform_label zhiwei"></label>
  244. <input type="hidden" name="oldDutiesid" id="oldDutiesid"/>
  245. </td>
  246. <td align="right" style="width: 5%;">
  247. <label class="Validform_label">
  248. 原岗位:
  249. </label>
  250. </td>
  251. <td class="value" style="width: 55%;">
  252. <label class="Validform_label gangwei"></label>
  253. <input type="hidden" name="oldPostid" id="oldPostid"/>
  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" colspan="5">
  264. <%-- <t:departSelect hasLabel="true" selectedNamesInputId="orgNames"></t:departSelect> --%>
  265. <input id="duties" name="duties" type="text" readonly="readonly" datatype="*" nullmsg="调入单位不可为空!" class="inputxt"/>
  266. <input id="inUnitid" name="inUnitid" type="hidden" />
  267. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  268. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  269. </td>
  270. </tr>
  271. <tr>
  272. <td align="right">
  273. <label class="Validform_label">
  274. <span color="red" class="requiredIcon">*</span>
  275. 调出日期:
  276. </label>
  277. </td>
  278. <td class="value">
  279. <input id="outTime" name="outTime" type="text" datatype="*" nullmsg="调出日期不可为空!" readonly="readonly"/>
  280. <label class="Validform_label" style="display: none;">调出日期</label>
  281. </td>
  282. <td align="right">
  283. <label class="Validform_label">
  284. <span color="red" class="requiredIcon">*</span>
  285. 调入日期:
  286. </label>
  287. </td>
  288. <td class="value">
  289. <input id="inTime" name="inTime" type="text" readonly="readonly" datatype="*" nullmsg="调入日期不可为空!" ignore="checked" />
  290. <label class="Validform_label" style="display: none;">调入日期</label>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td align="right" >
  295. <label class="Validform_label">
  296. 职务、岗位变动
  297. </label>
  298. </td>
  299. <td align="right" colspan="5">
  300. &nbsp;
  301. </td>
  302. </tr>
  303. <tr>
  304. <td align="right" >
  305. <span>
  306. <label class="Validform_label">
  307. <span color="red" class="requiredIcon">*</span>
  308. 调入职务:
  309. </label>
  310. </span>
  311. </td>
  312. <td colspan="5" class="value">
  313. <span >
  314. <input id="duties3" name="duties3" type="text" readonly="readonly" datatype="*" nullmsg="调入职务不可为空!" class="inputxt" placeholder="请选择职务"/>
  315. <input id="inDutiesid" name="inDutiesid" type="hidden" />
  316. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect3()">选择</a>
  317. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean3()">清空</a>
  318. </span>
  319. </td>
  320. </tr>
  321. <tr>
  322. <td align="right">
  323. <span>
  324. <label class="Validform_label">
  325. 调入岗位:
  326. </label>
  327. </span>
  328. </td>
  329. <td colspan="5" class="value">
  330. <span >
  331. <input id="dutiesName" name="dutiesName" type="text" readonly="readonly" class="inputxt" placeholder="请选择岗位">
  332. <input id="inPostid" name="inPostid" type="hidden">
  333. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect1()">选择</a>
  334. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean1()">清空</a>
  335. <span class="Validform_checktip"></span>
  336. <label class="Validform_label" style="display: none;">岗位类型</label>
  337. </span>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td align="right">
  342. <label class="Validform_label">
  343. <span color="red" class="requiredIcon">*</span>
  344. 调动原因:
  345. </label>
  346. </td>
  347. <td class="value" colspan="5" >
  348. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="transferReason" maxlength="200" name="transferReason" datatype="*" nullmsg="调动原因不可为空!" placeholder="请输入调动原因(最多输入文字数200)"></textarea>
  349. <span class="Validform_checktip"></span>
  350. <label class="Validform_label" style="display: none;">调动原因</label>
  351. </td>
  352. </tr>
  353. <tr>
  354. <td height="100px" align="center" colspan="2">
  355. </td>
  356. </tr>
  357. <tr>
  358. <td height="50px" align="center" colspan="6">
  359. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  360. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  361. <a style="margin-left:0px" href="samelevelTransferController.do?list&transferType=2" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return">返回</a>
  362. </td>
  363. </tr>
  364. </table>
  365. </div>
  366. </t:formvalid>
  367. </body>
  368. <script src = "webpage/cn/com/lzt/promotiontransfer/promotionTransfer.js"></script>