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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>增加/修改配置分类</title>
 
[#include "/business/pages/include/static.html" /]
</head>
<body class="end_task_body widthauto">
 
<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;
        }});
        
        
        $("#gnmc").formValidator({empty:false,onFocus:"请输入功能的名称"}).inputValidator({min:4,max:20,onError:"功能名称4-20个字符或2-10个汉字"});
    [#if RequestParameters.type == 2 || info.TYPE == 3]
    $("#address").formValidator({empty:false,onShow:"功能的访问地址",onFocus:"请输入功能的访问地址"}).inputValidator({min:4,max:80,onError:"功能地址4-80个字符或2-40个汉字"});
    
    [#if info.GN_MARK == ""]
    $("#gn_mark").formValidator({empty:false,onShow:"请输入功能标志",onFocus:"功能标志由大写字母组成长度为3~10位"}).inputValidator({min:3,max:10,onCorrect:"123",onError:"功能标志由大写字母组成长度为3~10位"})
    .regexValidator({regExp:"letter_u",param:"g",dataType:"enum",onError:"功能标志只能由大写字母组成"})
    .ajaxValidator({
        dataType : "html",
        async : true,
        url : "checkGn_mark.html?sjbh=${sjbh}",
        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 : "正在对标志进行合法性校验,请稍候..."
    });
    [#else]
    $("#gn_mark").formValidator({empty:false,onShow:"功能标志不允许修改!",onFocus:"功能标志不允许修改!"}).inputValidator({min:3,max:10,onCorrect:"123",onError:"功能标志不允许修改!"});
    [/#if]
[/#if]
    $("#sxh").formValidator({empty:false,onFocus:"请输入顺序号"}).inputValidator({min:1,max:5,onError:"顺序号必须为1到5位"})
        .regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号必须为正整数"});
    $("#big_image").formValidator({empty:true,onShow:"大图标用在页面头部,目前仅对一级菜单有效!",onFocus:"大图标用在页面头部,目前仅对一级菜单有效!"})
        .inputValidator({min:3,max:200,onError:"非法文件路径"})
        .regexValidator({regExp:"picture1", dataType:"enum", onError:"文件格式必须为:jpg|jpeg||png格式"});
    $("#medium_image").formValidator({empty:true,onShow:"中图标用在页面左侧菜单,目前仅对三级菜单有效!",onFocus:"中图标用在页面左侧菜单,目前仅对三级菜单有效!"})
        .inputValidator({min:3,max:200,onError:"非法文件路径"})
        .regexValidator({regExp:"picture1", dataType:"enum", onError:"文件格式必须为:jpg|jpeg||png格式"});
    $("#small_image").formValidator({empty:true,onShow:"小图标用在功能选项卡,目前仅对二、三级菜单有效!",onFocus:"小图标用在功能选项卡,目前仅对二、三级菜单有效!"})
        .inputValidator({min:3,max:200,onError:"非法文件路径"})
        .regexValidator({regExp:"picture1", dataType:"enum", onError:"文件格式必须为:jpg|jpeg||png格式"});
        
})
</script>
 
<div class="edit_txt">
    <form action="addXtgnSubmit.html" method="post" enctype="multipart/form-data" id="myform" name="myform" >
          <input type="hidden" name="sjbh" value="${RequestParameters.sjbh!info.SJBH}" />
          <input type="hidden" name="id" value="${RequestParameters.id!info.ID}" />
         <table class="edit_layout2">
                <tr><th ><label class="required" >功能名称:</label></th>
                    <td><input class="general" type="text"  value="${info.GNMC}" name="gnmc" id="gnmc"/>
                    
                    </td>
                    <td><div id="gnmcTip" style="display:inline-block;"></div></td>
                </tr>
                [#if RequestParameters.type == 2 || info.TYPE == 3]
                <tr><th ><label class="required" >功能地址:</label></th>
                    <td><input class="general" type="text"  value="${info.ADDRESS}" name="address" id="address" style="width:98%;"/>
                   
                    </td>
                    <td><div id="addressTip" style="display:inline-block;width:250px;"></div></td>
                </tr>
                <tr><th ><label class="required" >功能标志:</label></th>
                    <td><input class="general" type="text"  value="${info.GN_MARK}" name="gn_mark" id="gn_mark"  style="width:130px;" [#if info.GN_MARK !=""]readonly[/#if] />
                    
                    </td>
                    <td><div id="gn_markTip" style="display:inline-block;width:300px;"></div></td>
                </tr>
                [/#if]
                <tr><th ><label class="required" >顺序号:</label></th>
                    <td><input class="general" type="text" value="${info.SXH}" name="sxh" id="sxh"/>
                    
                    </td>
                    <td><div id="sxhTip" style="display:inline-block;width:200px;"></div></td>
                </tr>
                <tr>
                   <th align="right">是否预留:</th>
                   <td colspan="2" >
                        <input class="audit" type="radio" name="sfyl" value="0" checked />否
                        <input class="audit" type="radio" name="sfyl" value="1" [#if info.SFYL == 1] checked [/#if] />是
                    </td>
                </tr>
                <tr>
                   <th align="right">大图标:</th>
                   <td><input type="file" value="" class="general" name="big_image"  id="big_image" style="width:130px;"/>
                   [#if info.BIG_IMAGE??]<img src="${base+info.BIG_IMAGE}" border="0" />[/#if]
                   
                   </td>
                   <td><div id="big_imageTip" style="width:320px;"></div></td>
                </tr>
                <tr>
                   <th align="right">中图标:</th>
                   <td><input type="file" value="" class="general" name="medium_image"  id="medium_image" style="width:130px;"/>
                    [#if info.MEDIUM_IMAGE??]<img src="${base+info.MEDIUM_IMAGE}" border="0" />[/#if]
                  
                   </td>
                   <td> <div id="medium_imageTip" style="width:320px;"></div></td>
                </tr>
                <tr>
                   <th align="right">小图标:</th>
                   <td><input type="file" value="" class="general" name="small_image"  id="small_image" style="width:130px;"/>
                    [#if info.SMALL_IMAGE??]<img src="${base+info.SMALL_IMAGE}" border="0" />[/#if]
                   
                   </td>
                   <td><div id="small_imageTip" style="width:320px;"></div></td>
                </tr>
                <tr><th><label >说明:</label></th>
                    <td  colspan="2"><textarea class="general" style="width:360px;" name="beiz" id="beiz"/>${info.BEIZ}</textarea>
                    </td>
                </tr>
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>