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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>增加/修改DSL配置</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(){
                        if(!window.top.openConfirm("确定要提交吗?")) return false;
                        document.getElementById("myform").target = window.top.openDialog("tip","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
        }});
        
        
        $("#name").formValidator({empty:false,onShow:"请填写分类名称",onFocus:"分类名称不能为空!"})
                    .inputValidator({min:1,max:50,onError:"分类名称长度不能超过50个字符!"})
                    .ajaxValidator({
                dataType : "html",   
                async : true,     
                data:"id=${info.id}",
                url : "checkconfigName.html?pId=${RequestParameters.pId}&thirdCate=${RequestParameters.thirdCate}",
                success : function(data){    
                    if( data == 1 ) return true;
                    if( data == 0 ) return false;
                    return false;
                },
                buttons: $("#dosubmit"),
                error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
                onError : "该分类名称已存在,请更换",
                onWait : "正在对分类名称进行校验,请稍候..."  
       });
               
    
        $("#sort_id").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="" method="post" id="myform" name="myform" enctype="multipart/form-data">
         <input type="hidden" name="configId" value="${configId}"/>
         <input type="hidden" name="thirdCate" value="${RequestParameters.thirdCate}"/>
           <input type="hidden" name="pId" id="pId" value="${RequestParameters.pId}"/>
         <table class="edit_layout" width="99%">
                <tr><th ><label class="required" >分类名称:</label></th>
                    <td><input class="general" type="text" value="${info.name}" name="name" id="name"/>
                    <div id="nameTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                
                <tr><th ><label class="required" >显示顺序:</label></th>
                    <td><input class="general" type="text" value="${info.sort_id}" name="sort_id" id="sort_id"/>
                    <div id="sort_idTip" style="display:inline-block;width:200px;"></div>
                    </td>
                </tr>
                
                <tr><th><label >分类说明:</label></th>
                    <td ><textarea class="general" style="width:360px;" name="note" id="note"/>${info.note}</textarea>
                    </td>
                </tr>
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>