personnelBaseArchivesManage-view.jsp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  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. <!-- 人事信息 -->
  5. <html>
  6. <head>
  7. <title>员工人事信息表</title>
  8. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  9. <script src="plug-in/layer/layer.js"></script>
  10. <script>
  11. $(function(){
  12. // 合同是否到期提醒
  13. var ifremindVal = $("#ifremind").val();
  14. // 是否续签合同
  15. var ifrenewedVal = $("#ifrenewed").val();
  16. // 是否自动转正
  17. var autoCorrectionVal = $("#autoCorrection").val();
  18. // 是否缴金人员
  19. var ifpaymentVal = $("#ifpayment").val();
  20. if(1 == ifremindVal) {
  21. $("#ifremindYes").attr("checked", true);
  22. }
  23. if(1 == ifrenewedVal) {
  24. $("#ifrenewedYes").attr("checked", true);
  25. }
  26. if(1 == autoCorrectionVal) {
  27. $("#autoCorrectionYes").attr("checked", true);
  28. } else {
  29. $("#autoCorrectionNo").attr("checked", true);
  30. }
  31. if(1 == ifpaymentVal) {
  32. $("#ifpaymentYes").attr("checked", true);
  33. } else {
  34. $("#ifpaymentNo").attr("checked", true);
  35. }
  36. })
  37. function autoCorrectionNoOnClick() {
  38. if($("#autoCorrectionYes").attr("checked")) {
  39. $("#autoCorrectionYes").attr("checked", false);
  40. $("#autoCorrectionNo").attr("checked", true);
  41. } else {
  42. $("#autoCorrectionYes").attr("checked", true);
  43. $("#autoCorrectionNo").attr("checked", false);
  44. }
  45. }
  46. function autoCorrectionYesOnClick() {
  47. if($("#autoCorrectionNo").attr("checked")) {
  48. $("#autoCorrectionYes").attr("checked", true);
  49. $("#autoCorrectionNo").attr("checked", false);
  50. } else {
  51. $("#autoCorrectionYes").attr("checked", false);
  52. $("#autoCorrectionNo").attr("checked", true);
  53. }
  54. }
  55. function ifpaymentNoOnClick() {
  56. if($("#ifpaymentYes").attr("checked")) {
  57. $("#ifpaymentYes").attr("checked", false);
  58. $("#ifpaymentNo").attr("checked", true);
  59. } else {
  60. $("#ifpaymentYes").attr("checked", true);
  61. $("#ifpaymentNo").attr("checked", false);
  62. }
  63. }
  64. function ifpaymentYesOnClick() {
  65. if($("#ifpaymentNo").attr("checked")) {
  66. $("#ifpaymentYes").attr("checked", true);
  67. $("#ifpaymentNo").attr("checked", false);
  68. } else {
  69. $("#ifpaymentYes").attr("checked", false);
  70. $("#ifpaymentNo").attr("checked", true);
  71. }
  72. }
  73. // 职务选择
  74. function openDutiesSelect() {
  75. $.dialog.setting.zIndex = getzIndex();
  76. var orgIds = $("#belongDutiesid").val();
  77. $.dialog({content: 'url:dutiesController.do?departSelect&orgIds='+orgIds, zIndex: 2100, title: '职务列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  78. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDutiesSelect, focus: true},
  79. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  80. ]}).zindex();
  81. }
  82. // 职务回调
  83. function callbackDutiesSelect() {
  84. var iframe = this.iframe.contentWindow;
  85. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  86. var nodes = treeObj.getCheckedNodes();
  87. // var nodes = treeObj.getSelectedNodes();
  88. // console.log(nodes);
  89. if(nodes.length>0){
  90. var ids='',names='';
  91. for(var i=0;i<nodes.length;i++){
  92. var node = nodes[i];
  93. ids += node.id+',';
  94. names += node.name+',';
  95. }
  96. ids = ids.substring(0,ids.length - 1);
  97. names = names.substring(0,names.length - 1);
  98. $("#dutiesName").val(names);
  99. $("#dutiesName").blur();
  100. $("#belongDutiesid").val(ids);
  101. }
  102. }
  103. function dutiesClean(){
  104. $("#belongDutiesid").val('');
  105. $("#dutiesName").val('');
  106. }
  107. // 岗位选择
  108. function openPostSelect() {
  109. $.dialog.setting.zIndex = getzIndex();
  110. var orgIds = $("#inPostid").val();
  111. $.dialog({content: 'url:projectPostDetailController.do?postSelectNoCheckBox&orgIds='+orgIds,
  112. zIndex:2100, title: '岗位列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  113. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackPostSelect, focus: true},
  114. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  115. ]}).zindex();
  116. }
  117. // 岗位回调
  118. function callbackPostSelect() {
  119. var iframe = this.iframe.contentWindow;
  120. var treeObj = iframe.$.fn.zTree.getZTreeObj("postSelect");
  121. console.log(treeObj);
  122. var nodes = treeObj.getCheckedNodes(true);
  123. // var nodes = treeObj.getSelectedNodes(true);
  124. // console.log(nodes);
  125. if(nodes.length>0){
  126. var ids='',names='';
  127. for(i=0;i<nodes.length;i++){
  128. var node = nodes[i];
  129. ids += node.id+',';
  130. names += node.name+',';
  131. }
  132. ids = ids.substring(0,ids.length - 1);
  133. names = names.substring(0,names.length - 1);
  134. $("#postName").val(names);
  135. $("#postName").blur();
  136. $("#inPostid").val(ids);
  137. }
  138. }
  139. function postClean(){
  140. $("#postName").val('');
  141. $("#inPostid").val('');
  142. }
  143. // 根据合同期间设置试用期
  144. function probationCount() {
  145. var start = new Date($("#contractStime").val());
  146. var end = new Date($("#contractEtime").val());
  147. var year = (end-start)/(24*60*60*1000*365);
  148. if(year < 3) {
  149. $("#trialPeriod").val("1");
  150. }
  151. if(year >= 3) {
  152. $("#trialPeriod").val("3");
  153. }
  154. }
  155. //重新入职
  156. function reruzhi(){
  157. var start =$("#contractStime").val();
  158. var end = $("#contractEtime").val();
  159. if('${personnelInfo.positionStatus}' != '3'){
  160. alert("此员工已经是在职状态");
  161. return;
  162. }
  163. if('${personnelInfo.contractStime}' == start+' 00:00:00.0'){
  164. alert('请修改重新入职的日期${personnelInfo.contractStime}');
  165. return;
  166. }
  167. if('${personnelInfo.contractEtime}' == end+' 00:00:00.0'){
  168. alert("请修改重新入职的合同终止日期${personnelInfo.contractEtime}");
  169. return;
  170. }
  171. $.ajax({
  172. url:"personnelBaseArchivesManageController.do?reruzhi",
  173. type:"post",
  174. data: {
  175. ids : '${personnelInfo.id}',
  176. start : start,
  177. end : end
  178. },
  179. cache : false,
  180. success:function(aj){
  181. data=JSON.parse(aj);
  182. if (data.success) {
  183. layer.alert("重新入职成功");
  184. window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
  185. } else {
  186. layer.alert(data.msg);
  187. }
  188. }
  189. });
  190. }
  191. //重新入职
  192. function doLeave(){
  193. var leavedate =$("#leavedate").val();
  194. if(leavedate == null || leavedate == ''){
  195. alert("请填写离职日期");
  196. return;
  197. }
  198. $.ajax({
  199. url:"personnelBaseArchivesManageController.do?doLeave",
  200. async:true,
  201. type:"post",
  202. data: {
  203. ids : '${personnelInfo.id}',
  204. leavedate : leavedate
  205. },
  206. cache : false,
  207. success:function(aj){
  208. data=JSON.parse(aj);
  209. if (data.success) {
  210. layer.alert(data.msg);
  211. window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
  212. } else {
  213. layer.alert(data.msg);
  214. }
  215. }
  216. });
  217. }
  218. function btn_ok(){
  219. if($("#ifremindYes").attr("checked")) {
  220. $("#ifremind").val("1");
  221. } else {
  222. $("#ifremind").val("0");
  223. }
  224. if($("#ifrenewedYes").attr("checked")) {
  225. $("#ifrenewed").val("1");
  226. } else {
  227. $("#ifrenewed").val("0");
  228. }
  229. if($("#autoCorrectionYes").attr("checked")) {
  230. $("#autoCorrection").val("1");
  231. } else {
  232. $("#autoCorrection").val("0");
  233. }
  234. if($("#ifpaymentYes").attr("checked")) {
  235. $("#ifpayment").val("1");
  236. } else {
  237. $("#ifpayment").val("0");
  238. }
  239. if($("#trialPeriod").val() == 0) {
  240. if($("#positionStatus").val() == 1) {
  241. layer.alert("试用期限为【无】时,在职状态不能为【已入职】,请确认。");
  242. return ;
  243. }
  244. }
  245. $("#btnsub").click();
  246. }
  247. function callback(data){
  248. top.tip(data.msg)
  249. if(data.success) {
  250. window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
  251. }
  252. }
  253. function dataReload() {
  254. $.messager.confirm("确认", "确定要重置当前内容?所有内容将会恢复到编辑之前。", function (r) {
  255. if (r) {
  256. window.location.href="personnelBaseArchivesManageController.do?goUpdatePersonnel&id=${personnelInfo.userid}";
  257. }
  258. });
  259. }
  260. </script>
  261. </head>
  262. <body>
  263. <div class="easyui-layout" fit="true">
  264. <div region="center" style="padding:0px;border:0px">
  265. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tipSweep="true" action="personnelBaseArchivesManageController.do?savePersonnelData" tiptype="1" callback="callback">
  266. <input id="id" name="id" type="hidden" value="${personnelInfo.id}"/>
  267. <input id="userid" name="userid" type="hidden" value="${personnelInfo.userid}"/>
  268. <input id="ifremind" name="ifremind" type="hidden" value="${personnelInfo.ifremind}"/>
  269. <input id="ifrenewed" name="ifrenewed" type="hidden" value="${personnelInfo.ifrenewed}"/>
  270. <input id="autoCorrection" name="autoCorrection" type="hidden" value="${personnelInfo.autoCorrection}"/>
  271. <input id="ifpayment" name="ifpayment" type="hidden" value="${personnelInfo.ifpayment}"/>
  272. <table cellpadding="0" cellspacing="1" class="formtable">
  273. <!--
  274. <tr>
  275. <td align="right" style="width:110px">
  276. <label class="Validform_label">
  277. 所属单位:
  278. </label>
  279. </td>
  280. <td class="value">
  281. <label>
  282. ${mainOrg}
  283. </label>
  284. </td>
  285. </tr>
  286. <tr>
  287. <td align="right">
  288. <label class="Validform_label">
  289. 兼职机构:
  290. </label>
  291. </td>
  292. <td class="value">
  293. <label>
  294. ${parttimeOrg}
  295. </label>
  296. </td>
  297. </tr>
  298. -->
  299. <tr>
  300. <td align="right" style="width:110px">
  301. <label class="Validform_label">
  302. <span color="red" class="requiredIcon">*</span>所属职务:
  303. </label>
  304. </td>
  305. <td class="value">
  306. <input id="belongDutiesid" name="belongDutiesid" type="hidden" datatype="*" value="${personnelInfo.belongDutiesid}">
  307. <input id="dutiesName" name="dutiesName" type="text" style="width: 300px" ignore="ignore" value='${dutiesName}' placeholder="请输入所属职务"/>
  308. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDutiesSelect()">选择</a> -->
  309. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="dutiesRedo" onclick="dutiesClean()">清空</a> -->
  310. <!-- <span class="Validform_checktip"></span> -->
  311. <!-- <label class="Validform_label" style="display: none;">所属职务</label> -->
  312. </td>
  313. </tr>
  314. <%--
  315. <tr>
  316. <td align="right">
  317. <label class="Validform_label">
  318. 所属岗位:
  319. </label>
  320. </td>
  321. <td class="value">
  322. <input id="inPostid" name="inPostid" type="hidden" value='${personnelInfo.inPostid}'/>
  323. <input id="postName" name="postName" type="text" style="width: 300px" ignore="ignore" onclick="openPostSelect()" value='${postName}' placeholder="请输入所属岗位"/>
  324. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="postSearch" onclick="openPostSelect()">选择</a>
  325. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="postRedo" onclick="postClean()">清空</a>
  326. <span class="Validform_checktip"></span>
  327. <label class="Validform_label" style="display: none;">所属岗位</label>
  328. </td>
  329. </tr> --%>
  330. <tr>
  331. <td align="right">
  332. <label class="Validform_label">
  333. <span color="red" class="requiredIcon">*</span>入职日期:
  334. </label>
  335. </td>
  336. <td class="value">
  337. <div style="display:inline">
  338. <input id="contractStime" name="contractStime" type="text" style="width: 120px" class="Wdate"
  339. onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contractEtime\',{d:-1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractStime}' type="date" pattern="yyyy-MM-dd"/>'/>
  340. 入职时填写<b>(注意:请谨慎修改,此项影响工资核算)</b>
  341. <span class="Validform_checktip"></span>
  342. <label class="Validform_label" style="display: none;">入职日期</label>
  343. </div>
  344. <%--<input type="checkbox" id='ifremindYes' name='ifremindYes'><span>是否到期提醒</span>
  345. <input type="checkbox" id='ifrenewedYes' name='ifrenewedYes' ><span>是否续签合同</span> --%>
  346. </td>
  347. </tr>
  348. <tr>
  349. <td align="right">
  350. <label class="Validform_label">
  351. <span color="red" class="requiredIcon">*</span>合同期至:
  352. </label>
  353. </td>
  354. <td class="value">
  355. <div style="display:inline">
  356. <input id="contractEtime" name="contractEtime" type="text" style="width: 120px" class="Wdate"
  357. onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contractStime\', {d:1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractEtime}' type="date" pattern="yyyy-MM-dd"/>'/>
  358. 续签合同时,修改此项
  359. <span class="Validform_checktip"></span>
  360. <label class="Validform_label" style="display: none;">合同结束时间</label>
  361. </div>
  362. </td>
  363. </tr>
  364. <tr>
  365. <!-- <td align="right"> -->
  366. <!-- <label class="Validform_label"> -->
  367. <!-- <span color="red" class="requiredIcon">*</span>合同有效期间: -->
  368. <!-- </label> -->
  369. <!-- </td> -->
  370. <!-- <td class="value"> -->
  371. <!-- <div style="display:inline"> -->
  372. <!-- <input id="contractStime" name="contractStime" type="text" style="width: 120px" class="Wdate" -->
  373. <%-- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'contractEtime\',{d:-1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractStime}' type="date" pattern="yyyy-MM-dd"/>'/> --%>
  374. <!-- ~ -->
  375. <!-- <span class="Validform_checktip"></span> -->
  376. <!-- <label class="Validform_label" style="display: none;">合同开始时间</label> -->
  377. <!-- </div> -->
  378. <!-- <div style="display:inline"> -->
  379. <!-- <input id="contractEtime" name="contractEtime" type="text" style="width: 120px" class="Wdate" -->
  380. <%-- onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'contractStime\', {d:1})}'})" onblur="probationCount()" datatype="*" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.contractEtime}' type="date" pattern="yyyy-MM-dd"/>'/> --%>
  381. <!-- <span class="Validform_checktip"></span> -->
  382. <!-- <label class="Validform_label" style="display: none;">合同结束时间</label> -->
  383. <!-- </div> -->
  384. </td>
  385. </tr>
  386. <tr>
  387. <td align="right">
  388. <label class="Validform_label">
  389. <font color="#FF0000"></font>在职状态:
  390. </label>
  391. </td>
  392. <td class="value">
  393. <c:if test="${personnelInfo.positionStatus !=null && personnelInfo.positionStatus !=''}">
  394. <t:dictSelect readonly="readonly" field="positionStatus" id="positionStatus" type="list" typeGroupCode="jobStatus" defaultVal="${personnelInfo.positionStatus}" hasLabel="false" datatype="*" title="在职状态"></t:dictSelect>
  395. </c:if>
  396. <c:if test="${personnelInfo.positionStatus ==null || personnelInfo.positionStatus ==''}">
  397. <t:dictSelect field="positionStatus" id="positionStatus" type="list" typeGroupCode="jobStatus" hasLabel="false" datatype="*" title="在职状态"></t:dictSelect>
  398. </c:if>
  399. <span class="Validform_checktip"></span>
  400. <label class="Validform_label" style="display: none;">在职状态</label>
  401. </td>
  402. </tr>
  403. <tr>
  404. <td align="right">
  405. <label class="Validform_label">
  406. <span color="red" class="requiredIcon">*</span>员工类型:
  407. </label>
  408. </td>
  409. <td class="value">
  410. <t:dictSelect field="userType" id="userType" type="list" typeGroupCode="staffType" defaultVal="${personnelInfo.userType}" hasLabel="false" datatype="*" title="员工类型"></t:dictSelect>
  411. <span class="Validform_checktip"></span>
  412. <label class="Validform_label" style="display: none;">员工类型</label>
  413. </td>
  414. </tr>
  415. <tr>
  416. <td align="right">
  417. <label class="Validform_label">
  418. <span color="red" class="requiredIcon">*</span>是否自动转正:
  419. </label>
  420. </td>
  421. <td class="value">
  422. <input type="checkbox" id='autoCorrectionYes' name='autoCorrectionYes' onClick="autoCorrectionYesOnClick()"><span>是</span>
  423. <input type="checkbox" id='autoCorrectionNo' name='autoCorrectionNo' onClick="autoCorrectionNoOnClick()"><span>否</span>
  424. </td>
  425. </tr>
  426. <tr>
  427. <td align="right">
  428. <label class="Validform_label">
  429. <span color="red" class="requiredIcon">*</span>试用期限:
  430. </label>
  431. </td>
  432. <td class="value">
  433. <t:dictSelect field="trialPeriod" id="trialPeriod" type="list" typeGroupCode="shiyongqi" datatype="*" defaultVal="${personnelInfo.trialPeriod}" hasLabel="false" title="试用期限"></t:dictSelect>
  434. <span class="Validform_checktip"></span>
  435. <label class="Validform_label" style="display: none;">试用期限</label>
  436. </td>
  437. </tr>
  438. <tr>
  439. <td align="right">
  440. <label class="Validform_label">
  441. <span color="red" class="requiredIcon">*</span>是否为缴金人员:
  442. </label>
  443. </td>
  444. <td class="value">
  445. <input type="checkbox" id='ifpaymentYes' name='ifpaymentYes' onClick="ifpaymentYesOnClick()"><span>是</span>
  446. <input type="checkbox" id='ifpaymentNo' name='ifpaymentNo' onClick="ifpaymentNoOnClick()"><span>否</span>
  447. </td>
  448. </tr>
  449. <%--
  450. <tr>
  451. <td align="right">
  452. <label class="Validform_label">
  453. <span color="red" class="requiredIcon">*</span>管理类型:
  454. </label>
  455. </td>
  456. <td class="value">
  457. <t:dictSelect field="managerType" id="managerType" type="list" typeGroupCode="manageType" datatype="*" defaultVal="${personnelInfo.managerType}" hasLabel="false" title="管理类型"></t:dictSelect>
  458. <span class="Validform_checktip"></span>
  459. <label class="Validform_label" style="display: none;">管理类型</label>
  460. </td>
  461. </tr>
  462. --%>
  463. <tr>
  464. <td align="right">
  465. <label class="Validform_label">
  466. <font color="#FF0000"></font>离职日期:
  467. </label>
  468. </td>
  469. <td class="value">
  470. <div style="display:inline">
  471. <input id="leavedate" name="leavedate" type="text" style="width: 120px" class="Wdate"
  472. onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'leavedate\',{d:-1})}'})" placeholder="YYYY-MM-DD" value='<fmt:formatDate value='${personnelInfo.leaveDate}' type="date" pattern="yyyy-MM-dd"/>'/>
  473. 离职登记时填写
  474. <span class="Validform_checktip"></span>
  475. <label class="Validform_label" style="display: none;">离职日期</label>
  476. </div>
  477. </td>
  478. </tr>
  479. <!-- <tr> -->
  480. <!-- <td height="50px" align="center" colspan="4" > -->
  481. <!-- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">提交人事信息</a> -->
  482. <!-- <a style="margin-left:6px;" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-reload" onclick="reruzhi()">重新入职</a> -->
  483. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="doLeave" onclick="doLeave()">离职登记</a> -->
  484. <!-- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div> -->
  485. <!-- </td> -->
  486. <!-- </tr> -->
  487. </table>
  488. </t:formvalid>
  489. </div>
  490. </div>
  491. </body>
  492. <script src = "webpage/cn/com/lzt/personnelbasearchivesmanage/personnelBaseArchivesManage.js"></script>
  493. </html>