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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>新增领域DSL</title>
 
[#include "/business/pages/include/static.html" /]
</head>
<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;
        }});
        
        
        $("#dsl_name").formValidator({empty:false,onFocus:"DSL名称不能为空",onShow:"请输入DSL名称!"}).inputValidator({min:1,max:200,onError:"DSL名称为1到200个字符"});
        $("#dslCateId").formValidator({empty:false,onFocus:"DSL分类不能为空",onShow:"请选择DSL分类!",onFocus:"DSL分类不能为空"}).inputValidator({min:1,onError:"DSL分类不能为空"});
        $("#order_num").formValidator({empty:false,onShow:"请输入顺序号!",onFocus:"请输入顺序号!"})
         .regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号格式不正确"});
})
</script>
 
[#if dsl?? && dsl?size>0]
<div class="edit_txt">
    <form id="myform" action="${base}/business/pages/servicelist/dsl/updateDsl.html" method="post">
         <input type="hidden" value="${id}" name="id" />
         <table class="edit_layout">
                 [#if dsl.type==1]
                      <tr><th width="20%"><label class="required">DSL名称:</label></th>
                        <td style="width:160px;">
                        <label>${dsl.DSL_NAME}</label>
                        <input class="general" type="hidden" name="dsl_name" id="dsl_name" value="${dsl.DSL_NAME}"/>
                        </td>
                    </tr>
                    <tr><th><label class="required">DSL分类:</label></th>
                        <td style="width:160px;">
                        <label>${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}</label>
                        <input type="hidden" id="dslCateName" readonly name="dslCateName" class="general" onclick="showDslCate();" style="width:300px;" value="${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}"/>
                        <input type="hidden" id="dslCateId" name="dslCateId" value="${dsl.DSL_FIRST_CATEGORY_ID}-${dsl.DSL_SECOND_CATEGORY_ID}-${dsl.DSL_THIRD_CATEGORY_ID}"/>
                        </td>
                    </tr>
                 [#else]
                    <tr><th width="20%"><label class="required">DSL名称:</label></th>
                        <td style="width:160px;"><input class="general" type="text" name="dsl_name" id="dsl_name" value="${dsl.DSL_NAME}"/>
                        <font color="red">*</font><div id="dsl_nameTip" style="display:inline-block;"></div>
                        </td>
                    </tr>
                    <tr><th><label class="required">DSL分类:</label></th>
                        <td style="width:160px;">
                        <input type="text" id="dslCateName" readonly name="dslCateName" class="general" onclick="showDslCate();" style="width:300px;" value="${dsl.DSL_FIRST_CATEGORY_NAME}-${dsl.DSL_SECOND_CATEGORY_NAME}-${dsl.DSL_THIRD_CATEGORY_NAME}"/>
                            <input type="hidden" id="dslCateId" name="dslCateId" value="${dsl.DSL_FIRST_CATEGORY_ID}-${dsl.DSL_SECOND_CATEGORY_ID}-${dsl.DSL_THIRD_CATEGORY_ID}"/>
                        <font color="red">*</font><div id="dslCateIdTip" style="display:inline-block;"></div>
                        </td>
                    </tr>
                 [/#if]
                
                <tr><th width="20%"><label class="required">顺序号:</label></th>
                    <td style="width:160px;"><input class="general" type="text" name="order_num" id="order_num" value="${dsl.ORDER_NUM}"/>
                    <font color="red">*</font><div id="order_numTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                
                <tr><th><label >备注:</label></th>
                    <td ><textarea class="general" name="note" id="note" />${dsl.NOTE}</textarea>
                    </td>
                </tr>
            </table>
     </form>
</div>
[/#if]
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
    
    
    function showDslCate() {
        var dslCateName = $("#dslCateName").val();
        var dslCateId = $("#dslCateId").val();
        var url = "${base}/business/pages/servicelist/dsl/dslLevelTree.html";
        if(!$.util.isEmpty(dslCateId)&&!$.util.isEmpty(dslCateName)) {
            var names = dslCateName.split("-");
            var ids = dslCateId.split("-");
            if(ids.length==3) {
                url += "?cates="+ids[2];
            }
        }
        
        window.top.openDialog("selectDslCate","选择DSL分类",
                             {},
                             {"width":80,"height":80},
                             [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
    }
    
    
    function showName(labelId,labelName) {
        $("#dslCateName").val(labelName);
        $("#dslCateId").val(labelId);
    }
</script>
 
</body>
</html>