4f788872405ca0202e0d119c55409efba9c01583.svn-base 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>
  6. <c:if test="${userinfor.userId != null && '' != userinfor.userId }">修改</c:if>
  7. <c:if test="${userinfor.userId == null || '' == userinfor.userId }">添加</c:if>
  8. </title>
  9. <!--框架必需start-->
  10. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  11. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  12. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  13. <link href="libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  14. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  15. <link rel="stylesheet" type="text/css" id="customSkin"/>
  16. <!--框架必需end-->
  17. <!-- 日期控件start -->
  18. <script type="text/javascript" src="../../libs/js/form/datePicker/WdatePicker.js"></script>
  19. <!-- 日期控件end -->
  20. <!-- 树组件start -->
  21. <script type="text/javascript" src="../../libs/js/tree/ztree/ztree.js"></script>
  22. <link type="text/css" rel="stylesheet" href="../../libs/js/tree/ztree/ztree.css"></link>
  23. <!-- 树组件end -->
  24. <!-- 树形下拉框start -->
  25. <script type="text/javascript" src="../../libs/js/form/selectTree.js"></script>
  26. <!-- 树形下拉框end -->
  27. <!-- 表单验证start -->
  28. <script src="../../libs/js/form/validationRule.js" type="text/javascript"></script>
  29. <script src="../../libs/js/form/validation.js" type="text/javascript"></script>
  30. <!-- 表单验证end -->
  31. <!-- 表单异步提交start -->
  32. <script src="../../libs/js/form/form.js" type="text/javascript"></script>
  33. <!-- 表单异步提交end -->
  34. </head>
  35. <body>
  36. <form id="myFormId" action="userAction.do?method=save" method="post" target="frmright">
  37. <div class="box1" id="formContent" whiteBg="true">
  38. <table class="tableStyle" formMode="transparent">
  39. <input type="hidden" name="userinfor.userId" value="<c:out value="${userinfor.userId}"/>" />
  40. <c:if test="${userinfor.userId != null && '' != userinfor.userId}">
  41. <input type="hidden" name="isupdate" value="1"/>
  42. </c:if>
  43. <tr>
  44. <td width="150">用户名:</td>
  45. <td>
  46. <c:if test="${userinfor.userId != null && '' != userinfor.userId }">
  47. <c:out value="${userinfor.userLoginName}"></c:out>
  48. <input type="hidden" name="userinfor.userLoginName" value="${userinfor.userLoginName}"/>
  49. </c:if>
  50. <c:if test="${userinfor.userId == null || '' == userinfor.userId }">
  51. <input type="text" name="userinfor.userLoginName" value="${userinfor.userLoginName}" class="validate[required,custom[noSpecialCaracters]]" watermark="请输入英文或数字"/><span class="star">*</span>
  52. </c:if>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td>密码:</td>
  57. <td><input type="text" name="userinfor.userPassword" value="${userinfor.userPassword}" id="pwd" class="validate[required,length[6,11],custom[noSpecialCaracters]]"/><span class="star">*</span> </td>
  58. </tr>
  59. <tr>
  60. <td>密码确认:</td>
  61. <td><input type="text" class="validate[required,confirm[pwd]]" value="${userinfor.userPassword}"/><span class="star">*</span></td>
  62. </tr>
  63. <tr>
  64. <td width="150">姓名:</td>
  65. <td><input type="text" name="userinfor.userName" value="${userinfor.userName}" class="validate[required,custom[chinese],length[0,20]]"/><span class="star">*</span></td>
  66. </tr>
  67. <tr>
  68. <td>所属部门:</td>
  69. <td>
  70. <c:if test="${userinfor.userId != null && '' != userinfor.userId }">
  71. <div disabled="true" class="selectTree validate[required]" selectedValue="${userinfor.organization.orgId}" name="userinfor.organization.orgId" id="department" url="organizationAction.do?method=getTreeSimpleData"></div><span class="star">*</span>
  72. </c:if>
  73. <c:if test="${userinfor.userId == null || '' == userinfor.userId }">
  74. <div disabled="true" class="selectTree validate[required]" <% String orgid = request.getParameter("orgid"); if(orgid != null && !"".equals(orgid) && !"0".equals(orgid)){%>selectedValue="<%=orgid%>"<%}%> name="userinfor.organization.orgId" id="department" url="organizationAction.do?method=getTreeSimpleData"></div><span class="star">*</span>
  75. </c:if>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td>性别:</td>
  80. <td>
  81. <input type="radio" id="radio-1" name="userinfor.userSex" value="1" <c:if test="${userinfor.userSex}">checked="checked"</c:if>/><label for="radio-1" class="hand">男</label>
  82. <input type="radio" id="radio-2" name="userinfor.userSex" value="0" <c:if test="${!userinfor.userSex}">checked="checked"</c:if>/><label for="radio-2" class="hand">女</label>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>入职时间:</td>
  87. <td><input type="text" name="userinfor.userEmployTime" value="${userinfor.userEmployTime}" class="date"/></td>
  88. </tr>
  89. <tr>
  90. <td>学历:</td>
  91. <td><select selectedValue="${userinfor.userEducation}" name="userinfor.userEducation" data='{"list":[{"value":"1","key":"大专"},{"value":"2","key":"本科"},{"value":"3","key":"硕士"},{"value":"4","key":"博士"}]}'></select></td>
  92. </tr>
  93. <tr>
  94. <td colspan="2">
  95. <input type="submit" value="提交"/>
  96. <input type="button" value="取消" onclick="top.Dialog.close()"/>
  97. </td>
  98. </tr>
  99. </table>
  100. </div>
  101. </form>
  102. <!-- 异步提交start -->
  103. <script type="text/javascript">
  104. function initComplete(){
  105. //表单提交
  106. $('#myFormId').submit(function(){
  107. //判断表单的客户端验证是否通过
  108. var valid = $('#myFormId').validationEngine({returnIsValid: true});
  109. if(valid){
  110. $(this).ajaxSubmit({
  111. //表单提交成功后的回调
  112. success: function(responseText, statusText, xhr, $form){
  113. top.Dialog.alert(responseText.resultData.msg,function(){
  114. closeWin();
  115. })
  116. }
  117. });
  118. }
  119. //阻止表单默认提交事件
  120. return false;
  121. });
  122. }
  123. //重置
  124. function closeWin(){
  125. var update = false;
  126. var isupdate = '<c:out value="${userinfor.userId}"/>';
  127. if(isupdate != ''){
  128. update = true;
  129. }else{
  130. update = false;
  131. }
  132. //刷新数据
  133. top.frmright.refreshChild(update,<%=request.getParameter("gridId")%>);
  134. //关闭窗口
  135. top.Dialog.close();
  136. }
  137. </script>
  138. <!-- 异步提交end -->
  139. </body>
  140. </html>