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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!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;
        }});
        
        
        $("#categoryName").formValidator({empty:false,onShow:"请填写分类名称",onFocus:"分类名称不能为空!"})
                    .inputValidator({min:1,max:50,onError:"分类名称长度不能超过50个字符!"});
            
            $("#ordernum").formValidator({empty:false,onShow:"请输入顺序号",onFocus:"顺序号不能为空"})
            .inputValidator({min:1,max:3,onError:"顺序号必须为1到3位数字"})
            .regexValidator({regExp:"intege", dataType:"enum", onError:"顺序号必须为1到3位数字"});
            $(".wah").formValidator({tipID:"wahtip",onShow:"请输入整数",empty:true}).regexValidator({regExp:"num",dataType:"enum",onError:"整数格式不正确"});
        
})
 
 
$(function() {
    
       $("#hasTitleImage").click(function() {
          if($(this).is(":checked")) {
              $(".imageMsg").show();
          }
       });
       $("#noTitleImage").click(function() {
          if($(this).is(":checked")) {
              $(".imageMsg").hide();
          }
       });
       $("#noslt").click(function() {
          if($(this).is(":checked")) {
              $("#imageWidthAndHeight").hide();
          }
       });
       
       $("#dbslt,#qzslt").click(function() {
          if($(this).is(":checked")) {
              $("#imageWidthAndHeight").show();
          }
       });
    })
</script>
 
<div class="edit_txt">
    <form action="updateColunm.html" method="post"  id="myform" name="myform" enctype="multipart/form-data">
         <input type="hidden" name="up_id" value="${pId}" />
         <input type="hidden" name="id" value="${cate.ID}"/>
         <table class="edit_layout" width="99%">
                <tr><th ><label class="required" >分类名称:</label></th>
                    <td><input class="general" type="text" name="categoryName" id="categoryName" value="${cate.CATEGORY_NAME}"/>
                    <div id="categoryNameTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
                <tr><th><label class="required">分类图片:</label></th>
                    <td ><input type="file" name="classifyimage" id="classifyImage"/>
                         <input type="hidden" value="${cate.CLASSIFYIMAGE}" name="classifyImage"/> 
                              <img src="${base}${cate.CLASSIFYIMAGE}"/>
                    </td>
                </tr>
                
                
                <tr><th><label class="required">显示顺序:</label></th>
                    <td ><input class="general" type="text" name="ordernum"  id="ordernum" value="${cate.ORDERNUM}"/>
                    <div id="ordernumTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>展示类型:</label></th>
                    <td>
                    <select  name="showType" style="width:100px;">
                        <option value="1" [#if cate.SHOW_TYPE == 1]checked="true"[/#if]>列表</option>  
                        <option value="2" [#if cate.SHOW_TYPE == 2]checked="true"[/#if]>单信息</option>  
                    </select> 
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>摘要:</label></th>
                    <td>
                    <input type="radio" value="1" name="summary" [#if cate.SUMMARY == 1]checked="true"[/#if]/>有
                    <input type="radio" value="2" name="summary" [#if cate.SUMMARY == 2]checked="true"[/#if]/>无
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>附件:</label></th>
                    <td>
                    <input type="radio" value="1" name="attachements" [#if cate.ATTACHEMENTS == 1]checked="true"[/#if] />有
                    <input type="radio" value="2" name="attachements" [#if cate.ATTACHEMENTS == 2]checked="true"[/#if]/>无
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>审批:</label></th>
                    <td>
                    <input type="radio" value="1" name="shenpi" [#if cate.SHENPI == 1]checked="true"[/#if] />否
                    <input type="radio" value="2" name="shenpi" [#if cate.SHENPI == 2]checked="true"[/#if]/>是
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>是否上报:</label></th>
                    <td>
                    <input type="radio" value="1" name="shangb" [#if cate.SHANGB == 1]checked="true"[/#if] />否
                    <input type="radio" value="2" name="shangb" [#if cate.SHANGB == 2]checked="true"[/#if]/>是
                    </td>
                </tr>
                <tr>
                    <th align="right"><label>标题图片:</label></th>
                    <td>
                    <input type="radio" value="1" name="titleimage" id="hasTitleImage" [#if cate.TITLEIMAGE == 1]checked="true"[/#if] />有
                    <input type="radio" value="2" name="titleimage" id="noTitleImage" [#if cate.TITLEIMAGE == 2]checked="true"[/#if]/>无
                    </td>
                </tr>
                <tr class="imageMsg" [#if cate.TITLEIMAGE != 1]style="display:none;"[/#if]>
                    <th align="right"><label>缩略图:</label></th>
                    <td>
                    <input type="radio" value="1" name="thumbnail" id="noslt" [#if cate.THUMBNAIL == 1]checked="true"[/#if]/>不启用
                    <input type="radio" value="2" name="thumbnail" id="dbslt" [#if cate.THUMBNAIL == 2]checked="true"[/#if]/>等比
                    <input type="radio" value="3" name="thumbnail" id="qzslt" [#if cate.THUMBNAIL == 3]checked="true"[/#if]/>强制
                    </td>
                </tr>
                <tr id="imageWidthAndHeight" class="imageMsg" [#if cate.THUMBNAIL == 1]style="display:none;"[/#if]>
                    <th align="right"><label>图片宽高:</label></th>
                    <td>
                    宽:<input name="titleimageWidth" class="input-text wah" style="height:20px;width:40px;" value="${cate.TITLEIMAGE_WIDTH}"/>
                    高:<input name="titleimageHeight" class="input-text wah" style="height:20px;width:40px;" value="${cate.TITLEIMAGE_HEIGHT}"/>
                    <div id="wahtip" style="display:inline-block;width: 300px;"></div>
                    </td>
                </tr>
                
                
                <tr>
                    <th align="right"><label>备注:</label></th>
                    <td>
                    <textarea rows="3" cols="60" name="note">${cate.NOTE}</textarea>
                    </td>
                </tr>
                 
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>