7b7b38be0ff333b2d838aaaaa7c6d41c158db017.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  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>用户信息表</title>
  6. <!--框架必需start-->
  7. <%@include file="../../include.jsp" %>
  8. <!--框架必需end-->
  9. </head>
  10. <body>
  11. <div class="box1" id="formContent" style="overflow:auto;height:600px;">
  12. <form id="UserInfoForm">
  13. <table class="tableStyle" formMode="line">
  14. <tr>
  15. <th colspan="4">用户基本信息</th>
  16. </tr>
  17. <tr style="display:none;">
  18. <td colspan="2"><input type="hidden" name="classid" value="880"/></td>
  19. <td colspan="2"><input type="hidden" name="FD_OBJECTID880" value=""/></td>
  20. <td colspan="2"><input type="hidden" name="PERSON_CODE_880" value=""/></td>
  21. <td colspan="2"><input type="hidden" name="UNIT_CODE_880" value=""/></td>
  22. </tr>
  23. <tr>
  24. <td width="15%">用户ID:</td>
  25. <td width="35%"><input name="USER_ID_880" type="text" maxlength="" style="width:90%"></td>
  26. </tr>
  27. <tr>
  28. <td width="15%">登陆账号:</td>
  29. <td width="35%"><input name="NAME_880" type="text" maxlength="" style="width:90%"></td>
  30. <td width="15%">显示名称:</td>
  31. <td width="35%"><input name="DISPLAY_NAME_880" type="text" maxlength="" style="width:90%"></td>
  32. </tr>
  33. <tr>
  34. <td width="15%">密码:</td>
  35. <td width="35%"><input name="PASSWORD_880" type="text" maxlength="" style="width:90%"></td>
  36. <td width="15%">性别:</td>
  37. <td width="35%">
  38. <input type="radio" id="female-1" name="GENDER_880" value="0" /><label for="female-1" class="hand">女</label>
  39. <input type="radio" id="male-1" name="GENDER_880" value="1" /><label for="male-1" class="hand">男</label>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td width="15%">电话:</td>
  44. <td width="35%"><input name="PHONE_880" type="text" maxlength="" style="width:90%"></td>
  45. <td width="15%">Email:</td>
  46. <td width="35%"><input name="EMAIL_880" type="text" maxlength="" style="width:90%"></td>
  47. </tr>
  48. <tr>
  49. <td width="15%">用户类别:</td>
  50. <td width="35%"><select name="TYPE_880" prompt="请选择" selWidth="200"></select></td>
  51. <td width="15%">是否有效:</td>
  52. <td width="35%"><select name="USE_STATE_880" prompt="请选择" selWidth="200"></select></td>
  53. </tr>
  54. <tr>
  55. <td width="15%">可否视频监控:</td>
  56. <td width="35%"><select name="VEDIO_STATE_880" prompt="请选择" selWidth="200"></select></td>
  57. </tr>
  58. <tr>
  59. <td width="15%">用户描述:</td>
  60. <td colspan="3"><textarea name="DESCRIPTION_880" maxlength="" style="width:96%"></textarea></td>
  61. </tr>
  62. </table>
  63. </form>
  64. </div>
  65. <script>
  66. $(function(){
  67. $("#UserInfoForm input[name='CREATE_TIME_880']").val(new DateUtil().formatDate(0,'yyyy-MM-dd HH:mm:ss'));
  68. if((window.location.href).indexOf('?') > -1){
  69. var fd_id = (window.location.href).split('?')[1];//获取记录id
  70. var params = {classid : '880',objectID : fd_id};
  71. $.ajax({
  72. url : $.pathname() + '/ws/crud/CRUDService/getDataById/',
  73. type : 'post',
  74. timeout : 15000,
  75. data : params,
  76. dataType : 'json',
  77. success : function(data){
  78. $('#UserInfoForm').ajaxWrite({data:data});
  79. $('#UserInfoForm input[name="classid"]').val('880');
  80. },
  81. error : function(e){
  82. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  83. }
  84. });
  85. }
  86. var url = $.pathname() + '/ws/sys/constantService/getQuiConstantByName/';
  87. $TYPE_880 =$('select[name=TYPE_880]');
  88. $.post(url,{name:'BM$_UserType'},function(result){
  89. //赋给data属性
  90. $TYPE_880.data("data",result);
  91. $TYPE_880.render();
  92. },"json")
  93. $USE_STATE_880 =$('select[name=USE_STATE_880]');
  94. $.post(url,{name:'BM$_YesNo'},function(result){
  95. //赋给data属性
  96. $USE_STATE_880.data("data",result);
  97. $USE_STATE_880.render();
  98. },"json")
  99. $VEDIO_STATE_880 =$('select[name=VEDIO_STATE_880]');
  100. $.post(url,{name:'BM$_YesNo'},function(result){
  101. //赋给data属性
  102. $VEDIO_STATE_880.data("data",result);
  103. $VEDIO_STATE_880.render();
  104. },"json")
  105. //表单提交
  106. $('#UserInfoForm').submit(function(){
  107. //判断表单的客户端验证是否通过
  108. var valid = $('#UserInfoForm').validationEngine({returnIsValid: true});
  109. var url = $.pathname() + '/ws/sys/UserService/create/',
  110. if(objectId!=''){
  111. url = $.pathname() + '/ws/sys/UserService/update/',
  112. }
  113. if(valid){
  114. var formValue = $('#UserInfoForm').serialize();
  115. $.ajax({
  116. url : url,
  117. type : 'post',
  118. timeout : 15000,
  119. data : formValue,
  120. dataType : 'json',
  121. success : function(data){
  122. },
  123. error : function(e){
  124. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  125. }
  126. });
  127. }
  128. //阻止表单默认提交事件
  129. return false;
  130. });
  131. });
  132. </script>
  133. </body>