123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>用户信息表</title>
- <!--框架必需start-->
- <%@include file="../../include.jsp" %>
- <!--框架必需end-->
- </head>
- <body>
- <div class="box1" id="formContent" style="overflow:auto;height:600px;">
- <form id="UserInfoForm">
- <table class="tableStyle" formMode="line">
- <tr>
- <th colspan="4">用户基本信息</th>
- </tr>
- <tr style="display:none;">
- <td colspan="2"><input type="hidden" name="classid" value="880"/></td>
- <td colspan="2"><input type="hidden" name="FD_OBJECTID880" value=""/></td>
- <td colspan="2"><input type="hidden" name="PERSON_CODE_880" value=""/></td>
- <td colspan="2"><input type="hidden" name="UNIT_CODE_880" value=""/></td>
- </tr>
- <tr>
- <td width="15%">用户ID:</td>
- <td width="35%"><input name="USER_ID_880" type="text" maxlength="" style="width:90%"></td>
- </tr>
- <tr>
- <td width="15%">登陆账号:</td>
- <td width="35%"><input name="NAME_880" type="text" maxlength="" style="width:90%"></td>
- <td width="15%">显示名称:</td>
- <td width="35%"><input name="DISPLAY_NAME_880" type="text" maxlength="" style="width:90%"></td>
- </tr>
- <tr>
- <td width="15%">密码:</td>
- <td width="35%"><input name="PASSWORD_880" type="text" maxlength="" style="width:90%"></td>
- <td width="15%">性别:</td>
- <td width="35%">
- <input type="radio" id="female-1" name="GENDER_880" value="0" /><label for="female-1" class="hand">女</label>
- <input type="radio" id="male-1" name="GENDER_880" value="1" /><label for="male-1" class="hand">男</label>
- </td>
- </tr>
- <tr>
- <td width="15%">电话:</td>
- <td width="35%"><input name="PHONE_880" type="text" maxlength="" style="width:90%"></td>
- <td width="15%">Email:</td>
- <td width="35%"><input name="EMAIL_880" type="text" maxlength="" style="width:90%"></td>
- </tr>
- <tr>
- <td width="15%">用户类别:</td>
- <td width="35%"><select name="TYPE_880" prompt="请选择" selWidth="200"></select></td>
- <td width="15%">是否有效:</td>
- <td width="35%"><select name="USE_STATE_880" prompt="请选择" selWidth="200"></select></td>
- </tr>
- <tr>
- <td width="15%">可否视频监控:</td>
- <td width="35%"><select name="VEDIO_STATE_880" prompt="请选择" selWidth="200"></select></td>
- </tr>
- <tr>
- <td width="15%">用户描述:</td>
- <td colspan="3"><textarea name="DESCRIPTION_880" maxlength="" style="width:96%"></textarea></td>
- </tr>
- </table>
- </form>
- </div>
- <script>
- $(function(){
- $("#UserInfoForm input[name='CREATE_TIME_880']").val(new DateUtil().formatDate(0,'yyyy-MM-dd HH:mm:ss'));
- if((window.location.href).indexOf('?') > -1){
- var fd_id = (window.location.href).split('?')[1];//获取记录id
- var params = {classid : '880',objectID : fd_id};
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/getDataById/',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'json',
- success : function(data){
- $('#UserInfoForm').ajaxWrite({data:data});
- $('#UserInfoForm input[name="classid"]').val('880');
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }
-
- var url = $.pathname() + '/ws/sys/constantService/getQuiConstantByName/';
-
- $TYPE_880 =$('select[name=TYPE_880]');
-
- $.post(url,{name:'BM$_UserType'},function(result){
- //赋给data属性
- $TYPE_880.data("data",result);
- $TYPE_880.render();
- },"json")
- $USE_STATE_880 =$('select[name=USE_STATE_880]');
- $.post(url,{name:'BM$_YesNo'},function(result){
- //赋给data属性
- $USE_STATE_880.data("data",result);
- $USE_STATE_880.render();
- },"json")
- $VEDIO_STATE_880 =$('select[name=VEDIO_STATE_880]');
- $.post(url,{name:'BM$_YesNo'},function(result){
- //赋给data属性
- $VEDIO_STATE_880.data("data",result);
- $VEDIO_STATE_880.render();
- },"json")
-
-
-
-
- //表单提交
- $('#UserInfoForm').submit(function(){
-
- //判断表单的客户端验证是否通过
- var valid = $('#UserInfoForm').validationEngine({returnIsValid: true});
- var url = $.pathname() + '/ws/sys/UserService/create/',
- if(objectId!=''){
- url = $.pathname() + '/ws/sys/UserService/update/',
- }
- if(valid){
- var formValue = $('#UserInfoForm').serialize();
- $.ajax({
- url : url,
- type : 'post',
- timeout : 15000,
- data : formValue,
- dataType : 'json',
- success : function(data){
-
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }
- //阻止表单默认提交事件
- return false;
- });
-
-
- });
- </script>
- </body>
|