cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>增加/修改部门</title>
 
[#include "/business/pages/include/static.html" /]
</head>
<body class="edit_txt_body">
 
<script type="text/javascript">
$(function() {
    $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
                        document.getElementById("myform").target = window.top.openDialog("1","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
        }});
        
        
        $("#address_name").formValidator({empty:false,onFocus:"请输入地址名称"}).inputValidator({min:4,max:40,onError:"地址名称4-40个字符或2-20个汉字"})
                .ajaxValidator({
                      type:"POST",
                     url:"${base}/business/pages/xtgl/xtpz/address/check.html?id=${RequestParameters.id}",
                     datatype:"json",
                     data:{
                         "address_name" : function(){return $("#address_name").val();},
                         "up_id" : function(){return $("#up_id").val();}
                     },
                     success:function(data){
                         if(data == "1"){
                             return true;
                         } else {
                             return "地址名称已存在,请重新输入!";
                         }
                     },
                     buttons: $("#btnOK"),
                     error: function(){alert("地址名称已存在,请重新输入!");},
                    onError:"地址名称已存在,请重新输入!",
                    onWait : "正在进行合法性校验,请稍候..."
            });
            $("#address_id").formValidator({empty:false,onFocus:"请输入地址编号"}).inputValidator({min:2,max:20,onError:"地址编号长度为2-20"}).regexValidator({regExp:"username",dataType:"enum",onError:"数据标识只能由字母或数字组成"});
            $("#address_sn").formValidator({empty:false,onFocus:"请输入顺序号"})
                .inputValidator({min:1,max:5,onError:"顺序号必须为1到5位"})
                .regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号必须为正整数"});
        
})
</script>
 
<div class="edit_txt">
    <form action="addBmSubmit.html" method="post"  id="myform" name="myform" >
          <input type="hidden" name="id" value="${RequestParameters.id}" />
          <input type="hidden" name="up_id" id="up_id" value="${info.UP_ID}" />
          <input type="hidden" name="level" id="level" value="${info.LEVEL}" />
         <table class="edit_layout" width="99%">
                <tr><th ><label class="required" >地址名称:</label></th>
                    <td><input class="general" type="text"  value="${info.ADDRESS_NAME}" name="address_name" id="address_name"/>
                    <div id="address_nameTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                <tr><th ><label class="required" >地址编号:</label></th>
                    <td><input class="general" type="text"  value="${info.ADDRESS_ID}" name="address_id" id="address_id"/>
                    <div id="address_idTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                <tr><th><label class="required">顺序号:</label></th>
                    <td ><input class="general" type="text" value="${info.ADDRESS_SN}" class="input-text" name="address_sn"  id="address_sn"/>
                    <div id="address_snTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                 
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>