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
167
168
169
170
171
172
173
174
175
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>配置修改</title>
[#include "/business/pages/include/static.html" /]
 
<script type="text/javascript">
$(document).ready(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;
        }});
        
        $("#ciname").formValidator({empty:false,onFocus:"请输入配置名称",onShow:"请输入配置名称"}).inputValidator({min:2,max:100,onError:"配置名称不能为空,长度在2-100位之间"});
        $("#xb_time").formValidator({empty:true,onFocus:"请选择续保时间",onShow:"请选择续保时间"}).inputValidator({min:0,max:32,onError:"续保时间不能为空"});
          $("#xbgb_time").formValidator({empty:true,onFocus:"请选择续保过保时间",onShow:"请选择续保过保时间"}).inputValidator({min:0,max:32,onError:"续保过保时间不能为空"});
        
    });
</script>
 
 
[#include "/component/DatePicker.html" /]
[#include "/component/sel.html" /]
</head>
 
<body class="equip_newadd_con_body">
[#if baseMsg?? && baseMsg?size>0]
    <form id="myform" action="${base}/business/pages/change/updateDevice.html" method="post">
    <input type="hidden" name="cate" id="cate" value="${baseMsg.THIRDLEVELID}" />
    <input type="hidden" name="id" id="id" value="${baseMsg.ID}" />
    <div class="edit_title"><h3>基本信息</h3></div>
    <table class="edit_layout">
        <tr>
            <th>
                <label class="required">配置名称:</label>
            </th>
            <td>
                <input class="general" type="text" name="ciname" id="ciname" value="${baseMsg.CINAME}"/>
                <div id="cinameTip" style="display:inline-block;"></div>
            </td>
            <th>
                <label>SN序列号:</label>
            </th>
            <td>
                <input class="general" type="text" name="sn" id="sn" value="${baseMsg.SN}"/>
            </td>
        </tr>
        
        <tr>
            <th>
                <label>负责部门(科室):</label>
            </th>
            <td>
                <input class="general" type="text" name="dept_name" id="dept_name" value="${baseMsg.DEPT_NAME}"/>
            </td>
            <th>
                <label>负责人:</label>
            </th>
            <td>
                <input class="general" type="text" name="ciadmin" id="ciadmin" value="${baseMsg.CIADMIN}"/>
            </td>
        </tr>
        
        
        <tr>
            <th>
                <label>配置厂商:</label>
            </th>
            <td>
                [@sel id="mainufacturerid" name="mainufacturerid"  source=cs textField="ID" valueField="MANUFACTURERNAME" labelName="mainufacturername" value="${baseMsg.MAINUFACTURERID}" text="${baseMsg.MAINUFACTURERNAME}" /]
            </td>
            <th>
                <label>集成商:</label>
            </th>
            <td>
                [@sel id="systemintegrationid" name="systemintegrationid"  source=jcs textField="ID" valueField="MANUFACTURERNAME" labelName="systemintegrationname" value="${baseMsg.SYSTEMINTEGRATIONID}" text="${baseMsg.SYSTEMINTEGRATIONNAME}"/]
            </td>
        </tr>
        <tr>
          <th>
                <label>状态:</label>
          </th>
          <td colspan="3">
          [@sel id="usingstate" name="usingstate"  source=types textField="typeId" valueField="typeName"  value="${baseMsg.USINGSTATE}" /]
          </td>
        </tr>
        
        <tr>
            <th>
                <label>位置:</label>
            </th>
            <td colspan="3">
                <input class="general maintitle" type="text" name="position" id="position" value="${baseMsg.POSITION}"/>
            </td>
        </tr>
        
        <tr>
            <th>
                <label>购买时间:</label>
            </th>
            <td>
                [@datepicker id="buy_time" name="buy_time" class="general" value=baseMsg.BUY_TIME /]
            </td>
            <th>
                <label>过保时间:</label>
            </th>
            <td>
                [@datepicker id="gb_time" name="gb_time" class="general" value=baseMsg.GB_TIME /] 
            </td>
        </tr>
        
        <tr>
            <th>
                <label>续保时间:</label>
            </th>
            <td>
                [@datepicker id="xb_time" name="xb_time" class="general" value=baseMsg.XB_TIME /]
            </td>
            <th>
                <label>续保过保时间:</label>
            </th>
            <td>
                [@datepicker id="xbgb_time" name="xbgb_time" class="general" value=baseMsg.XBGB_TIME /] 
            </td>
        </tr>
        
        [#include "/business/pages/cmdb/propform/prop.html" /]
        [@preview source=props.commonProp  textareaprop=props.textareaProp groupid="base" values=data valuesLabal=label /]
        
        <tr>
            <th class="postop"><label>备注:</label></th>
            <td colspan="3"><textarea class="general" name="note" id="note">${baseMsg.NOTE}</textarea></td>
        </tr>
    </table>
    
    [#if groupProps?? && groupProps?size>0]
        [#list groupProps as group]
            [#if (group.props?? && group.props?size>0) || (group.props1?? && group.props1?size>0)]
            <div class="edit_title"><h3>${group.GROUP_NAME}</h3></div>
                <table class="edit_layout">
                    [@preview source=group.props textareaprop=group.props1 groupid=group.ID values=data valuesLabal=label /]
                </table>
            [/#if]
        [/#list]
    [/#if]
    </form>
    
    <script type="text/javascript">
        function onDialogBtnClick(btnID, dialogID, config){
            if(btnID == "btnSure"){
                $("#myform").submit();
            }
        }
        
        $(function() {
            niceform(":checkbox").on("click",function() {
                var name = $(this).attr("name");
                
                var checkedBox = $(":checkbox[name='"+name+"']:checked");
                var labels = new Array();
                checkedBox.each(function() {
                    var label = $(this).parent().next("span").text();
                    labels.push(label);
                });
                $("#"+name+"_TEXT").val(labels.join(","));
            })
        })
    </script>
[/#if]
</body>
</html>