sysUserEditCommon.jsp 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <%--
  2. time:2011-11-28 10:17:09
  3. --%>
  4. <%@ page language="java" contentType="text/html; charset=UTF-8"
  5. pageEncoding="UTF-8"%>
  6. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  7. <%@include file="/commons/include/html_doctype.html"%>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  11. <title>用户表明细</title>
  12. <%@include file="/commons/include/form.jsp"%>
  13. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  14. <script type="text/javascript" src="${ctx}/js/hotent/formdata.js"></script>
  15. <script type="text/javascript" src="${ctx}/js/hotent/subform.js"></script>
  16. <script type="text/javascript" src="${ctx }/js/lg/plugins/ligerTab.js"></script>
  17. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/HtmlUploadDialog.js" ></script>
  18. <script type="text/javascript">
  19. var dialog =null;
  20. try{
  21. dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
  22. }catch(e){
  23. }
  24. $(function() {
  25. var h = $('body').height();
  26. $("#tabMyInfo").ligerTab({
  27. });
  28. });
  29. $(function() {
  30. $("a.save").click(function() {
  31. submitForm();
  32. });
  33. });
  34. //提交表单
  35. function submitForm() {
  36. var options = {};
  37. if (showResponse) {
  38. options.success = showResponse;
  39. }
  40. var frm = $('#sysUserForm').form();
  41. frm.ajaxForm(options);
  42. if (frm.valid()) {
  43. frm.submit();
  44. }
  45. }
  46. function showResponse(responseText) {
  47. var obj = new com.hotent.form.ResultMessage(responseText);
  48. if (obj.isSuccess()) {
  49. $.ligerDialog.confirm(obj.getMessage() + ",是否继续操作","提示信息",function(rtn) {
  50. if (rtn) {
  51. window.location.reload();
  52. } else {
  53. window.location.href = "${returnUrl}";
  54. }
  55. });
  56. } else {
  57. $.ligerDialog.err("提示信息","用户信息保存失败!",obj.getMessage());
  58. }
  59. }
  60. //添加个人照片
  61. function picCallBack(array){
  62. if(!array && array!="") return;
  63. var fileId=array[0].fileId,
  64. fileName=array[0].fileName;
  65. var path= __ctx + "/platform/system/sysFile/getFileById.ht?fileId=" + fileId;
  66. if(/\w+.(png|gif|jpg)/gi.test(fileName)){
  67. $("#picture").val("/platform/system/sysFile/getFileById.ht?fileId=" + fileId);
  68. $("#personPic").attr("src",path);
  69. }
  70. else
  71. $.ligerDialog.warn("请选择*png,*gif,*jpg类型图片!");
  72. };
  73. //上传照片
  74. function addPic(){
  75. HtmlUploadDialog({max:1,size:10,callback:picCallBack});
  76. };
  77. //删除照片
  78. function delPic(){
  79. $("#picture").val("");
  80. $("#personPic").attr("src","${ctx}/commons/image/default_image_male.jpg");
  81. };
  82. </script>
  83. </head>
  84. <body>
  85. <div class="panel-toolbar">
  86. <div class="toolBar">
  87. <div class="group"><a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a></div>
  88. <div class="l-bar-separator"></div>
  89. <div class="group"><a class="link back" href="${returnUrl}"><span></span>返回</a></div>
  90. </div>
  91. </div>
  92. <form id="sysUserForm" method="post" action="updateCommon.ht">
  93. <div id="tabMyInfo" style="overflow: hidden; position: relative;">
  94. <div title="基本信息" tabid="userdetail"
  95. icon="${ctx}/styles/default/images/resicon/user.gif">
  96. <div class="panel-detail">
  97. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  98. <tr>
  99. <td rowspan="12" align="center" width="26%">
  100. <div style="float:top !important;background: none;height: 24px;padding:0px 6px 0px 112px;">
  101. <a class="link uploadPhoto" href="javascript:;" onclick="addPic();">上传照片</a>
  102. <a class="link del" href="javascript:;" onclick="delPic();">删除照片</a>
  103. </div>
  104. <div class="person_pic_div">
  105. <p><img id="personPic" src="${ctx}/${pictureLoad}" style="height: 480px; width:100%;" alt="个人相片" /></p>
  106. </div>
  107. </td>
  108. <th width="18%">帐 号: <span class="required red">*</span></th>
  109. <td >
  110. ${sysUser.account}
  111. </td>
  112. </tr>
  113. <tr>
  114. <th>用户姓名: <span class="required red">*</span></th>
  115. <td ><input type="text" id="fullname" name="fullname" value="${sysUser.fullname}" style="width:240px !important" class="inputText" /></td>
  116. </tr>
  117. <tr>
  118. <th>用户性别: </th>
  119. <td>
  120. <select name="sex" class="select" style="width:245px !important">
  121. <option value="1" <c:if test="${sysUser.sex==1}">selected</c:if> >男</option>
  122. <option value="0" <c:if test="${sysUser.sex==0}">selected</c:if> >女</option>
  123. </select>
  124. </td>
  125. </tr>
  126. <tr>
  127. <th>入职时间: </th>
  128. <td>
  129. <fmt:formatDate value='${sysUser.entryDate}' pattern='yyyy-MM-dd'/>
  130. </td>
  131. </tr>
  132. <tr>
  133. <th>员工状态: </th>
  134. <td>
  135. ${sysUser.userStatus }
  136. </td>
  137. </tr>
  138. <tr>
  139. <th>是否锁定: </th>
  140. <td >
  141. <c:if test="${sysUser.isLock==0}">未锁定</c:if>
  142. <c:if test="${sysUser.isLock==1}">已锁定</c:if>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th>是否过期: </th>
  147. <td >
  148. <c:if test="${sysUser.isExpired==0}">未过期</c:if>
  149. <c:if test="${sysUser.isExpired==1}">已过期</c:if>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th>当前状态: </th>
  154. <td>
  155. <c:if test="${sysUser.status==1}">激活</c:if>
  156. <c:if test="${sysUser.status==0}">禁用</c:if>
  157. <c:if test="${sysUser.status==-1}">删除</c:if>
  158. </td>
  159. </tr>
  160. <tr>
  161. <th>邮箱地址: </th>
  162. <td ><input type="text" id="email" name="email" value="${sysUser.email}" style="width:240px !important" class="inputText"/></td>
  163. </tr>
  164. <tr>
  165. <th>微 信: <span class="required red">*</span></th>
  166. <td ><input type="text" id="weixinid" name="weixinid" value="${sysUser.weixinid}" style="width:240px !important" class="inputText"/></td>
  167. </tr>
  168. <tr>
  169. <th>手 机: </th>
  170. <td ><input type="text" id="mobile" name="mobile" value="${sysUser.mobile}" style="width:240px !important" class="inputText"/></td>
  171. </tr>
  172. <tr>
  173. <th>电 话: </th>
  174. <td ><input type="text" id="phone" name="phone" value="${sysUser.phone}" style="width:240px !important" class="inputText"/></td>
  175. </tr>
  176. </table>
  177. <input type="hidden" name="userId" value="${sysUser.userId}" />
  178. <input type="hidden" id="picture" name="picture" value="${sysUser.picture}" />
  179. </div>
  180. </div>
  181. </div>
  182. </form>
  183. </body>
  184. </html>