changePwd.jsp 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <%@ page language="java" pageEncoding="utf-8"%>
  2. <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
  3. <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
  4. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  8. Object employee = session.getAttribute("employee");
  9. if(employee != null)
  10. response.sendRedirect(basePath);
  11. %>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  13. <html>
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>UAS管理系统-修改密码</title>
  17. <link rel="icon" href="<%=basePath %>resource/images/icon_title.png" type="image/x-icon">
  18. <link rel="stylesheet" href="<%=basePath %>resource/bootstrap/bootstrap.min.css" />
  19. <link rel="stylesheet" href="<%=basePath %>resource/fontawesome/css/font-awesome.min.css" />
  20. <link rel="stylesheet" href="<%=basePath %>resource/sources/toaster.css" />
  21. <link rel="stylesheet" href="<%=basePath %>resource/sources/signin.css" />
  22. <style type="text/css">
  23. .labeltext{
  24. font-size: 16px;
  25. padding-top: 3px !important;
  26. }
  27. </style>
  28. <script type="text/javascript" src="<%=basePath %>resource/sources/jquery-3.0.0.min.js"></script>
  29. <script type="text/javascript" src="<%=basePath %>resource/sources/bootstrap.min.js"></script>
  30. <base target="_blank"/>
  31. <meta name="keywords" content="ERP,企业供应链,办公自动化,人力资源管理,财务会计管理,工作流程管理 ">
  32. <script type="text/javascript" src="<%=basePath %>resource/jquery/jquery.json-2.2.min.js"></script>
  33. <script type="text/javascript" src="<%=basePath %>resource/jquery/showtipTest.js"></script>
  34. <script type="text/javascript" src="<%=basePath %>resource/other/loginTest.js"></script>
  35. <script type="text/javascript" src="<%=basePath %>resource/other/qrcode.js"></script>
  36. </head>
  37. <body>
  38. <!-- head -->
  39. <div class="header">
  40. <div class="Jwrap">
  41. <div class="container">
  42. <div class="navbar-header">
  43. <span class="header-logo">企业管理系统</span>
  44. </div>
  45. </div>
  46. <!--
  47. <div class="navbar-right">
  48. <ul class="nav nav-pills" role="tablist">
  49. <li role="presentation"><a href="#">手机端</a></li>
  50. <li role="presentation"><a href="#">关于优软</a></li>
  51. <li role="presentation"><a href="#">客户服务</a></li>
  52. <li role="presentation"><a href="#">帮助</a></li>
  53. </ul>
  54. </div> -->
  55. <div class="clear"></div>
  56. </div>
  57. </div>
  58. <hr>
  59. <!-- content -->
  60. <div class="container" style="min-height: 55%" id="content">
  61. <c:if test="${result.success == true}">
  62. <input type="hidden" name="em_code" value="${result.em_code}" />
  63. <div style="margin-top: 10%">
  64. <h1 style="font-size: 24;margin-left: 13%;margin-bottom: 2%;">修改密码: </h1>
  65. <form class="form-horizontal" style="margin-left: 10%">
  66. <div class="form-group" id="empassword_div">
  67. <label for="inputCode" class="col-sm-2 control-label labeltext">新密码</label>
  68. <div class="col-sm-4">
  69. <input type="password" name="password" class="form-control" id="inputPassword" placeholder="新密码">
  70. </div>
  71. </div>
  72. <div class="form-group" id="empassword2_div">
  73. <label for="inputName" class="col-sm-2 control-label labeltext">确认密码</label>
  74. <div class="col-sm-4">
  75. <input type="password" name="password2" class="form-control" id="inputPassword" placeholder="确认密码">
  76. </div>
  77. </div>
  78. </form>
  79. <div style="margin-left: 35%">
  80. <div class="col-sm-offset-2 col-sm-10">
  81. <button style="width:70px" id="submit" class="btn btn-primary">确定</button>
  82. </div>
  83. </div>
  84. </div>
  85. <p id="message" style="color:red;margin-left:14%;"></p>
  86. </c:if>
  87. <c:if test="${result.success == false}">
  88. <div style="color:red;margin-left:15%;margin-top:10%"><h1 style="font-size: 28px;">${result.message}</h1></div>
  89. </c:if>
  90. </div>
  91. <!-- foot -->
  92. <div style="margin-top: 25px; margin-bottom: 30px;">
  93. <div class="container">
  94. <dl class="notics-box">
  95. <dt><i class="icon-login"></i>系统公告</dt>
  96. <dd class="systemnotice1">
  97. <!-- <i>●</i> -->
  98. <marquee scrollamount=3 FONT style="WIDTH: 100%;" onmouseover=this.stop(); onmouseout=this.start();><!-- <i>●</i> --><a class="notices_title" href ="javascript:volid(0);">UAS 1.1版本 增加了企业数据订阅功能,企业用户可以结合自身的岗位需求订阅关注的数据!<img src="<%=basePath %>resource/sources/image/log/new2.png"></img></a></marquee>
  99. <%-- <a class="notices_title" href ="javascript:volid(0);">UAS 1.1版本 增加了企业数据订阅功能,企业用户可以结合自身的岗位需求订阅关注的数据!<img src="<%=basePath %>resource/sources/image/log/new2.png"></img></a> --%>
  100. <span class="lable_new"></span>
  101. </dd>
  102. </dl>
  103. <div class="row">
  104. <div class="col-xs-3 text-center" style="margin-top:10px;">
  105. <div class="qrcode-img pull-left"><!-- style="width:280px;" -->
  106. <img src="<%=basePath %>resource/sources/image/UU.png"></img>
  107. <!-- <p class="text-left">手机 UU<br>快人一步</p> -->
  108. </div>
  109. <div class="qrcode-text pull-left">
  110. <div>手机 UU</div>
  111. <div>快人一步</div>
  112. </div>
  113. </div>
  114. <div class="col-xs-3 text-right" style="margin-top:10px;">
  115. <div class="qrcode-img pull-left"><!-- style="width:280px;" -->
  116. <img src="<%=basePath %>resource/sources/image/UUoficial.png"></img>
  117. <!-- <p class="text-left">手机 UU<br>快人一步</p> -->
  118. </div>
  119. <div class="qrcode-text pull-left">
  120. <div>微信扫描</div>
  121. <div>关注公众号</div>
  122. </div>
  123. </div>
  124. <div class="col-xs-3 text-right" style="margin-top:10px;">
  125. <div class="qrcode-img pull-left"><!-- style="width:280px;" -->
  126. <img src="<%=basePath %>resource/sources/image/UUcode.png"></img>
  127. <!-- <p class="text-left">手机 UU<br>快人一步</p> -->
  128. </div>
  129. <div class="qrcode-text pull-left">
  130. <div>优软商城</div>
  131. <div>关注公众号</div>
  132. </div>
  133. </div>
  134. <div class="col-xs-3 text-left" style="margin-top: 18px;"><!-- width: 320px; -->
  135. <p><a class="text-muted" href="#">关于优软</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="text-muted" href="#">联系我们</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="text-muted" href="#">帮助</a></p>
  136. <p class="text-muted">© 2016 深圳优软科技有限公司<br>粤 ICP 备 15112126 号-2</p>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </body>
  142. <script type="text/javascript">
  143. var basePath = '<%=basePath %>';
  144. function uploading(){
  145. var _PageHeight = $(window).height();
  146. var _PageWidth = $(window).width();
  147. var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0;
  148. var _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;
  149. var _LoadingHtml = '<div id="loadingDiv" style="position:absolute;left:0;width:100%;height:' + _PageHeight + 'px;top:0;background:#f3f8ff;opacity:0.8;filter:alpha(opacity=80);z-index:10000;"><div style="position: absolute; cursor1: wait; left: ' + _LoadingLeft + 'px; top:' + _LoadingTop + 'px; width: auto; height: 57px; line-height: 57px; padding-left: 50px; padding-right: 5px; background: #fff url(../resource/css/images/loading.png) no-repeat scroll 5px 10px; border: 2px solid #95B8E7; color: #696969; font-family:\'Microsoft YaHei\';">执行中,请稍等...</div></div>';
  150. $("body").append(_LoadingHtml);
  151. }
  152. //加载状态为complete时移除loading效果
  153. function completeUpLoading() {
  154. $('#loadingDiv').remove();
  155. }
  156. $(function(){
  157. $("input[name=password]").focus();
  158. $("input[name=password]").blur(function(e){
  159. if($("input[name=password]").val() == ''){
  160. $("#empassword_div").addClass('has-error');
  161. }else{
  162. $("#empassword_div").removeClass('has-error');
  163. }
  164. });
  165. $("input[name=password2]").blur(function(e){
  166. if($("input[name=password2]").val() == ''){
  167. $("#empassword2_div").addClass('has-error');
  168. }else{
  169. $("#empassword2_div").removeClass('has-error');
  170. }
  171. });
  172. $("#submit").click(function(){
  173. var em_password = $("input[name=password]").val(),
  174. em_password2 = $("input[name=password2]").val(),
  175. em_code = $("input[name=em_code]").val();
  176. if(em_password != em_password2){
  177. $("#message").text("两次密码不一致");
  178. }else{
  179. if(em_password.length < 6 || em_password.length > 20){
  180. $("#message").text("密码应为6-20位");
  181. }else{
  182. $("#message").text("");
  183. //提交
  184. $("#submit").attr("disabled","disabled");
  185. $.ajax({
  186. url: basePath + 'common/changePassword.action',
  187. data: {
  188. em_code: em_code,
  189. password: em_password
  190. },
  191. dataType: 'json',
  192. type: 'POST',
  193. beforeSend: function () {
  194. uploading();
  195. },
  196. success: function(response){
  197. if(response.success)
  198. alert('修改成功!');
  199. else
  200. alert(response.result);
  201. },
  202. complete: function () {
  203. completeUpLoading();
  204. }
  205. });
  206. }
  207. }
  208. });
  209. });
  210. </script>
  211. </html>