userInfo-update.jsp 39 KB

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