userAdd.jsp 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <%@page import="com.ccgj.platform.admin.USERAction"%>
  3. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  4. <%@taglib uri="/struts-tags" prefix="s"%>
  5. <%@page import="com.ccgj.platform.util.GlobalDefine"%>
  6. <%@page import="com.opensymphony.xwork2.ActionContext"%>
  7. <%@ page import="com.ccgj.database.beans.YHB"%>
  8. <%@ page import ="com.ccgj.database.factory.DatabaseFactory"%>
  9. <%@ page import ="com.ccgj.database.interfaces.WZBIF"%>
  10. <%@ page import ="com.ccgj.database.manager.WZBManager"%>
  11. <%@ page import="com.ccgj.database.beans.USER"%>
  12. <%
  13. String path = request.getContextPath();
  14. String basePath = request.getScheme() + "://"
  15. + request.getServerName() + ":" + request.getServerPort()
  16. + path + "/";
  17. %>
  18. <script>
  19. var arr=new Array();
  20. <%
  21. List<USER> list=DatabaseFactory.getWZBIF().getWZBService().getWzbManager().getAllUser();
  22. for(USER u:list){
  23. %>
  24. arr.push("<%=u.getUsername() %>");
  25. <%
  26. }
  27. %>
  28. </script>
  29. <html xmlns="http://www.w3.org/1999/xhtml">
  30. <head>
  31. <title></title>
  32. <link href="../../ligerui/lib/ligerUI/skins/Aqua/css/ligerui-all.css"
  33. rel="stylesheet" type="text/css" />
  34. <link href="../../ligerui/lib/ligerUI/skins/Silvery/css/style.css"
  35. rel="stylesheet" type="text/css" />
  36. <script src="../../ligerui/lib/jquery/jquery-1.3.2.min.js"
  37. type="text/javascript"></script>
  38. <script src="../../ligerui/lib/ligerUI/js/core/base.js"
  39. type="text/javascript"></script>
  40. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerForm.js"
  41. type="text/javascript"></script>
  42. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerDateEditor.js"
  43. type="text/javascript"></script>
  44. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerComboBox.js"
  45. type="text/javascript"></script>
  46. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerCheckBox.js"
  47. type="text/javascript"></script>
  48. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerButton.js"
  49. type="text/javascript"></script>
  50. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerDialog.js"
  51. type="text/javascript"></script>
  52. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerRadio.js"
  53. type="text/javascript"></script>
  54. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerSpinner.js"
  55. type="text/javascript"></script>
  56. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerTextBox.js"
  57. type="text/javascript"></script>
  58. <script src="../../ligerui/lib/ligerUI/js/plugins/ligerTip.js"
  59. type="text/javascript"></script>
  60. <script
  61. src="../../ligerui/lib/jquery-validation/jquery.validate.min.js"
  62. type="text/javascript"></script>
  63. <script src="../../ligerui/lib/jquery-validation/jquery.metadata.js"
  64. type="text/javascript"></script>
  65. <script src="../../ligerui/lib/jquery-validation/messages_cn.js"
  66. type="text/javascript"></script>
  67. <script src="../../ligerui/ajaxfileupload.js" type="text/javascript"></script>
  68. <script type="text/javascript" charset="utf-8"
  69. src="../../ueditor/ueditor.config.js"></script>
  70. <script type="text/javascript" charset="utf-8"
  71. src="../../ueditor/ueditor.all.min.js"> </script>
  72. <!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
  73. <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
  74. <script type="text/javascript" charset="utf-8"
  75. src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
  76. <script>
  77. $.validator.setDefaults({
  78. debug: true,
  79. errorPlacement: function (lable, element)
  80. {
  81. if (element.hasClass("l-textarea"))
  82. {
  83. element.ligerTip({ content: lable.html(), target: element[0] });
  84. }
  85. else if (element.hasClass("l-text-field"))
  86. {
  87. element.parent().ligerTip({ content: lable.html(), target: element[0] });
  88. }
  89. else
  90. {
  91. lable.appendTo(element.parents("td:first").next("td"));
  92. }
  93. },
  94. success: function (lable)
  95. {
  96. lable.ligerHideTip();
  97. lable.remove();
  98. },
  99. submitHandler: function(form) {
  100. var ff=true;
  101. for(var i=0;i<arr.length;i++){
  102. if(arr[i]==$("#username").val()){
  103. ff=false;
  104. }
  105. }
  106. if(!ff){
  107. $.ligerDialog.error('该账号已存在,请重新填写!');
  108. }else if($("#userpwd").val()!=$("#userpwd2").val()){
  109. $.ligerDialog.error('两次密码输入不一致,请重新填写!');
  110. }else{
  111. document.form.submit();
  112. }
  113. }
  114. });
  115. $().ready(function() {
  116. $("#form1").validate();
  117. });
  118. </script>
  119. <style type="text/css">
  120. body {
  121. font-size: 12px;
  122. }
  123. .l-table-edit {
  124. }
  125. .l-table-edit-td {
  126. padding-top: 4px;
  127. padding-bottom: 4px;
  128. padding-left: 10px;
  129. padding-right: 10px;
  130. }
  131. .l-button-submit,.l-button-test {
  132. width: 80px;
  133. float: left;
  134. margin-left: 10px;
  135. padding-bottom: 2px;
  136. }
  137. .l-verify-tip {
  138. left: 230px;
  139. top: 120px;
  140. }
  141. </style>
  142. <style type="text/css">
  143. * {
  144. font-size: 12px;
  145. }
  146. .div {
  147. margin: 0 auto;
  148. width: 100%;
  149. overflow: hidden;
  150. padding: 0px;
  151. }
  152. .line {
  153. position: relative;
  154. margin: 0 auto;
  155. text-align: left
  156. }
  157. .line span.span {
  158. float: left;
  159. padding-top: 2px;
  160. }
  161. .file {
  162. position: absolute;
  163. left: 0;
  164. width: 265px ! important;
  165. top: 0;
  166. height: 28px;
  167. filter: alpha(opacity = 0);
  168. opacity: 0;
  169. cursor: pointer
  170. }
  171. .file1 {
  172. float: left;
  173. margin-left: 0px;
  174. margin-right: 4px;
  175. z-index: 1;
  176. width: 70px;
  177. height: 28px;
  178. line-height: 28px;
  179. background: url(../image/liulan.gif) no-repeat 0 0;
  180. text-indent: -9999px;
  181. cursor: pointer
  182. }
  183. .file2 {
  184. float: left;
  185. z-index: 1;
  186. width: 70px;
  187. height: 28px;
  188. line-height: 28px;
  189. background: url(../image/sc.gif) no-repeat 0 0;
  190. text-indent: -9999px;
  191. cursor: pointer
  192. }
  193. .file3 {
  194. float: left;
  195. z-index: 1;
  196. width: 70px;
  197. height: 28px;
  198. line-height: 28px;
  199. background: url(../image/tpyl.gif) no-repeat 0 0;
  200. text-indent: -9999px;
  201. cursor: pointer
  202. }
  203. .inputstyle {
  204. border: 1px solid #BEBEBE;
  205. margin-left: -3px;
  206. margin-top: -1px;
  207. width: 196px ! important;
  208. float: left;
  209. height: 22px;
  210. line-height: 22px;
  211. background: #FFF;
  212. z-index: 99
  213. }
  214. #n {
  215. margin: 10px auto;
  216. width: 920px;
  217. border: 1px solid #CCC;
  218. font-size: 14px;
  219. line-height: 30px;
  220. }
  221. #n a {
  222. padding: 0 4px;
  223. color: #333
  224. }
  225. input{
  226. line-height:15px;
  227. height:15px;
  228. }
  229. .div1{
  230. height:455px;width:300px; overflow:hidden;border:1px solid #ccc; position:absolute;left:60%;margin-top:-10px;margin-left:-250px; z-index:1100; text-align:center;display:none;
  231. }
  232. div2{
  233. height:445px; overflow:hidden;border:1px solid #ccc; position:absolute; left:50%; margin-left:-250px; z-index:1000; }
  234. .tjtitle{padding:10px;background: #dee9fb;}
  235. .tjcont{padding:10px;background: #fff;}
  236. </style>
  237. </head>
  238. <body style="padding: 10px;">
  239. <form name="form" method="post" action="../user/user!saveUser" id="form1" >
  240. <table cellpadding="0" cellspacing="0" class="l-table-edit" border="1" bordercolor="#c7d4e2" style="margin: 20px auto;">
  241. <tr>
  242. <td align="center" class="l-table-edit-td tjtitle">
  243. 姓 名:
  244. </td>
  245. <td align="left" class="l-table-edit-td tjcont">
  246. <input name="userfullname" type="text" id="userfullname" ltype="text" minlength="2" maxlength="10" required
  247. value="" style="width: 330px" /><em style="color:red">*</em>
  248. </td>
  249. <td align="left"></td>
  250. <td align="center" class="l-table-edit-td tjtitle">
  251. 排 序:
  252. </td>
  253. <td align="left" class="l-table-edit-td">
  254. <input name="px" type="text" id="px" ltype="text" max="99" required digits="true"
  255. value="99"
  256. style="width: 330px" /><em style="color:red">*</em>
  257. </td>
  258. <td align="left"></td>
  259. </tr>
  260. <tr>
  261. <td align="center" class="l-table-edit-td tjtitle">
  262. 账 号:
  263. </td>
  264. <td align="left" class="l-table-edit-td">
  265. <input name="username" type="text" id="username" ltype="text"
  266. required minlength="2" maxlength="20"
  267. value="" style="width: 330px" /><em style="color:red">*</em>
  268. </td>
  269. <td align="left"></td>
  270. <td align="center" class="l-table-edit-td tjtitle">
  271. 密 码:
  272. </td>
  273. <td align="left" class="l-table-edit-td">
  274. <input name="userpwd" type="password" id="userpwd" ltype="text"
  275. required minlength="6" maxlength="20"
  276. style="width: 330px" /><em style="color:red">*</em>
  277. </td>
  278. <td align="left"></td>
  279. </tr>
  280. <tr>
  281. <td align="center" class="l-table-edit-td tjtitle">
  282. 确认密码:
  283. </td>
  284. <td align="left" class="l-table-edit-td">
  285. <input name="" type="password" id="userpwd2" ltype="text"
  286. value="" style="width: 330px" /><em style="color:red">*</em>
  287. </td>
  288. <td align="left"></td>
  289. <td align="center" class="l-table-edit-td tjtitle">
  290. 部 门:
  291. </td>
  292. <td align="left" class="l-table-edit-td">
  293. <input name="department" type="text" id="department" ltype="text"
  294. maxlength="200"
  295. style="width: 330px" />
  296. </td>
  297. <td align="left"></td>
  298. </tr>
  299. <tr>
  300. <td align="center" class="l-table-edit-td tjtitle">
  301. 岗 位:
  302. </td>
  303. <td align="left" class="l-table-edit-td" >
  304. <input name="userpost" type="text" id="userpost" ltype="text"
  305. maxlength="200"
  306. style="width: 330px" />
  307. </td>
  308. <td align="left"></td>
  309. <td align="center" class="l-table-edit-td tjtitle">
  310. </td>
  311. <td align="left" class="l-table-edit-td">
  312. </td>
  313. <td align="left"></td>
  314. </tr>
  315. <tr>
  316. <td align="right" class="l-table-edit-td" colspan="11" style="padding:10px 0 10px 40%;">
  317. <input type="submit" value="提交" id="btnSubmit"
  318. class="l-button l-button-submit" />
  319. <input type="button" value="返回" id="btnBack"
  320. onclick="javascript:window.location.href='../xxjb/userList.jsp';"
  321. class="l-button l-button-test" id="test" />
  322. </td>
  323. </tr>
  324. </table>
  325. <div style="display: none">
  326. </div>
  327. </form>
  328. </body>
  329. </html>