person.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglibf.jsp"%>
  3. <!doctype html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>${fns:getConfig("productName")}</title>
  8. <link rel="stylesheet" type="text/css" href="${ctxStaticWeb}/css/base.css" />
  9. <link rel="stylesheet" type="text/css" href="${ctxStaticWeb}/css/new.css" />
  10. <%-- <script src="${ctx}/static/web/js/jquery-2.1.4.js"></script>
  11. <script src="${ctx}/static/plugin/layui/layer/layer.js"></script>
  12. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
  13. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/localization/messages_zh.min.js" type="text/javascript"></script>
  14. <!-- 引入layer插件,当做独立组件使用,不使用layui模块,该版本修复了chrome下花屏的bug -->
  15. <script src="${ctxStatic}/plugin/layui/layer/layer.js"></script>
  16. <script src="${ctxStatic}/plugin/layui/laytpl/laytpl.js"></script>
  17. <script src="${ctxStatic}/plugin/layui/dist/layui.js"></script>
  18. <link href="${ctxStatic}/plugin/layui/dist/css/layui.css" rel="stylesheet"/>
  19. <!-- 引入toastr -->
  20. <link rel="stylesheet" type="text/css" href="${ctxStatic}/plugin/toastr/toastr.css">
  21. <script type="text/javascript" src="${ctxStatic}/plugin/toastr/toastr.min.js"></script>
  22. <script src="${ctx}/static/common/js/jeeplus.js"></script>--%>
  23. <style>
  24. .grzx{ margin:60px}
  25. .grzx li{ line-height:30px; margin:10px 0px; width:100%}
  26. .grzx li span{ width:100px; text-align:right; display:inline-block}
  27. .grzx li textarea{ margin-left:100px; width:700px; height:200px}
  28. .grzx input{ line-height:30px; line-height:30px; padding:0px 10px;}
  29. .get{}
  30. .new_r{ margin-left:0px; margin-right:20px}
  31. .btnSign { height:35px; line-height:35px; width:25%;background-color:#820402; color:#fff; border:0px; margin:20px}
  32. #inputForm label.error
  33. {
  34. color:#cc5965;
  35. font-size:14px;
  36. margin-left:5px;
  37. padding-left:16px;
  38. font-weight: bold;
  39. }
  40. </style>
  41. <%@include file="/webpage/include/anihead.jsp" %>
  42. <script>
  43. $().ready(function() {
  44. //校验表单
  45. $("#inputForm").validate({
  46. debug: false,
  47. focusInvalid: true, //当为false时,验证无效时,没有焦点响应
  48. onkeyup: false,
  49. rules: {
  50. password: {
  51. required: true,
  52. minlength: 6,
  53. remote: "${ctxF}/talentPerson/validatePassword"
  54. },
  55. passwordAgain: {
  56. required: true,
  57. minlength: 6
  58. },
  59. passwordAgain1: {
  60. required: true,
  61. minlength: 6,
  62. equalTo: "#passwordAgain"
  63. }
  64. },
  65. messages: {
  66. password: {
  67. required: "请输入原密码",
  68. minlength: "原密码长度不能小于6位",
  69. remote:"原密码错误"
  70. },
  71. passwordAgain: {
  72. required: "请输入确认密码",
  73. minlength: "密码长度不能小于6位"
  74. },
  75. passwordAgain1: {
  76. required: "请输入确认密码",
  77. minlength: "密码长度不能小于6位",
  78. equalTo: "两次密码输入不一致"
  79. }
  80. },
  81. submitHandler:function(form){//这是关键的语句,配置这个参数后表单不会自动提交,验证通过之后会去调用的方法
  82. $.ajax({
  83. url:"${ctxF}/talentPerson/updatePassword",
  84. type:"POST",
  85. cache: false,
  86. data:$(form).serialize(),
  87. dataType:"json",
  88. beforeSend: function(XMLHttpRequest){
  89. //do something before submit...
  90. },
  91. success: function(data){
  92. if(data.success){
  93. jp.success(data.msg);
  94. document.getElementById("inputForm").reset();
  95. }else{
  96. jp.error(data.msg);
  97. }
  98. },
  99. complete: function(XMLHttpRequest, textStatus){
  100. //do something in the end...
  101. }
  102. });
  103. }
  104. });
  105. $("#grxxForm").validate({
  106. debug: false,
  107. focusInvalid: true, //当为false时,验证无效时,没有焦点响应
  108. onkeyup: false,
  109. rules: {
  110. name: {
  111. required: true
  112. }
  113. },
  114. messages: {
  115. name: {
  116. required: "请输入姓名"
  117. }
  118. },
  119. submitHandler:function(form){//这是关键的语句,配置这个参数后表单不会自动提交,验证通过之后会去调用的方法
  120. $.ajax({
  121. url:"${ctxF}/talentPerson/save",
  122. type:"POST",
  123. cache: false,
  124. data:$(form).serialize(),
  125. dataType:"json",
  126. beforeSend: function(XMLHttpRequest){
  127. //do something before submit...
  128. },
  129. success: function(data){
  130. if(data.success){
  131. jp.success(data.msg);
  132. window.location.href = "${ctxF}/info";
  133. }else{
  134. jp.error(data.msg);
  135. }
  136. },
  137. complete: function(XMLHttpRequest, textStatus){
  138. //do something in the end...
  139. }
  140. });
  141. }
  142. });
  143. });
  144. function personInfo() {
  145. $("#grxx").css("display","block");
  146. $("#xgmm").hide();
  147. $("#rcsb").hide();
  148. }
  149. function apply() {
  150. $("#rcsb").css("display","block");
  151. $("#xgmm").hide();
  152. $("#grxx").hide();
  153. }
  154. function changePwd() {
  155. $("#xgmm").css("display","block");
  156. $("#grxx").hide();
  157. $("#rcsb").hide();
  158. }
  159. function exit() {
  160. layer.confirm('确认要退出登录吗?', {icon: 3, title:'提示'}, function(index){
  161. window.location.href = "${ctxF}/logout";
  162. layer.close(index);
  163. });
  164. }
  165. </script>
  166. </head>
  167. <body>
  168. <%@ include file="/webpage/modules/web/top.jsp"%>
  169. <div class="c">
  170. <div class="new_r l">
  171. <h2>个人中心</h2>
  172. <ul>
  173. <li><a href="#" onclick="personInfo()">个人资料</a></li>
  174. <li><a href="${ctxF}/personSign" target="_parent">人才申报</a></li>
  175. <li><a href="${ctxF}/talentWorkstationList" target="_parent">“候鸟型”人才申报</a></li>
  176. <li><a href="#" onclick="changePwd()">修改密码</a></li>
  177. <li><a href="#" onclick="exit()">退出系统</a></li>
  178. </ul>
  179. </div>
  180. <div class="new_l l">
  181. <h2>&nbsp;&nbsp;&nbsp;当前位置:<a href="${ctx}/talent_web">首页</a>&gt;<a href="#">个人中心</a></h2>
  182. <div class="grzx" id="grxx">
  183. <form id = "grxxForm" action="${ctxF}/talentPerson/save" method="post">
  184. <input type="hidden" name="id" value="${talentPerson.id}"/>
  185. <h4>个人资料信息</h4>
  186. <table style="margin: 2px;" class="table " border="0" bgcolor="#CCCCCC">
  187. <tbody>
  188. <tr>
  189. <td ><label class="pull-right"><font color="red">*</font>姓名:</label></td>
  190. <td >
  191. <input name="name" type="text" value="${talentPerson.name}" class="required">
  192. </td>
  193. </tr>
  194. <tr>
  195. <td ><label class="pull-right"><font color="red">*</font>性别:</label></td>
  196. <td >
  197. <label><input name="sex" type="radio" value="1" <c:if test="${talentPerson.sex == '1'}">checked</c:if>/>男 </label>
  198. <label><input name="sex" type="radio" value="2" <c:if test="${talentPerson.sex == '2'}">checked</c:if>/>女 </label>
  199. </td>
  200. </tr>
  201. <tr>
  202. <td class="width-5"><label class="pull-right">照片:</label></td>
  203. <td class="width-20">
  204. <c:choose>
  205. <c:when test="talentPerson.photo !=null && talentSign.photo !=''">
  206. <img src="${talentPerson.photo}" width="152" height="180" >
  207. </c:when>
  208. <c:otherwise>
  209. <img src="${ctxStatic}/common/images/default.jpg" width="152" height="180" >
  210. </c:otherwise>
  211. </c:choose>
  212. <sys:fileUpload path="photo" value="${talentPerson.photo}" type="images" allowedExtensions="bmp,gif,jpeg,jpg,png" uploadPath="/talent/person/talentPerson"/>
  213. </td>
  214. </tr>
  215. <tr>
  216. <td ><label class="pull-right">联系方式:</label></td>
  217. <td >
  218. <input name="mobile" type="text" value="${talentPerson.mobile}" >
  219. </td>
  220. </tr>
  221. <tr>
  222. <td ><label class="pull-right">身份证:</label></td>
  223. <td >
  224. <input name="idNumber" type="text" value="${talentPerson.idNumber}" class="isIdCardNo">
  225. </td>
  226. </tr>
  227. <tr>
  228. <td ><label class="pull-right">学历:</label></td>
  229. <td >
  230. <select name="degree" class="form-control " style="width: 20%">
  231. <option value="" label=""/>
  232. <c:forEach items="${fns:getDictList('degree')}" var="degree">
  233. <option label="${degree.label}" value="${degree.value}" <c:if test="${talentPerson.degree==degree.value}"> selected="selected" </c:if>/>
  234. </c:forEach>
  235. </select>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td ><label class="pull-right">工作履历:</label></td>
  240. <td >
  241. <textarea name="workInfo" rows="6" class="form-control"></textarea>
  242. </td>
  243. </tr>
  244. <tr>
  245. <td ><label class="pull-right">简历上传:</label></td>
  246. <td >
  247. <sys:fileUpload path="resumeAttach" value="${talentPerson.resumeAttach}" type="file" uploadPath="/talent/person/talentPerson"/>
  248. </td>
  249. </tr>
  250. </tbody>
  251. </table>
  252. <input name="btnSave" class="btnSign" type="submit" value="提交" style="cursor: pointer;margin-left: 300px;" >
  253. </form>
  254. </div>
  255. <div id="xgmm" class="grzx" style="display: none">
  256. <form id = "inputForm" action="${ctxF}/talentPerson/updatePassword" method="post">
  257. <input type="hidden" name="id" value="${talentPerson.id}"/>
  258. <ul>
  259. <li><span>原密码:</span><input name="password" id="password" type="password"></li>
  260. <li><span>新密码:</span><input name="passwordAgain" id="passwordAgain" type="password" ></li>
  261. <li><span>确认密码:</span><input name="passwordAgain1" id="passwordAgain1" type="password"></li>
  262. <li><input name="btnRegister" class="btnSign" type="submit" value="提交" style="cursor: pointer" ></li>
  263. </ul>
  264. </form>
  265. </div>
  266. </div>
  267. </div>
  268. <%@ include file="/webpage/modules/web/footer.jsp"%>
  269. </body>
  270. </html>