1 <script type="text/javascript">
2
3 function initSelectAndRadio(){
4 var openDelay=$("#open_delay").val();
5
6 var openOvertime=$("#open_overtime").val();
7
8 var firstOpen=$("#first_open").val();
9
10 if(openDelay!=null){
11
12 $("#door_open_delay").find("option[value=openDelay]").attr("selected",selected);
13 }
14 if(openOvertime!=null){
15 $("#door_open_overtime").find("option[value=openOvertime]").attr("selected",selected);
16 }
17 if(firstOpen!=null){
18
19 if($("input[name='first_open']").val()==firstOpen){
20 $("input[name='first_open']").attr("checked",true);
21 }
22 }
23 }
24
25 </script>
26 </head>
27 <body onload="getDevice_Num_update();initSelectAndRadio();">
28 <div class="easyui-panel" data-options="fit:true">
29 <form id="submitForm" style="margin: 40px 40px;" name="frm">
30 <input id="door_id" name="door_id" value="${doors.door_id}" type="hidden"/>
31 <input id="open_delay" name="open_delay" value="${doors.open_delay}" type="hidden"/>
32 <input id="open_overtime" name="open_overtime" value="${doors.open_overtime}" type="hidden"/>
33 <input id="first_open" name="first_open" value="${doors.first_open}" type="hidden"/>
34 <table class="gridtable" style="margin:0px auto">
35 <tr>
36 <td>设备名称:</td>
37 <td>
38 <input type="hidden" id="old_door_num" name="old_door_num" value="${doors.door_num}"/>
39 <input type="hidden" id="old_device_num" name="old_device_num" value="${doors.device_num}"/>
40 <select id="device_num_update" name="device_num" editable="false"
41 data-options="required:true" style="width: 171px">
42 <option value="${doors.device_num}">${doors.device_name}</option>
43 </select>
44 <span style="color:red">*</span>
45 </td>
46 </tr>
47 <tr>
48 <td>门名称:</td>
49 <td><input type="text" id="door_name_insert" name="door_name" value="${doors.door_name}" maxlength="20" class="easyui-validatebox"
50 data-options="required:true,validType:['length[0,25]']"/>
51 <span style="color:red">*</span>
52 </td>
53 </tr>
54 <tr>
55 <td>开门延时(单位:秒):</td>
56 <td>
57 <select id="door_open_delay" name="open_delay" editable="false" style="width: 171px">
58 <option value="0.5">0.5</option>
59 <option value="1">1</option>
60 <option value="1.5">1.5</option>
61 <option value="2">2</option>
62 <option value="2.5">2.5</option>
63 <option value="3">3 </option>
64 </select>
65 <span style="color:red"></span>
66 </td>
67 </tr>
68 <tr>
69 <td>开门超时(单位:秒):</td>
70 <td>
71 <select id="door_open_overtime" name="open_overtime" editable="false" style="width: 171px">
72 <option value="0.5">0.5</option>
73 <option value="1">1</option>
74 <option value="1.5">1.5</option>
75 <option value="2">2</option>
76 <option value="2.5">2.5</option>
77 <option value="3">3 </option>
78 </select>
79 <span style="color:red"></span>
80 </td>
81 </tr>
82 <tr>
83 <td>是否设置首卡开门:</td>
84 <td>
85 <div>
86 <input class="easyui-validatebox" type="radio" name="first_open" value="1" validType="requireRadio['frm','first_open']"/>Yes
87 <input class="easyui-validatebox" type="radio" name="first_open" value="0"/>No
88 <span style="color:red">*</span>
89 </div>
90 </td>
91 </tr>