renshi-hetong-update.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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&codeFilter='+'A03;A04;A11'+'&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. function btn_ok(){
  156. if($("#ifremindYes").attr("checked")) {
  157. $("#ifremind").val("1");
  158. } else {
  159. $("#ifremind").val("0");
  160. }
  161. if($("#ifrenewedYes").attr("checked")) {
  162. $("#ifrenewed").val("1");
  163. } else {
  164. $("#ifrenewed").val("0");
  165. }
  166. if($("#autoCorrectionYes").attr("checked")) {
  167. $("#autoCorrection").val("1");
  168. } else {
  169. $("#autoCorrection").val("0");
  170. }
  171. if($("#ifpaymentYes").attr("checked")) {
  172. $("#ifpayment").val("1");
  173. } else {
  174. $("#ifpayment").val("0");
  175. }
  176. if($("#trialPeriod").val() == 0) {
  177. if($("#positionStatus").val() == 1) {
  178. layer.alert("试用期限为【无】时,在职状态不能为【已入职】,请确认。");
  179. return ;
  180. }
  181. }
  182. var oldContractStime = '${personnelInfo.contractStime}';
  183. var contractStime = $("#contractStime").val();
  184. // if(oldContractStime.length >0){
  185. // if(oldContractStime.substr(0, 10) != contractStime){
  186. // layer.alert("没有修改【入职日期】的权限,请联系人事部门。");
  187. // return;
  188. // }
  189. // }
  190. $("#btnsub").click();
  191. }
  192. function callback(data){
  193. top.tip(data.msg)
  194. if(data.success) {
  195. window.location.href="personnelInfoUploadController.do?goUpdateHetong&userId=${personnelInfo.userid}";
  196. }
  197. }
  198. function dataReload() {
  199. $.messager.confirm("确认", "确定要重置当前内容?所有内容将会恢复到编辑之前。", function (r) {
  200. if (r) {
  201. window.location.href="personnelInfoUploadController.do?goUpdateHetong&userId=${personnelInfo.userid}";
  202. }
  203. });
  204. }
  205. function backOnClick(){
  206. var url = 'personnelInfoUploadController.do?list&queryParams='+'${queryParams}';
  207. window.location.href=url;
  208. }
  209. </script>
  210. </head>
  211. <body>
  212. <div class="easyui-layout" fit="true">
  213. <div region="center" style="padding:0px;border:0px">
  214. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tipSweep="true" action="personnelInfoUploadController.do?savePersonnelData" tiptype="1" callback="callback">
  215. <input id="id" name="id" type="hidden" value="${personnelInfo.id}"/>
  216. <input id="userid" name="userid" type="hidden" value="${personnelInfo.userid}"/>
  217. <input id="ifremind" name="ifremind" type="hidden" value="${personnelInfo.ifremind}"/>
  218. <input id="ifrenewed" name="ifrenewed" type="hidden" value="${personnelInfo.ifrenewed}"/>
  219. <input id="autoCorrection" name="autoCorrection" type="hidden" value="${personnelInfo.autoCorrection}"/>
  220. <input id="ifpayment" name="ifpayment" type="hidden" value="${personnelInfo.ifpayment}"/>
  221. <table cellpadding="0" cellspacing="1" class="formtable">
  222. <!--
  223. <tr>
  224. <td align="right" style="width:110px">
  225. <label class="Validform_label">
  226. 所属单位:
  227. </label>
  228. </td>
  229. <td class="value">
  230. <label>
  231. ${mainOrg}
  232. </label>
  233. </td>
  234. </tr>
  235. <tr>
  236. <td align="right">
  237. <label class="Validform_label">
  238. 兼职机构:
  239. </label>
  240. </td>
  241. <td class="value">
  242. <label>
  243. ${parttimeOrg}
  244. </label>
  245. </td>
  246. </tr>
  247. -->
  248. <tr>
  249. <td align="right" style="width:110px">
  250. <label class="Validform_label">
  251. <span color="red" class="requiredIcon">*</span>所属职务:
  252. </label>
  253. </td>
  254. <td class="value">
  255. <input id="belongDutiesid" name="belongDutiesid" type="hidden" datatype="*" value="${personnelInfo.belongDutiesid}">
  256. <input id="dutiesName" name="dutiesName" type="text" style="width: 300px" ignore="ignore" onclick="openDutiesSelect()" value='${dutiesName}' placeholder="请输入所属职务"/>
  257. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDutiesSelect()">选择</a>
  258. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="dutiesRedo" onclick="dutiesClean()">清空</a>
  259. <span class="Validform_checktip"></span>
  260. <label class="Validform_label" style="display: none;">所属职务</label>
  261. </td>
  262. </tr>
  263. <%--
  264. <tr>
  265. <td align="right">
  266. <label class="Validform_label">
  267. 所属岗位:
  268. </label>
  269. </td>
  270. <td class="value">
  271. <input id="inPostid" name="inPostid" type="hidden" value='${personnelInfo.inPostid}'/>
  272. <input id="postName" name="postName" type="text" style="width: 300px" ignore="ignore" onclick="openPostSelect()" value='${postName}' placeholder="请输入所属岗位"/>
  273. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="postSearch" onclick="openPostSelect()">选择</a>
  274. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="postRedo" onclick="postClean()">清空</a>
  275. <span class="Validform_checktip"></span>
  276. <label class="Validform_label" style="display: none;">所属岗位</label>
  277. </td>
  278. </tr> --%>
  279. <tr>
  280. <td align="right">
  281. <label class="Validform_label">
  282. <span color="red" class="requiredIcon">*</span>入职日期:
  283. </label>
  284. </td>
  285. <td class="value">
  286. <div style="display:inline">
  287. <input id="contractStime" name="contractStime" type="text" style="width: 120px" class="Wdate"
  288. 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"/>'/>
  289. 入职时填写<b>(注意:请谨慎填写,此项影响工资核算)</b>
  290. <span class="Validform_checktip"></span>
  291. <label class="Validform_label" style="display: none;">入职日期</label>
  292. </div>
  293. <%--<input type="checkbox" id='ifremindYes' name='ifremindYes'><span>是否到期提醒</span>
  294. <input type="checkbox" id='ifrenewedYes' name='ifrenewedYes' ><span>是否续签合同</span> --%>
  295. </td>
  296. </tr>
  297. <tr>
  298. <td align="right">
  299. <label class="Validform_label">
  300. <span color="red" class="requiredIcon">*</span>合同期至:
  301. </label>
  302. </td>
  303. <td class="value">
  304. <div style="display:inline">
  305. <input id="contractEtime" name="contractEtime" type="text" style="width: 120px" class="Wdate"
  306. 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"/>'/>
  307. 续签合同时,修改此项
  308. <span class="Validform_checktip"></span>
  309. <label class="Validform_label" style="display: none;">合同结束时间</label>
  310. </div>
  311. </td>
  312. </tr>
  313. <%--<tr>
  314. <td align="right">
  315. <label class="Validform_label">
  316. <span color="red" class="requiredIcon">*</span>在职状态:
  317. </label>
  318. </td>
  319. <td class="value">
  320. <t:dictSelect field="positionStatus" id="positionStatus" type="list" typeGroupCode="jobStatus" defaultVal="${personnelInfo.positionStatus}" hasLabel="false" datatype="*" title="在职状态"></t:dictSelect>
  321. <span class="Validform_checktip"></span>
  322. <label class="Validform_label" style="display: none;">在职状态</label>
  323. </td>
  324. </tr>--%>
  325. <tr>
  326. <td align="right">
  327. <label class="Validform_label">
  328. <span color="red" class="requiredIcon">*</span>员工类型:
  329. </label>
  330. </td>
  331. <td class="value">
  332. <t:dictSelect field="userType" id="userType" type="list" typeGroupCode="staffType" defaultVal="${personnelInfo.userType}" hasLabel="false" datatype="*" title="员工类型"></t:dictSelect>
  333. <span class="Validform_checktip"></span>
  334. <label class="Validform_label" style="display: none;">员工类型</label>
  335. </td>
  336. </tr>
  337. <%--<tr>
  338. <td align="right">
  339. <label class="Validform_label">
  340. <span color="red" class="requiredIcon">*</span>是否自动转正:
  341. </label>
  342. </td>
  343. <td class="value">
  344. <input type="checkbox" id='autoCorrectionYes' name='autoCorrectionYes' onClick="autoCorrectionYesOnClick()"><span>是</span>
  345. <input type="checkbox" id='autoCorrectionNo' name='autoCorrectionNo' onClick="autoCorrectionNoOnClick()"><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. <t:dictSelect field="trialPeriod" id="trialPeriod" type="list" typeGroupCode="shiyongqi" datatype="*" defaultVal="${personnelInfo.trialPeriod}" hasLabel="false" title="试用期限"></t:dictSelect>
  356. <span class="Validform_checktip"></span>
  357. <label class="Validform_label" style="display: none;">试用期限</label>
  358. </td>
  359. </tr>
  360. <%--<tr>
  361. <td align="right">
  362. <label class="Validform_label">
  363. <span color="red" class="requiredIcon">*</span>是否为缴金人员:
  364. </label>
  365. </td>
  366. <td class="value">
  367. <input type="checkbox" id='ifpaymentYes' name='ifpaymentYes' onClick="ifpaymentYesOnClick()"><span>是</span>
  368. <input type="checkbox" id='ifpaymentNo' name='ifpaymentNo' onClick="ifpaymentNoOnClick()"><span>否</span>
  369. </td>
  370. </tr>
  371. <tr>
  372. <td align="right">
  373. <label class="Validform_label">
  374. <span color="red" class="requiredIcon">*</span>管理类型:
  375. </label>
  376. </td>
  377. <td class="value">
  378. <t:dictSelect field="managerType" id="managerType" type="list" typeGroupCode="manageType" datatype="*" defaultVal="${personnelInfo.managerType}" hasLabel="false" title="管理类型"></t:dictSelect>
  379. <span class="Validform_checktip"></span>
  380. <label class="Validform_label" style="display: none;">管理类型</label>
  381. </td>
  382. </tr>--%>
  383. <tr>
  384. <td height="50px" align="center" colspan="4" >
  385. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">保存</a>
  386. <%--<a style="margin-left:6px;" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-reload" onclick="dataReload()">重置</a>
  387. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-return" onclick="backOnClick()">返回</a>--%>
  388. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  389. </td>
  390. </tr>
  391. </table>
  392. </t:formvalid>
  393. </div>
  394. </div>
  395. </body>
  396. <script src = "webpage/cn/com/lzt/personnelbasearchivesmanage/personnelBaseArchivesManage.js"></script>
  397. </html>