staffInfo.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib uri="http://fzywtx.com/jsp/yw/yr" prefix="yr"%>
  4. <%@ taglib uri="http://fzywtx.com/jsp/yw/select" prefix="l"%>
  5. <form id="editForm" action="" method='post'>
  6. <script type="text/javascript">
  7. var old_tabid = "${tabid}";
  8. $(function() {
  9. loadingShow();
  10. addFlowDept();
  11. bindDept();
  12. loadingHide();
  13. loadPosition();
  14. });
  15. function loadPosition(){
  16. var ids = document.getElementsByName("branch_company_id");
  17. for ( var i = 0; i < ids.length; i++) {
  18. sendAsyncAjax({"deptId":ids[i].value,"idi":i}, "PositionAction.do?task=positionTree&time="+ new Date().getTime(), "json", function (data){
  19. for ( var j = 0; j < data.length; j++) {
  20. $("#otherposname_"+data[j].idi).append( "<option value='"+data[j].eu_pos_id+"'>"+data[j].text+"</option>" );
  21. }
  22. var positionId = $("#positionId_"+data[0].idi).val();
  23. $("#otherposname_"+data[0].idi).find("option[value='"+positionId+"']").attr("selected",true);
  24. });
  25. }
  26. }
  27. function openGroups(e){
  28. var n = $(e).attr("id");
  29. var i = $(e).next().attr("id");
  30. var sel = $(e).next().next().attr("id");
  31. openTypeTree("selectGroup",{type:"deptsingle",tab:"1",backId:i,backName:n,okpress:function (id,name){
  32. $("#"+n).val(name);
  33. $("#"+i).val(id);
  34. if("" != id){
  35. sendAsyncAjax({"deptId":id}, "PositionAction.do?task=positionTree&time="+ new Date().getTime(), "json", function (data){
  36. $("#"+sel).empty(); //清空下拉框
  37. $("#"+sel).append("<option value=''>--请选择--</option>");
  38. for ( var i = 0; i < data.length; i++) {
  39. $("#"+sel).append( "<option value='"+data[i].eu_pos_id+"'>"+data[i].text+"</option>" );
  40. }
  41. });
  42. }else{
  43. $("#"+sel).empty(); //清空下拉框
  44. $("#"+sel).append("<option value=''>--请选择--</option>");
  45. }
  46. }
  47. });
  48. }
  49. function isRelacePos(e){
  50. var v = $(e).val();
  51. var posSelect = $(e).next().next();
  52. if(v == ''||v==undefined){
  53. $(posSelect).prepend("<option value='' selected='selected'>--请选择--</option>");
  54. $(posSelect).get(0).options[0].selected = true;
  55. }else{
  56. $("option[value='']",posSelect).remove();
  57. }
  58. }
  59. function addFlowDept(){
  60. $("select[name='branch_company_id']").each(function(){
  61. var id = this.id;
  62. $(this).val(id);
  63. });
  64. }
  65. function bindDept(){
  66. $(".add a").bind("click",function(){
  67. var o = $(this).parent().parent();
  68. addOtherDept(o);
  69. });
  70. $(".del a").bind("click",function(){
  71. delOtherDept(this);
  72. });
  73. }
  74. function addOtherDept(o){
  75. var deptPosition = $(".dept-position").clone();
  76. var len = $(".dept-position-remove").length+1;
  77. $(".error_msg",deptPosition).remove();
  78. $(deptPosition).addClass("dept-position-remove");
  79. $(deptPosition).removeClass("inputError");
  80. $(deptPosition).attr("id","dept-position"+len);
  81. $("#name_0",deptPosition).attr("id","name_"+len);
  82. $("#gid_0",deptPosition).attr("id","gid_"+len);
  83. $("#otherposname_0",deptPosition).attr("id","otherposname_"+len);
  84. //$("select",deptPosition).each(function(){
  85. //$(this).get(0).options[0].selected = true;
  86. //});
  87. $(deptPosition).removeClass("dept-position");
  88. $(".add a",deptPosition).html("删除");
  89. $(".add a",deptPosition).unbind("click");
  90. $(".add a",deptPosition).bind("click",function(){
  91. delOtherDept(this);
  92. });
  93. $(".add",deptPosition).removeClass("add");
  94. $(".add",deptPosition).addClass("del");
  95. $("[name='isFollow']",deptPosition).attr("checked",false);
  96. $("[name='isLogin']",deptPosition).attr("checked",false);
  97. $(o).parent().append(deptPosition);
  98. }
  99. function delOtherDept(e){
  100. $(e).parent().parent().remove();
  101. }
  102. </script>
  103. <div class="notice-msg" id="noticeMsg"></div>
  104. <div class="forum-container">
  105. <center>
  106. <table class="l-table-edit line">
  107. <tr>
  108. <td colspan="5">
  109. <input name="selectGroup" type="hidden" id="selectGroup"/>
  110. <input type="button" id="subBtu" class="l-button" value="保存" onclick="submitStaff();"/>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td colspan="1">
  115. <input type="hidden" name="old_is_active_eu" id="old_is_active_eu" value="${staff.is_active_eu }" />
  116. <input type="checkbox" id="checkbox_active" name="checkbox_active" <c:if test="${empty checked}">onclick="checkUserName()"</c:if><c:if test="${not empty checked}">checked="checked"</c:if>>&nbsp;&nbsp;<c:if test="${not empty checked}">修改</c:if><c:if test="${empty checked}">激活</c:if>至EU平台
  117. </td>
  118. <td colspan="4"><input type="text" id="username" name="username" style="display: none;" onblur="checkuserhide('is_username')" value="${staff.username}"/><div id="staff_name_div">${staff.username}</div>
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>工号<FONT COLOR="red">*</FONT>:</td>
  123. <td>
  124. <input type="text" id="job_number" name="job_number" value="${staff.job_number }" maxlength="15">
  125. <span id="jobNumSpan"></span>
  126. <input type="hidden" name="jobNumCheck" id="jobNumCheck" value="" >
  127. </td>
  128. <td>档案号:</td>
  129. <td><input type="text" id="file_num" name="file_num" value="${staff.file_num }"></td>
  130. <td rowspan="5" width="20%">
  131. <c:choose>
  132. <c:when test="${null==staff.staff_photo_path||staff.staff_photo_path=='' }">
  133. <img id="stuPic" alt="1寸照片" src="/shares/images/hr/job/man.png" width="150px;" height="200px;"><br>
  134. </c:when>
  135. <c:otherwise>
  136. <img id="stuPic" alt="1寸照片" src="${staff.staff_photo_path }" width="150px;" height="200px;"><br>
  137. </c:otherwise>
  138. </c:choose>
  139. 照片上传: <jsp:include page="/include/file.jsp">
  140. <jsp:param name="fieldName" value="staff_photo" />
  141. <jsp:param name="folder" value="hr/staff" />
  142. <jsp:param name="documentId" value="${staff.staff_photo}" />
  143. <jsp:param name="size" value="1" />
  144. <jsp:param name="isView" value="1" />
  145. <jsp:param name="isDelFile" value="1" />
  146. <jsp:param name="definedCss" value="" />
  147. <jsp:param name="imgViewId" value="stuPic" />
  148. </jsp:include>
  149. <input type="hidden" id="staff_photo_check" name="staff_photo_check">
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>考勤用户号<FONT COLOR="red">*</FONT>:</td>
  154. <td>
  155. <input type="text" id="att_user_id" name="att_user_id" value="${staff.att_user_id }">
  156. <span id="attUserNumSpan"></span>
  157. <input type="hidden" name="attUserNumCheck" id="attUserNumCheck" value="" >
  158. </td>
  159. <td>班次:</td>
  160. <td>
  161. <select id="att_shit_id" name="att_shit_id" class="short-text">
  162. <option value="" selected="selected">--请选择--</option>
  163. <c:forEach items="${listAttendanceShift}" var="attendanceShift">
  164. <option value="${attendanceShift.shift_id }" ${staff.att_shit_id==attendanceShift.shift_id?"selected":"" }>${attendanceShift.shift_name }</option>
  165. </c:forEach>
  166. </select>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td>姓名<FONT COLOR="red">*</FONT>:
  171. </td>
  172. <td><input type="text" id="staff_name" name="staff_name" <c:if test="${empty checked}">onblur="checkUserName()"</c:if> value="${staff.staff_name }" maxlength="6"/></td>
  173. <td>性别:</td>
  174. <td><select name="staff_sex" id="staff_sex">
  175. <c:forEach var="listSex" items="${listStaffSex}">
  176. <c:choose>
  177. <c:when
  178. test="${listSex.data_id eq staff.staff_sex}">
  179. <option value="${listSex.data_id }" selected="selected">${listSex.value_name}</option>
  180. </c:when>
  181. <c:otherwise>
  182. <option value="${listSex.data_id }">${listSex.value_name}</option>
  183. </c:otherwise>
  184. </c:choose>
  185. </c:forEach>
  186. </select>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td>民族:</td>
  191. <td><input type="text" id="ethnic_group"
  192. name="ethnic_group" value="${staff.ethnic_group}"></td>
  193. <td>出生日期:</td>
  194. <td><input type="text" id="staff_birthday"
  195. name="staff_birthday"
  196. value="${staff.staff_birthday}"></td>
  197. </tr>
  198. <tr>
  199. <td>血型:</td>
  200. <td><input type="text" id="blood_type" name="blood_type"
  201. value="${staff.blood_type }"></td>
  202. <td>身高:</td>
  203. <td><input type="text" id="body_height" name="body_height"
  204. value="${staff.body_height }"></td>
  205. </tr>
  206. <tr>
  207. <td>体重:</td>
  208. <td><input type="text" id="body_weight" name="body_weight"
  209. value="${staff.body_weight }"></td>
  210. <td>婚姻状况:</td>
  211. <td colspan="2"><select name="marital_status" id="marital_status">
  212. <c:forEach var="listMaritalStatus" items="${listMaritalStatus}">
  213. <c:choose>
  214. <c:when test="${listMaritalStatus.data_id eq staff.marital_status}">
  215. <option value="${listMaritalStatus.data_id }" selected="selected">${listMaritalStatus.value_name}</option>
  216. </c:when>
  217. <c:otherwise>
  218. <option value="${listMaritalStatus.data_id }">${listMaritalStatus.value_name}</option>
  219. </c:otherwise>
  220. </c:choose>
  221. </c:forEach>
  222. </select>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td>是否党员:</td>
  227. <td>
  228. <select name="is_party" id="is_party">
  229. <option value="0" <c:if test="${staff.is_party == '0' }">selected="selected"</c:if> >否</option>
  230. <option value="1" <c:if test="${staff.is_party == '1' }">selected="selected"</c:if> >是</option>
  231. </select>
  232. </td>
  233. <td>政治面貌:</td>
  234. <td colspan="2"><input type="text" id="political_landscape"
  235. name="political_landscape"
  236. value="${staff.political_landscape }"></td>
  237. </tr>
  238. <tr>
  239. <td>籍贯:</td>
  240. <td><input type="text" id="native" name="native"
  241. value="${staff._native }"></td>
  242. <td><yr:pr text="${pr.eu_org_dept_other}"/><FONT COLOR="red">*</FONT>:</td>
  243. <td colspan="2">
  244. <c:if test="${empty followGroups}">
  245. <div class="dept-position" id="dept-position" style="padding-top:2px;padding-bottom:2px;">
  246. <span><input type="radio" name="isFollow" value="1" checked/>主岗</span>
  247. <span><input type="radio" name="isLogin" value="1" checked/>默认登录</span>
  248. <input type="text" value="${fromGroup.groupName}" name="branch_company_name" id="name_0" onclick="openGroups(this)" onchange="isRelacePos(this)" readonly="readonly"/>
  249. <input type="hidden" value="${fromGroup.id}" class="formselect" name="branch_company_id" id="gid_0"/>
  250. <!-- field:列表名 name:下拉框名称 table:表名 value:列表值 current:当前值-->
  251. <%-- <c:if test="${session.loginID eq '1' }"> --%>
  252. <%-- <l:select require="false" field="posname" name="otherposname" table="t_position" value="universalid" current=""/> --%>
  253. <%-- </c:if> --%>
  254. <%-- <c:if test="${session.loginID ne '1' }"> --%>
  255. <%-- <l:select filter=" unit=${session.unit.id}" require="false" field="posname" name="otherposname" table="t_position" value="universalid" current=""/> --%>
  256. <%-- </c:if> --%>
  257. <select name="otherposname" id="otherposname_0">
  258. <option value="">--请选择--</option>
  259. </select>
  260. <span class="add"><a href='#'>增加</a></span>
  261. </div>
  262. </c:if>
  263. <c:if test="${not empty followGroups}">
  264. <c:forEach items="${followGroups}" var="follow" varStatus="i">
  265. <div id="dept-position${i.index}" class="${i.index==0?'dept-position':'dept-position-remove'}" style="padding-top:2px;padding-bottom:2px;">
  266. <c:if test="${follow.type eq '1'}">
  267. <span><input type="radio" name="isFollow" value="${follow.groupID}_${follow.positionId}" checked/>主岗</span>
  268. </c:if>
  269. <c:if test="${follow.type ne '1'}">
  270. <span><input type="radio" name="isFollow" value="${follow.groupID}_${follow.positionId}"/>主岗</span>
  271. </c:if>
  272. <c:if test="${follow.isLogin eq '1'}">
  273. <span><input type="radio" name="isLogin" value="${follow.groupID}_${follow.positionId}" checked/>默认登录</span>
  274. </c:if>
  275. <c:if test="${follow.isLogin ne '1'}">
  276. <span><input type="radio" name="isLogin" value="${follow.groupID}_${follow.positionId}"/>默认登录</span>
  277. </c:if>
  278. <input type="text" value="${follow.groupName}" name="branch_company_name" id="name_${i.index}" onclick="openGroups(this)" onchange="isRelacePos(this)" readonly="readonly"/>
  279. <input type="hidden" value="${follow.groupID}" class="formselect" name="branch_company_id" id="gid_${i.index}"/>
  280. <!-- field:列表名 name:下拉框名称 table:表名 value:列表值 current:当前值-->
  281. <%-- <c:if test="${session.loginID eq '1' }"> --%>
  282. <%-- <l:select require="false" field="posname" name="otherposname" table="t_position" value="universalid" current="${follow.positionId}"/> --%>
  283. <%-- </c:if> --%>
  284. <%-- <c:if test="${session.loginID ne '1' }"> --%>
  285. <%-- <l:select filter=" unit=${session.unit.id}" require="false" field="posname" name="otherposname" table="t_position" value="universalid" current="${follow.positionId}"/> --%>
  286. <%-- </c:if> --%>
  287. <select name="otherposname" id="otherposname_${i.index}">
  288. <option value="">--请选择--</option>
  289. </select>
  290. <input type="hidden" id="positionId_${i.index}" value="${follow.positionId}">
  291. <c:if test="${i.index>0}">
  292. <span class="del"><a href='#'>删除</a></span>
  293. </c:if>
  294. <c:if test="${i.index==0}">
  295. <span class="add"><a href='#'>增加</a></span>
  296. </c:if>
  297. </div>
  298. </c:forEach>
  299. </c:if>
  300. </td>
  301. </tr>
  302. <tr>
  303. <td>身份证号码<FONT COLOR="red">*</FONT>:</td>
  304. <td>
  305. <input type="text" id="id_number"
  306. name="id_number" value="${staff.id_number }" onblur="checkIdNumber(this);" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="18" >
  307. <div id="id_number_div"></div>
  308. </td>
  309. <td>户口性质:</td>
  310. <td colspan="2"><input type="text" id="anmelden_pro" name="anmelden_pro" value="${staff.anmelden_pro }"></td>
  311. </tr>
  312. <tr>
  313. <td>职称:</td>
  314. <td><input type="text" id="job_title"
  315. name="job_title" value="${staff.job_title }"
  316. size="50"></td>
  317. <td>家庭住址:</td>
  318. <td colspan="2"><input type="text" id="census_address"
  319. name="census_address"
  320. value="${staff.census_address }" size="50"></td>
  321. </tr>
  322. <tr>
  323. <td>现住址:</td>
  324. <td><input type="text" id="home_address"
  325. name="home_address" value="${staff.home_address }"
  326. size="50"></td>
  327. <td>手机号:</td>
  328. <td colspan="2"><input type="text" id="self_phone"
  329. name="self_phone" value="${staff.self_phone }"
  330. size="50"></td>
  331. </tr>
  332. <tr>
  333. <td>入司日期:</td>
  334. <td><input type="text" id="register_time"
  335. name="register_time"
  336. value="${staff.register_time}"></td>
  337. <td>劳动合同有效期至:</td>
  338. <td colspan="2"><input type="text" id="agreement_time"
  339. name="agreement_time"
  340. value="${staff.agreement_time}"></td>
  341. </tr>
  342. <tr>
  343. <td>社保起始日期:</td>
  344. <td><input type="text" id="social_time"
  345. name="social_time" value="${staff.social_time}"></td>
  346. <td>医保起始日期:</td>
  347. <td colspan="2"><input type="text" id="health_time"
  348. name="health_time" value="${staff.health_time}"></td>
  349. </tr>
  350. <tr>
  351. <td>住房公积金起始日期:</td>
  352. <td><input type="text" id="fund_time"
  353. name="fund_time" value="${staff.fund_time }"></td>
  354. <td>工种:</td>
  355. <td colspan="2">
  356. <select id="craft_type" name="craft_type" class="short-text">
  357. <option value="0" selected="selected">==请选择==</option>
  358. <c:forEach items="${crafttype }" var="craft">
  359. <option value="${craft.dvalue }" ${staff.craft_type == craft.dvalue?"selected":"" }>${craft.dname }</option>
  360. </c:forEach>
  361. </select>
  362. </td>
  363. </tr>
  364. <tr>
  365. <td>联系人:</td>
  366. <td><input type="text" id="contact_person"
  367. name="contact_person"
  368. value="${staff.contact_person }"></td>
  369. <td>联系电话:</td>
  370. <td colspan="2"><input type="text"
  371. id="contact_person_phone" name="contact_person_phone"
  372. value="${staff.contact_person_phone }"></td>
  373. </tr>
  374. <tr>
  375. <td>身份证附件:</td>
  376. <td colspan="4"><input type="hidden" id="id_number_affix"
  377. name="id_number_affix"> <jsp:include
  378. page="/include/file.jsp">
  379. <jsp:param name="fieldName" value="sfzDocumentId" />
  380. <jsp:param name="folder" value="hr/staff" />
  381. <jsp:param name="documentId" value="${staff.id_number_affix}" />
  382. <jsp:param name="size" value="5" />
  383. <jsp:param name="isView" value="1" />
  384. <jsp:param name="isDelFile" value="1" />
  385. <jsp:param name="definedCss" value="file-style" />
  386. </jsp:include></td>
  387. </tr>
  388. <tr>
  389. <td>合同附件:</td>
  390. <td colspan="4"><input type="hidden" id="agreement_affix"
  391. name="agreement_affix"> <jsp:include
  392. page="/include/file.jsp">
  393. <jsp:param name="fieldName" value="htDocumentId" />
  394. <jsp:param name="folder" value="hr/staff" />
  395. <jsp:param name="documentId" value="${staff.agreement_affix}" />
  396. <jsp:param name="size" value="30" />
  397. <jsp:param name="isView" value="1" />
  398. <jsp:param name="isDelFile" value="1" />
  399. <jsp:param name="definedCss" value="file-style" />
  400. </jsp:include></td>
  401. </tr>
  402. <input type="hidden" name="is_dimission" id="is_dimission" value="${staff.is_dimission}"/>
  403. </table>
  404. </center>
  405. </div>
  406. </form>