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;
        }});
        
        
        $("#datakey").formValidator({empty:false,onFocus:"请输入数据标识,不能重复"}).inputValidator({min:1,max:20,onError:"数据标识不能为空"})
        .regexValidator({regExp:"username",dataType:"enum",onError:"数据标识只能由字母或数字组成"})
        .ajaxValidator({
            dataType : "html",
            async : true,
            url : "sjzdExists.html",
            data:{"id":'${sjzd.ID}',"cateId":'${sjzd.CATEGORYID}',"val":function(){return document.getElementById("datakey").value;}},
            success : function(data){
                if( data == 0 ) return true;
                if( data == 1 ) return false;
                return false;
            },
            buttons: $("#dosubmit"),
            error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
            onError : "标识已存在,请更换",
            onWait : "正在校验,请稍候..."
        });
        $("#datavalue").formValidator({empty:false,onFocus:"请输入数据值"}).inputValidator({min:1,max:50,onError:"数据值不能为空"});
        $("#ordernum").formValidator({empty:false,onFocus:"请输入顺序号"}).inputValidator({min:1,max:5,onError:"顺序号必须为1到5位数字"})
            .regexValidator({regExp:"intege", dataType:"enum", onError:"顺序号必须为1到5位数字"});
        
})
</script>
 
<div class="edit_txt">
    <form action="${base}/business/pages/xtgl/xtpz/sjzd/updateSjzd.html" method="post"  id="myform" name="myform" >
         <input type="hidden" name="id" value="${sjzd.ID}" />
         <input type="hidden" name="categoryid" value="${sjzd.CATEGORYID}" />
         <table class="edit_layout" width="99%">
                <tr><th ><label class="required" >数据标识:</label></th>
                    <td><input class="general" type="text" name="datakey" id="datakey" value="${sjzd.DATAKEY}"/>
                    <div id="datakeyTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
                <tr><th><label class="required" >数据值:</label></th>
                    <td ><input class="general" type="text" name="datavalue" id="datavalue" value="${sjzd.DATAVALUE}"/>
                    <div id="datavalueTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
                
                
                <tr><th><label class="required">顺序号:</label></th>
                    <td ><input class="general" type="text" name="ordernum"  id="ordernum" value="${sjzd.ORDERNUM}"/>
                    <div id="ordernumTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
                
                 
                <tr><th><label >说明:</label></th>
                    <td ><textarea class="general" style="width:360px;" id="beiz" name="beiz" />${sjzd.BEIZ}</textarea>
                    </td>
                </tr>
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>