userInfo-check.jsp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  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. <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
  9. <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
  10. <script src="plug-in/layer/layer.js"></script>
  11. </head>
  12. <%--scroll="no"--%>
  13. <body>
  14. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tipSweep="true"
  15. action="personnelBaseArchivesManageController.do?updateUserData">
  16. <input id="id" name="id" type="hidden" value="${userInfo.id }">
  17. <table style="width: 600px; " cellpadding="0" cellspacing="1" class="formtable">
  18. <tr>
  19. <td align="right" width="25%" nowrap>
  20. <label class="Validform_label">员工工号: </label>
  21. </td>
  22. <td class="value" width="85%">
  23. <input id="userNum" class="inputxt" name="userNum" value="${userInfo.userNum }" readonly="readonly" datatype=""/>
  24. </td>
  25. </tr>
  26. <tr>
  27. <td align="right" width="10%" nowrap>
  28. <label class="Validform_label">员工姓名: </label>
  29. </td>
  30. <td class="value" width="10%">
  31. <input id="realName" class="inputxt" name="realName" value="${userInfo.realName }" readonly="readonly" datatype="">
  32. </td>
  33. </tr>
  34. <tr>
  35. <td align="right">
  36. <label class="Validform_label">
  37. 附件照片:
  38. </label>
  39. </td>
  40. <td class="value">
  41. <img src="${userInfo.image}"></img>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td align="right">
  46. <label class="Validform_label">性别: </label>
  47. </td>
  48. <td class="value">
  49. <t:dictSelect field="gender" id="gender" type="list" typeGroupCode="sex" defaultVal="${userInfo.gender}"
  50. hasLabel="false" datatype="" readonly="readonly" title="性别"></t:dictSelect>
  51. <span class="Validform_checktip"></span>
  52. <label class="Validform_label" style="display: none;">性别</label>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td align="right">
  57. <label class="Validform_label">民族: </label>
  58. </td>
  59. <td class="value">
  60. <t:dictSelect field="nation" id="nation" type="list" typeGroupCode="nation"
  61. defaultVal="${userInfo.nation == null ? 'hanzu' :userInfo.nation}" hasLabel="false"
  62. datatype="" readonly="readonly" title="民族"></t:dictSelect>
  63. <span class="Validform_checktip"></span>
  64. <label class="Validform_label" style="display: none;">民族</label>
  65. </td>
  66. </tr>
  67. <tr>
  68. <td align="right" nowrap>
  69. <label class="Validform_label">手机号码: </label>
  70. </td>
  71. <td class="value">
  72. <input class="inputxt" name="mobilePhone" value="${userInfo.mobilePhone}" datatype=""
  73. readonly="readonly" userInfoValidType="t_s_user,mobilePhone,id">
  74. <span class="Validform_checktip"></span>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td align="right"><label class="Validform_label"> 座机号码: </label></td>
  79. <td class="value">
  80. <input class="inputxt" name="officePhone" value="${userInfo.officePhone}" datatype=""
  81. readonly="readonly" ignore="ignore">
  82. <span class="Validform_checktip"></span>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td align="right"><label class="Validform_label"> 紧急联系人: </label></td>
  87. <td class="value">
  88. <input class="inputxt" name="contacts" value="${userInfo.contacts}" readonly="readonly" ignore="ignore">
  89. <span class="Validform_checktip"></span>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td align="right"><label class="Validform_label"> 紧急联系人电话: </label></td>
  94. <td class="value">
  95. <input class="inputxt" name="contactsPhone" value="${userInfo.contactsPhone}" datatype=""
  96. readonly="readonly" ignore="ignore">
  97. <span class="Validform_checktip"></span>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td align="right">
  102. <label class="Validform_label">身份证号码: </label>
  103. </td>
  104. <td class="value">
  105. <%-- datatype=idcard--%>
  106. <input id="idcard" name="idcard" type="text" onfocusout="getBirthdayFromIdCard(this)"
  107. style="width: 149px" userInfoValidType="t_s_user,idcard,id" value='${userInfo.idcard}'
  108. placeholder="" datatype="" readonly="readonly"/>
  109. <span class="Validform_checktip"></span>
  110. <label class="Validform_label" style="display: none;">身份证号码</label>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td align="right">
  115. <label class="Validform_label">出生日期: </label>
  116. </td>
  117. <td class="value">
  118. <input id="birthday" name="birthday" type="hidden" value='${userInfo.birthday}'/>
  119. <%-- class="Wdate" datatype="date" --%>
  120. <input id="birthday2" name="birthday2" type="text" disabled style="width: 149px" readonly="readonly"
  121. value='<fmt:formatDate value='${userInfo.birthday}' type="date" pattern="yyyy-MM-dd"/>'/>
  122. <label class="Validform_label" style="display: none;">出生日期</label>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td align="right">
  127. <label class="Validform_label">年龄: </label>
  128. </td>
  129. <td class="value">
  130. <input id="age" name="age" type="hidden" value='${userInfo.age}'/>
  131. <input id="age2" name="age2" type="text" style="width: 149px" readonly="readonly" disabled value='${userInfo.age}'/>
  132. <label class="Validform_label" style="display: none;">年龄</label>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td align="right">
  137. <label class="Validform_label">户籍地址: </label>
  138. </td>
  139. <td class="value">
  140. <input id="hkaddress" name="hkaddress" type="text" style="width: 200px" value='${userInfo.hkaddress}' readonly="readonly"
  141. placeholder="" datatype="" ignore="ignore" />
  142. <span class="Validform_checktip"></span>
  143. <label class="Validform_label" style="display: none;">户籍地址</label>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td align="right">
  148. <label class="Validform_label">户籍类别: </label>
  149. </td>
  150. <td class="value">
  151. <t:dictSelect field="hktype" id="hktype" type="list" typeGroupCode="hktype"
  152. defaultVal="${userInfo.hktype}" hasLabel="false" readonly="readonly" datatype="" title="户籍类别"></t:dictSelect>
  153. <span class="Validform_checktip"></span>
  154. <label class="Validform_label" style="display: none;">户籍类别</label>
  155. </td>
  156. </tr>
  157. <tr>
  158. <td align="right">
  159. <label class="Validform_label">居住地址: </label>
  160. </td>
  161. <td class="value">
  162. <input id="address" name="address" type="text" style="width: 200px" value='${userInfo.address}'
  163. placeholder="" datatype="" ignore="ignore" readonly="readonly"/>
  164. <span class="Validform_checktip"></span>
  165. <label class="Validform_label" style="display: none;">居住地址</label>
  166. </td>
  167. </tr>
  168. <!-- 所属部门 start -->
  169. <tr>
  170. <td align="right">
  171. <label class="Validform_label">所属部门: </label>
  172. </td>
  173. <td class="value">
  174. <input id="departname" name="departname" type="text" readonly="readonly" class="inputxt"
  175. onclick="openDepartmentSelect()"
  176. readonly="readonly" datatype="" value="${departname}">
  177. <input id="orgIds" name="orgIds" type="hidden" value="${orgIds}">
  178. </td>
  179. </tr>
  180. <!-- 所属部门 end -->
  181. <tr>
  182. <td align="right">
  183. <label class="Validform_label">设备编号: </label>
  184. </td>
  185. <td class="value">
  186. <input id="deviceId" name="deviceId" type="text" style="width: 200px" value='${userInfo.deviceId}'
  187. placeholder="" ignore="ignore" readonly="readonly"/>
  188. <span class="Validform_checktip"></span>
  189. <label class="Validform_label" style="display: none;">设备编号</label>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td align="right">
  194. <label class="Validform_label">职务:</label>
  195. </td>
  196. <td class="value">
  197. <input id="dutiesId" name="dutiesId" type="hidden" datatype="" value="${userInfo.dutiesId}">
  198. <input id="dutiesName" name="dutiesName" type="text" style="width: 150px" ignore="ignore"
  199. onclick="openDutiesSelect()" value='${dutiesName}' readonly="readonly"/>
  200. <span class="Validform_checktip"></span>
  201. <label class="Validform_label" style="display: none;">职务</label>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td align="right">
  206. <label class="Validform_label">岗位:</label>
  207. </td>
  208. <td class="value">
  209. <input id="postId" name="postId" type="hidden" datatype="" value='${userInfo.postId}'/>
  210. <input id="postName" name="postName" type="text" style="width: 150px" ignore="ignore"
  211. onclick="openPostSelect()" value='${postName}' readonly="readonly"/>
  212. <span class="Validform_checktip"></span>
  213. <label class="Validform_label" style="display: none;">岗位</label>
  214. </td>
  215. </tr>
  216. <tr>
  217. <td align="right">
  218. <label class="Validform_label">政治面貌</label>
  219. </td>
  220. <td class="value">
  221. <t:dictSelect field="outlook" id="outlook" type="list" typeGroupCode="outLook" hasLabel="false" datatype="" title="政治面貌" defaultVal="${userInfo.outlook}" readonly="readonly"></t:dictSelect>
  222. <span class="Validform_checktip"></span>
  223. <label class="Validform_label" style="display: none;">政治面貌</label>
  224. </td>
  225. </tr>
  226. <tr>
  227. <td align="right">
  228. <label class="Validform_label">学历</label>
  229. </td>
  230. <td class="value">
  231. <t:dictSelect field="education" id="education" type="list" typeGroupCode="education" hasLabel="false" datatype="" title="学历" defaultVal="${userInfo.education}" readonly="readonly"></t:dictSelect>
  232. <span class="Validform_checktip"></span>
  233. <label class="Validform_label" style="display: none;">学历</label>
  234. </td>
  235. </tr>
  236. <tr>
  237. <td align="right">
  238. <label class="Validform_label">员工性质</label>
  239. </td>
  240. <td class="value">
  241. <t:dictSelect field="nature" id="nature" type="list" typeGroupCode="nature" hasLabel="false" datatype="" title="员工性质" defaultVal="${userInfo.nature}" readonly="readonly"></t:dictSelect>
  242. <span class="Validform_checktip"></span>
  243. <label class="Validform_label" style="display: none;">员工性质</label>
  244. </td>
  245. </tr>
  246. <tr>
  247. <td align="right"><label class="Validform_label">邮箱: </label></td>
  248. <td class="value">
  249. <input class="inputxt" name="email" value="${userInfo.email}" ignore="ignore" readonly="readonly" />
  250. <span class="Validform_checktip"></span>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td align="right">
  255. <label class="Validform_label">入职日期: </label>
  256. </td>
  257. <td class="value">
  258. <input id="employmentDate" name="employmentDate" type="text" class="inputxt" style="width: 149px" value="${userInfo.employmentDate}" readonly="readonly"
  259. />
  260. <span class="Validform_checktip"></span>
  261. <label class="Validform_label" style="display: none;">入职日期</label>
  262. </td>
  263. </tr>
  264. <tr>
  265. <td align="right">
  266. <label class="Validform_label">是否登录系统:</label>
  267. </td>
  268. <td class="value">
  269. <t:dictSelect field="userType" id="userType" type="list" typeGroupCode="userType" readonly="readonly"
  270. defaultVal="${userInfo.userType}" hasLabel="false" datatype=""
  271. title="员工登录类型"></t:dictSelect>
  272. <span class="Validform_checktip"></span>
  273. <label class="Validform_label" style="display: none;">是否登录系统</label>
  274. </td>
  275. </tr>
  276. <tr style="display: none">
  277. <td align="right"><label class="Validform_label"> <t:mutiLang langKey="common.common.dev"/>: </label></td>
  278. <td class="value">
  279. <c:if test="${userInfo.devFlag == null || userInfo.devFlag == ''}">
  280. <t:dictSelect id="devFlag" field="devFlag" typeGroupCode="dev_flag" hasLabel="false" datatype=""
  281. defaultVal="0" type="radio"></t:dictSelect>
  282. </c:if>
  283. <c:if test="${userInfo.devFlag != null && userInfo.devFlag != ''}">
  284. <t:dictSelect id="devFlag" field="devFlag" typeGroupCode="dev_flag" hasLabel="false" datatype=""
  285. defaultVal="${userInfo.devFlag}" type="radio"></t:dictSelect>
  286. </c:if>
  287. <span class="Validform_checktip"></span>
  288. </td>
  289. </tr>
  290. <tr style="display: none">
  291. <td align="right">
  292. <label class="Validform_label">
  293. 工作流引擎:
  294. </label>
  295. </td>
  296. <td class="value">
  297. <c:if test="${userInfo.activitiSync == null || userInfo.activitiSync == ''}">
  298. <input name="activitiSync" type="radio" datatype="" min="1" value="1" checked="checked">
  299. 同步
  300. <input name="activitiSync" type="radio" value="0">
  301. 不同步
  302. <span class="Validform_checktip">是否同步工作流引擎</span>
  303. </c:if>
  304. <c:if test="${userInfo.activitiSync != null && userInfo.activitiSync != ''}">
  305. <input name="activitiSync" type="radio" datatype="" min="1"
  306. <c:if test="${userInfo.activitiSync eq 1}">checked="true"</c:if> value="1">
  307. 同步
  308. <input name="activitiSync" type="radio"
  309. <c:if test="${userInfo.activitiSync eq 0}">checked="true"</c:if> value="0">
  310. 不同步
  311. <span class="Validform_checktip">是否同步工作流引擎</span>
  312. </c:if>
  313. </td>
  314. </tr>
  315. </table>
  316. </t:formvalid>
  317. </body>
  318. <script>
  319. function uploadSucc(response) {
  320. if (response.success) {
  321. $('#imgUrl').val(response.attributes.url);
  322. console.log(response.attributes.url);
  323. }
  324. }
  325. $(function () {
  326. $("input[name='birthday']").attr("class", "Wdate").click(function () {
  327. WdatePicker({dateFmt: 'yyyy-MM-dd'});
  328. });
  329. // $(":input[name='birthday']").css("width","150px");
  330. // $("input[name='employmentDate']").attr("class", "Wdate").click(function () {
  331. // WdatePicker({dateFmt: 'yyyy-MM-dd'});
  332. // });
  333. })
  334. function openDepartmentSelect() {
  335. //--author:zhaohualong-----start----date: 2018年1月11日--------for:新代码------
  336. //*****************************
  337. //update-by yulong.zhao 17-12-14 按照choose标签生成代码进行修改原来js
  338. var windowapi;
  339. try {
  340. windowapi = frameElement.api, W = windowapi.opener;
  341. } catch (e) {
  342. }
  343. //$.dialog.setting.zIndex = getzIndex();
  344. var orgIds = $("#orgIds").val();
  345. if (typeof (windowapi) == 'undefined') {
  346. $.dialog({
  347. content: 'url:departController.do?departSelect&orgIds=' + orgIds,
  348. zIndex: getzIndex(),
  349. title: '所属部门列表',
  350. lock: true,
  351. width: '400px',
  352. height: '350px',
  353. opacity: 0.4,
  354. button: [
  355. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  356. //update-by yulong.zhao 改为function中调用close方法否则多层弹出框,遮罩效果会关闭一个窗口后消失
  357. //{name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  358. {
  359. name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
  360. close();
  361. }
  362. }
  363. ]
  364. })
  365. } else {
  366. $.dialog({
  367. content: 'url:departController.do?departSelect&orgIds=' + orgIds,
  368. zIndex: getzIndex(),
  369. title: '所属部门列表',
  370. lock: true,
  371. parent: windowapi,
  372. width: '400px',
  373. height: '350px',
  374. opacity: 0.4,
  375. button: [
  376. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  377. //update-by yulong.zhao 改为function中调用close方法否则多层弹出框,遮罩效果会关闭一个窗口后消失
  378. //{name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  379. {
  380. name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
  381. close();
  382. }
  383. }
  384. ]
  385. }).zindex();
  386. }
  387. //*****************************
  388. //--author:zhaohualong-----end----date: 2018年1月11日--------for:新代码------
  389. //--author:zhaohualong-----start----date: 2018年1月11日--------for:原代码------
  390. //================================
  391. /* $.dialog.setting.zIndex = getzIndex();
  392. var orgIds = $("#orgIds").val();
  393. $.dialog({content: 'url:departController.do?departSelect&orgIds='+orgIds, zIndex: 3101, title: '所属部门列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  394. {name: '
  395. <t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelect, focus: true},
  396. {name: '
  397. <t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  398. ]}).zindex(); */
  399. }
  400. function callbackDepartmentSelect() {
  401. var iframe = this.iframe.contentWindow;
  402. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  403. var nodes = treeObj.getCheckedNodes(true);
  404. if (nodes.length > 0) {
  405. var ids = '', names = '';
  406. for (i = 0; i < nodes.length; i++) {
  407. var node = nodes[i];
  408. ids += node.id + ',';
  409. names += node.name + ',';
  410. }
  411. // 把最后的逗号去掉
  412. names = names.substring(0, names.length - 1);
  413. //判断兼容机构里有没有所属机构
  414. // if(ids.length>0 && $('#jzorgIds').val().length>0){
  415. // if($('#jzorgIds').val().indexOf(ids)>=0){
  416. // //console.info("ids:"+ids);
  417. // //console.info("orgIds:"+$('#orgIds').val());
  418. // $.messager.alert("错误","所属部门和兼容机构不能有重叠!!");
  419. // }else{
  420. // $('#departname').val(names);
  421. // $('#departname').blur();
  422. // $('#orgIds').val(ids);
  423. // }
  424. // }else{
  425. $('#departname').val(names);
  426. $('#departname').blur();
  427. $('#orgIds').val(ids);
  428. // }
  429. }
  430. }
  431. function callbackClean() {
  432. $('#departname').val('');
  433. $('#orgIds').val('');
  434. }
  435. $(function () {
  436. $("#departname").prev().hide();
  437. $("#jzdepartname").prev().hide();
  438. });
  439. //兼职机构 start
  440. function openDepartmentSelectjz() {
  441. /**
  442. $.dialog.setting.zIndex = getzIndex();
  443. var jzorgIds = $("#jzorgIds").val();
  444. $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: 3100, title: '兼职机构列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  445. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
  446. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  447. ]}).zindex();
  448. */
  449. // var windowapi;
  450. // try {
  451. // windowapi = frameElement.api, W = windowapi.opener;
  452. // } catch (e) {
  453. // }
  454. // var jzorgIds = $("#jzorgIds").val();
  455. // if(typeof(windowapi) == 'undefined'){
  456. // $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: getzIndex(), title: '兼职机构列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  457. // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
  458. // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){close();}}
  459. // ]})
  460. // }else{
  461. // $.dialog({content: 'url:departController.do?jzdepartSelect&jzorgIds='+jzorgIds, zIndex: getzIndex(), title: '兼职机构列表', lock: true, parent : windowapi, width: '400px', height: '350px', opacity: 0.4,button: [
  462. // {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
  463. // {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){close();}}
  464. // ]})
  465. // }
  466. var orgIds = $("#jzorgIds").val();
  467. $.dialog({
  468. content: 'url:dialogDealController.do?projectDepartTableAllCheckbox&ids=' + orgIds,
  469. zIndex: getzIndex(),
  470. title: '兼职项目列表',
  471. lock: true,
  472. width: '600px',
  473. height: '400px',
  474. opacity: 0.4,
  475. button: [
  476. {
  477. name: '<t:mutiLang langKey="common.confirm"/>', callback: function () {
  478. var iframe = this.iframe.contentWindow;
  479. if (iframe.getReason().length > 0) {
  480. var strData = eval(iframe.getReason());
  481. for (var key in strData[0]) {
  482. if (key == "strPId") {
  483. $("#jzorgIds").val(strData[0][key]);
  484. } else if (key == "strDepartName") {
  485. $("#jzdepartname").val(strData[0][key]);
  486. }
  487. }
  488. }
  489. }, focus: true
  490. },
  491. {
  492. name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
  493. // $('#jzdepartname').val('');
  494. // $('#jzorgIds').val('');
  495. }
  496. }
  497. ]
  498. }).zindex();
  499. }
  500. function callbackDepartmentSelectjz() {
  501. // var iframe = this.iframe.contentWindow;
  502. // var treeObj = iframe.$.fn.zTree.getZTreeObj("jzdepartSelect");
  503. // var nodes = treeObj.getCheckedNodes(true);
  504. // if(nodes.length>0){
  505. // var ids='',names='';
  506. // for(i=0;i<nodes.length;i++){
  507. // var node = nodes[i];
  508. // ids += node.id+',';
  509. // names += node.name+',';
  510. // }
  511. // // 把最后的逗号去掉
  512. // names = names.substring(0,names.length - 1);
  513. // //判断兼容机构里有没有所属机构
  514. // if(ids.length>0 && $('#orgIds').val().length>0){
  515. // if(ids.indexOf( $('#orgIds').val() )>=0){
  516. // //console.info("ids:"+ids);
  517. // //console.info("orgIds:"+$('#orgIds').val());
  518. // $.messager.alert("错误","所属部门和兼容机构不能有重叠!");
  519. // }else{
  520. // $('#jzdepartname').val(names);
  521. // $('#jzdepartname').blur();
  522. // $('#jzorgIds').val(ids);
  523. // }
  524. // }else{
  525. // $('#jzdepartname').val(names);
  526. // $('#jzdepartname').blur();
  527. // $('#jzorgIds').val(ids);
  528. // }
  529. // }
  530. }
  531. function callbackCleanjz() {
  532. $('#jzdepartname').val('');
  533. $('#jzorgIds').val('');
  534. }
  535. //兼职机构 end
  536. function contains(arr, obj) {
  537. var i = arr.length;
  538. while (i--) {
  539. if (arr[i] === obj) {
  540. return true;
  541. }
  542. }
  543. return false;
  544. }
  545. function beforeSubmitCheck() {
  546. // var jzorgIds = $('#jzorgIds').val();
  547. // var orgids = $('#orgIds').val();
  548. // if(jzorgIds.indexOf(orgids) != -1){
  549. // layer.alert("兼职机构不能包含主所属部门");
  550. // return false;
  551. // }
  552. return true;
  553. }
  554. // 职务选择
  555. function openDutiesSelect() {
  556. $.dialog.setting.zIndex = getzIndex();
  557. var orgIds = $("#orgIds").val();
  558. $.dialog({
  559. content: 'url:dutiesController.do?departSelect&orgIds=' + orgIds,
  560. zIndex: getzIndex(),
  561. title: '职务列表',
  562. lock: true,
  563. width: '400px',
  564. height: '350px',
  565. opacity: 0.4,
  566. button: [
  567. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDutiesSelect, focus: true},
  568. {
  569. name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
  570. }
  571. }
  572. ]
  573. }).zindex();
  574. }
  575. // 职务回调
  576. function callbackDutiesSelect() {
  577. var iframe = this.iframe.contentWindow;
  578. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  579. var nodes = treeObj.getCheckedNodes();
  580. // var nodes = treeObj.getSelectedNodes();
  581. // console.log(nodes);
  582. if (nodes.length > 0) {
  583. var ids = '', names = '';
  584. for (var i = 0; i < nodes.length; i++) {
  585. var node = nodes[i];
  586. ids += node.id + ',';
  587. names += node.name + ',';
  588. }
  589. ids = ids.substring(0, ids.length - 1);
  590. names = names.substring(0, names.length - 1);
  591. $("#dutiesName").val(names);
  592. $("#dutiesName").blur();
  593. $("#dutiesId").val(ids);
  594. }
  595. }
  596. function dutiesClean() {
  597. $("#dutiesId").val('');
  598. $("#dutiesName").val('');
  599. }
  600. //岗位选择
  601. function openPostSelect() {
  602. $.dialog.setting.zIndex = getzIndex();
  603. var orgIds = $("#orgIds").val();
  604. $.dialog({
  605. content: 'url:projectPostDetailController.do?postSelectNoCheckBox&orgIds=' + orgIds,
  606. zIndex: getzIndex(), title: '岗位列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  607. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackPostSelect, focus: true},
  608. {
  609. name: '<t:mutiLang langKey="common.cancel"/>', callback: function () {
  610. }
  611. }
  612. ]
  613. }).zindex();
  614. }
  615. // 岗位回调
  616. function callbackPostSelect() {
  617. var iframe = this.iframe.contentWindow;
  618. var treeObj = iframe.$.fn.zTree.getZTreeObj("postSelect");
  619. console.log(treeObj);
  620. var nodes = treeObj.getCheckedNodes(true);
  621. // var nodes = treeObj.getSelectedNodes(true);
  622. // console.log(nodes);
  623. if (nodes.length > 0) {
  624. var ids = '', names = '';
  625. for (i = 0; i < nodes.length; i++) {
  626. var node = nodes[i];
  627. ids += node.id + ',';
  628. names += node.name + ',';
  629. }
  630. ids = ids.substring(0, ids.length - 1);
  631. names = names.substring(0, names.length - 1);
  632. $("#postName").val(names);
  633. $("#postName").blur();
  634. $("#postId").val(ids);
  635. }
  636. }
  637. function postClean() {
  638. $("#postName").val('');
  639. $("#postId").val('');
  640. }
  641. function getBirthdayFromIdCard(t) {
  642. var idCard = $(t).val();
  643. var birthday = "";
  644. if (idCard != null && idCard != "") {
  645. if (idCard.length == 15) {
  646. birthday = "19" + idCard.substr(6, 6);
  647. } else if (idCard.length == 18) {
  648. birthday = idCard.substr(6, 8);
  649. }
  650. birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
  651. var age = idCard.substring(6,10);
  652. //获取当前年份
  653. var year = new Date().getFullYear();
  654. //获取月份
  655. var month = idCard.substring(10,12);
  656. //获取出生日
  657. var day = idCard.substring(12,14);
  658. document.getElementById("age").value = year - age;
  659. document.getElementById("age2").value = year - age;
  660. }
  661. $("#birthday").val(birthday);
  662. $("#birthday2").val(birthday);
  663. return birthday;
  664. }
  665. </script>
  666. </html>