ソースを参照

保修平台修改

yangjunfeng 5 年 前
コミット
dcabd32406

+ 1 - 1
WebUI/CallCenterWeb.UI/equipmentOperationManage/equipmentRepair.html

@@ -199,7 +199,7 @@
199 199
 									<!--<th data-field="sysname" data-align="center">系统名称</th>
200 200
 									<th data-field="equipname" data-align="center">设备名称</th>
201 201
 									<th data-field="faulttype" data-align="center">故障类型</th>-->
202
-									<th data-field="faultdescripe" data-align="center" data-formatter="formatterDescripe">故障说明</th>
202
+									<th data-field="faultdescripe" data-align="center" data-formatter="formatterDescripe">设备名称</th>
203 203
 									<!--<th data-field="appointman" data-align="center">指定维修人</th>-->
204 204
 									<th data-field="" data-align="center" data-formatter="formatterToUser">接单人</th>
205 205
 									<th data-field="totime" data-align="center">接单时间</th>

+ 3 - 3
WebUI/CallCenterWeb.UI/equipmentOperationManage/floorManage.html

@@ -125,7 +125,7 @@
125 125
 								<!--<th data-field="floorname">楼名称</th>-->
126 126
 								<th data-field="projectname">项目名称</th>
127 127
 								<!--<th data-field="sortnum">排序</th>-->
128
-								<th data-field="buildname" data-align="center" data-formatter="oper" data-events="operateEvents">维修班组
128
+								<th data-field="buildname" data-align="center" data-formatter="oper" data-events="operateEvents">楼名称
129 129
 									<span class="tool_bars">
130 130
 										<a class="tjzd" title="添加字典" authorize="yes" id="HY_addL" onclick="btn_addL()"><i class="addZiDian"></i></a>
131 131
 									</span>
@@ -142,9 +142,9 @@
142 142
 							<thead>
143 143
 								<tr>
144 144
 									<th data-field="state" data-checkbox="true"></th>
145
-									<!-- <th data-field="floorname">楼层名称</th> -->
145
+									<th data-field="floorname">楼层名称</th>
146 146
 									<!--<th data-field="projectname">项目名称</th>-->
147
-									<th data-field="remark">设备名称</th>
147
+									<th data-field="remark">科室名称</th>
148 148
 									<th data-field="sortnum">排序</th>
149 149
 									<th data-align="center" data-formatter="formatterOperate">操作</th>
150 150
 								</tr>

+ 214 - 177
WebUI/CallCenterWeb.UI/equipmentOperationManage/js/addEquipmentRepair.js

@@ -1,190 +1,227 @@
1
-
2
-
3 1
 //省市联动
4 2
 function getProvinceCity(ele1, isasync) {
5
-    if (isasync != false) {
6
-        isasync = true;
7
-    }
8
-    $.ajaxSettings.async = isasync;
9
-    ele1.empty();
10
-    ele1.append('<option selected="selected" value="">请选择省</option>');
11
-    $.getJSON(huayi.config.callcenter_url + "equipmentapi/api/equipment/getfivetree", function (data) {
12
-        if (data.state.toLowerCase() == "success") {
13
-            var province = data.data;
14
-            var citys = []; //市
15
-            var projects = []; //项目
16
-            var builds = []; //楼
17
-            var floors = []; //楼层
18
-            $(data.data).each(function (i, n) {
19
-                $("<option value='" + n.code + "' selected='selected'>" + n.name + "</option>").appendTo(ele1);
20
-                ele1.selectpicker('refresh');
21
-                if (n.entityJson != null && n.entityJson.length != 0) {
22
-                    citys.push(n.entityJson);
3
+	if (isasync != false) {
4
+		isasync = true;
5
+	}
6
+	$.ajaxSettings.async = isasync;
7
+	ele1.empty();
8
+	ele1.append('<option selected="selected" value="">请选择省</option>');
9
+	$.getJSON(huayi.config.callcenter_url + "equipmentapi/api/equipment/getfivetree", function(data) {
10
+		if (data.state.toLowerCase() == "success") {
11
+			var province = data.data;
12
+			var citys = []; //市
13
+			var projects = []; //项目
14
+			var builds = []; //楼
15
+			var floors = []; //楼层
16
+			$(data.data).each(function(i, n) {
17
+				$("<option value='" + n.code + "' selected='selected'>" + n.name + "</option>").appendTo(ele1);
18
+				ele1.selectpicker('refresh');
19
+				if (n.entityJson != null && n.entityJson.length != 0) {
20
+					citys.push(n.entityJson);
21
+
22
+					for (var c = 0; c < citys.length; c++) {
23
+						$(citys[c]).each(function(j, v) {
24
+							if (v.parentcode > 0) {
25
+
26
+								$("<option value='" + v.code + "'  selected='selected'>" + v.name + "</option>").appendTo("#city");
27
+								$("#city").selectpicker('refresh');
28
+								if (v.entityJson != null && v.entityJson.length > 0) {
29
+									projects.push(v.entityJson);
30
+								}
31
+							}
32
+						});
33
+					}
23 34
 
24
-                    for (var c = 0; c < citys.length; c++) {
25
-                        $(citys[c]).each(function (j, v) {
26
-                            if (v.parentcode > 0) {
27
-                              
28
-                                $("<option value='" + v.code + "'  selected='selected'>" + v.name + "</option>").appendTo("#city");
29
-                                $("#city").selectpicker('refresh');
30
-                               if (v.entityJson != null && v.entityJson.length > 0) {
31
-                                   projects.push(v.entityJson);
32
-								   
33
-                               }
34
-                            }
35
-                        });
36
-                    }
35
+					for (var j = 0; j < projects.length; j++) {
36
+						$(projects[j]).each(function(i, n) {
37
+							if (n.parentcode > 0) {
38
+								$('#protype_addText').val(n.protypename);
39
+								$('#protype_addNode').val(n.protypeid);
40
+								$("<option value='" + n.code + "'  selected='selected'>" + n.name + "</option>").appendTo("#proname");
41
+								$("#proname").selectpicker('refresh');
42
+								if (n.entityJson != null && n.entityJson.length > 0) {
43
+									builds.push(n.entityJson);
44
+								}
45
+							}
46
+						});
47
+					}
37 48
 
38
-                    for (var j = 0; j < projects.length; j++) {
39
-                        $(projects[j]).each(function (i, n) {
40
-                            if (n.parentcode > 0) {
41
-                                    $('#protype_addText').val(n.protypename);
42
-                                    $('#protype_addNode').val(n.protypeid);
43
-                                    $("<option value='" + n.code + "'  selected='selected'>" + n.name + "</option>").appendTo("#proname");
44
-                                    $("#proname").selectpicker('refresh');
45
-                                    if (n.entityJson != null && n.entityJson.length > 0) {
46
-                                        builds.push(n.entityJson);
47
-                                    }
48
-                            }
49
-                        });
50
-                    }
51 49
 
52 50
 
51
+					for (var g = 0; g < builds.length; g++) {
52
+						$(builds[g]).each(function(q, p) {
53
+							if (p.parentcode) {
53 54
 
54
-                    for (var g = 0; g < builds.length; g++) {
55
-                        $(builds[g]).each(function (q, p) {
56
-                            if (p.parentcode) {
57
-                                
58
-                                $("<option value='" + p.code + "'>" + p.name + "</option>").appendTo("#build");
59
-                                $("#build").selectpicker('refresh');
60
-                                    if (p.entityJson != null && p.entityJson.length > 0) {
61
-                                        floors.push(p.entityJson);
62
-                                    }
63
-                            }
64
-                        });
65
-                    }
55
+								$("<option value='" + p.code + "'>" + p.name + "</option>").appendTo("#build");
56
+								$("#build").selectpicker('refresh');
57
+								if (p.entityJson != null && p.entityJson.length > 0) {
58
+									floors.push(p.entityJson);
59
+								}
60
+							}
61
+						});
62
+					}
66 63
 
67 64
 
68
-                    for (var k = 0; k < floors.length; k++) {
69
-                        $(floors[k]).each(function (y, z) {
70
-                            if (z.parentcode) {
71
-                                    $("<option value='" + z.code + "'>" + z.name.slice(1) + "</option>").appendTo("#floor");
72
-                                    $("#floor").selectpicker('refresh');
73
-                            }
74
-                        });
75
-                    }
65
+					for (var k = 0; k < floors.length; k++) {
66
+						$(floors[k]).each(function(y, z) {
67
+							if (z.parentcode) {
68
+								$("<option value='" + z.code + "'>" + z.name + "</option>").appendTo("#floor");
69
+								$("#floor").selectpicker('refresh');
70
+							}
71
+						});
72
+					}
76 73
 
77
-                }
74
+				}
78 75
 
79
-            })
80
-            //市级信息
81
-            $("#province").change(function () {
82
-                $("#city").empty();
83
-                projects = [];
84
-                for (var i = 0; i < citys.length; i++) {
85
-                    $(citys[i]).each(function (j, v) {
86
-                        if (v.parentcode > 0) {
87
-                            if ($("#province").val() == v.parentcode) {
88
-                                $("<option value='" + v.code + "'>" + v.name + "</option>").appendTo("#city");
89
-                                if (v.entityJson != null && v.entityJson.length > 0) {
90
-                                    projects.push(v.entityJson);
91
-                                }
92
-                            }
93
-                        }
94
-                    });
95
-                }
96
-                $("#city").selectpicker('refresh');
97
-                if ($("#province").val() == '') {
98
-                    $("#city").append('<option selected="selected" value="">请选择所在市</option>');
99
-                }
100
-                if ($("#city").val() == null) {
101
-                    $("#city").append('<option selected="selected" value="">暂无数据</option>');
102
-                }
103
-                $("#city").trigger('change');
104
-            })
105
-            //项目信息
106
-            $("#city").change(function () {
107
-                $("#proname").empty();
108
-                builds = [];
109
-                $('#protype_addText').val('');
110
-                $('#protype_addNode').val('');
111
-                for (var j = 0; j < projects.length; j++) {
112
-                    $(projects[j]).each(function (i, n) {
113
-                        if (n.parentcode > 0) {
114
-                            if ($("#city").val() == n.parentcode) {
115
-                                $('#protype_addText').val(n.protypename);
116
-                                $('#protype_addNode').val(n.protypeid);
117
-                                $("<option value='" + n.code + "'>" + n.name + "</option>").appendTo("#proname");
118
-                                if (n.entityJson != null && n.entityJson.length > 0) {
119
-                                    builds.push(n.entityJson);
120
-                                }
121
-                            }
122
-                        }
123
-                    });
124
-                }
125
-                $("#proname").selectpicker('refresh');
126
-                if ($("#city").val() == '') {
127
-                    $("#proname").append('<option selected="selected" value="">请选择项目</option>');
128
-                }
129
-                if ($("#proname").val() == null || $("#proname").val() == '') {
130
-                    $("#proname").append('<option selected="selected" value="">暂无数据</option>');
131
-                }
132
-                $("#proname").trigger('change');
76
+			})
77
+			//市级信息
78
+			$("#province").change(function() {
79
+				$("#city").empty();
80
+				projects = [];
81
+				for (var i = 0; i < citys.length; i++) {
82
+					$(citys[i]).each(function(j, v) {
83
+						if (v.parentcode > 0) {
84
+							if ($("#province").val() == v.parentcode) {
85
+								$("<option value='" + v.code + "'>" + v.name + "</option>").appendTo("#city");
86
+								if (v.entityJson != null && v.entityJson.length > 0) {
87
+									projects.push(v.entityJson);
88
+								}
89
+							}
90
+						}
91
+					});
92
+				}
93
+				$("#city").selectpicker('refresh');
94
+				if ($("#province").val() == '') {
95
+					$("#city").append('<option selected="selected" value="">请选择所在市</option>');
96
+				}
97
+				if ($("#city").val() == null) {
98
+					$("#city").append('<option selected="selected" value="">暂无数据</option>');
99
+				}
100
+				$("#city").trigger('change');
101
+			})
102
+			//项目信息
103
+			$("#city").change(function() {
104
+				$("#proname").empty();
105
+				builds = [];
106
+				$('#protype_addText').val('');
107
+				$('#protype_addNode').val('');
108
+				for (var j = 0; j < projects.length; j++) {
109
+					$(projects[j]).each(function(i, n) {
110
+						if (n.parentcode > 0) {
111
+							if ($("#city").val() == n.parentcode) {
112
+								$('#protype_addText').val(n.protypename);
113
+								$('#protype_addNode').val(n.protypeid);
114
+								$("<option value='" + n.code + "'>" + n.name + "</option>").appendTo("#proname");
115
+								if (n.entityJson != null && n.entityJson.length > 0) {
116
+									builds.push(n.entityJson);
117
+								}
118
+							}
119
+						}
120
+					});
121
+				}
122
+				$("#proname").selectpicker('refresh');
123
+				if ($("#city").val() == '') {
124
+					$("#proname").append('<option selected="selected" value="">请选择项目</option>');
125
+				}
126
+				if ($("#proname").val() == null || $("#proname").val() == '') {
127
+					$("#proname").append('<option selected="selected" value="">暂无数据</option>');
128
+				}
129
+				$("#proname").trigger('change');
133 130
 
134
-            })
135
-            //楼信息
136
-            $("#proname").change(function () {
137
-                $("#build").empty();
138
-                floors = [];
139
-                $('<option selected="selected" value="">请选择楼</option>').appendTo("#build");
140
-                for (var g = 0; g < builds.length; g++) {
141
-                    $(builds[g]).each(function (q, p) {
142
-                        if (p.parentcode) {
143
-                            if ($("#proname").val() == p.parentcode) {
144
-                                $("<option value='" + p.code + "'>" + p.name + "</option>").appendTo("#build");
145
-                                if (p.entityJson != null && p.entityJson.length > 0) {
146
-                                    floors.push(p.entityJson);
147
-                                }
148
-                            }
149
-                        }
150
-                    });
151
-                }
152
-                $("#build").selectpicker('refresh');
153
-                if ($("#proname").val() == '') {
154
-                    $("#build").append('<option selected="selected" value="">请选择科室</option>');
155
-                }
156
-                //              if ($("#build").val() == null || $("#build").val() == '') {
157
-                if ($("#build").val() == null) {
158
-                    $("#build").append('<option selected="selected" value="">暂无数据</option>');
159
-                }
160
-                $("#build").trigger('change');
161
-            })
162
-            //楼层信息
163
-            $("#build").change(function () {
164
-                $("#floor").html('');
165
-                $("#floor").append('<option selected="selected" value="">请选择物品</option>');
166
-                for (var k = 0; k < floors.length; k++) {
167
-                    $(floors[k]).each(function (y, z) {
168
-                        if (z.parentcode) {
169
-                            if ($("#build").val() == z.parentcode) {
170
-                                $("<option value='" + z.code + "'>" + z.name.slice(1) + "</option>").appendTo("#floor");
171
-                            }
172
-                        }
173
-                    });
174
-                }
175
-                $("#floor").selectpicker('refresh');
176
-                if ($("#build").val() == '') {
177
-                    $("#floor").append('<option selected="selected" value="">请选择物品</option>');
178
-                }
179
-                //              if ($("#floor").val() == null || $("#floor").val() == '') {
180
-                if ($("#floor").val() == null) {
181
-                    $("#floor").append('<option selected="selected" value="">暂无数据</option>');
182
-                }
183
-                $("#floor").trigger('change');
184
-            })
185
-        }
186
-        if (!isasync) {
187
-            $.ajaxSettings.async = true;
188
-        }
189
-    })
131
+			})
132
+			//楼信息
133
+			$("#proname").change(function() {
134
+				$("#build").empty();
135
+				floors = [];
136
+				$('<option selected="selected" value="">请选择楼</option>').appendTo("#build");
137
+				for (var g = 0; g < builds.length; g++) {
138
+					$(builds[g]).each(function(q, p) {
139
+						if (p.parentcode) {
140
+							if ($("#proname").val() == p.parentcode) {
141
+								$("<option value='" + p.code + "'>" + p.name + "</option>").appendTo("#build");
142
+								if (p.entityJson != null && p.entityJson.length > 0) {
143
+									floors.push(p.entityJson);
144
+								}
145
+							}
146
+						}
147
+					});
148
+				}
149
+				$("#build").selectpicker('refresh');
150
+				if ($("#proname").val() == '') {
151
+					$("#build").append('<option selected="selected" value="">请选择科室</option>');
152
+				}
153
+				//              if ($("#build").val() == null || $("#build").val() == '') {
154
+				if ($("#build").val() == null) {
155
+					$("#build").append('<option selected="selected" value="">暂无数据</option>');
156
+				}
157
+				$("#build").trigger('change');
158
+			})
159
+			//楼层信息
160
+			$("#build").change(function() {
161
+				$("#floor").html('');
162
+				$("#floor").append('<option selected="selected" value="">请选择物品</option>');
163
+				for (var k = 0; k < floors.length; k++) {
164
+					$(floors[k]).each(function(y, z) {
165
+						if (z.parentcode) {
166
+							if ($("#build").val() == z.parentcode) {
167
+								$("<option value='" + z.code + "'>" + z.name + "</option>").appendTo("#floor");
168
+							}
169
+						}
170
+					});
171
+				}
172
+				$("#floor").selectpicker('refresh');
173
+				if ($("#build").val() == '') {
174
+					$("#floor").append('<option selected="selected" value="">请选择楼层</option>');
175
+				}
176
+				//              if ($("#floor").val() == null || $("#floor").val() == '') {
177
+				if ($("#floor").val() == null) {
178
+					$("#floor").append('<option selected="selected" value="">暂无数据</option>');
179
+				}
180
+				// $("#floor").trigger('change');
181
+			})
182
+			//
183
+			$("#floor").change(function() {
184
+				$("#equipname").html('');
185
+				equipmentdata=[]
186
+				$("#equipname").append('<option selected="selected" value="">请选择设备</option>');
187
+				$.ajax({
188
+					type: "get",
189
+					url: huayi.config.callcenter_url + "equipmentapi/api/Equipment/getlistsbypage", //获取数据的Servlet地址
190
+					async: true,
191
+					dataType: 'json',
192
+					data: {
193
+						pageindex: 1,
194
+						pagesize: 1000,
195
+						floorid: $('#floor').val()
196
+					},
197
+					success: function(data) {
198
+						
199
+						var equipmentdata=[]
200
+						if (data.state.toLowerCase() == 'success') {
201
+							
202
+							equipmentdata=data.data.rows
203
+							// console.log(equipmentdata.length)
204
+							if(equipmentdata.length>0){
205
+								
206
+								for (var k = 0; k < equipmentdata.length; k++) {
207
+									$(equipmentdata[k]).each(function(q, p) {
208
+										$("<option value='" + p.equipment_name + "'>" + p.equipment_name + "</option>").appendTo("#equipname");
209
+										$("#equipname").selectpicker('refresh');
210
+										// console.log(p.equipment_name)
211
+									});
212
+								}
213
+							
214
+							}else{
215
+								$("#equipname").empty();
216
+									$("#equipname").selectpicker('refresh');
217
+							}
218
+						}
219
+					}
220
+				});
221
+			})
222
+		}
223
+		if (!isasync) {
224
+			$.ajaxSettings.async = true;
225
+		}
226
+	})
190 227
 }

+ 28 - 21
WebUI/CallCenterWeb.UI/equipmentOperationManage/template/addEquipmentRepair.html

@@ -116,26 +116,40 @@
116 116
                 </div>
117 117
             </div>
118 118
             <div class="form-group provCity">
119
-                <label for="repairreplace" class="col-sm-3 control-label text-right"><b class="text_require">*</b>故障物品</label>
119
+                <label for="repairreplace" class="col-sm-3 control-label text-right"><b class="text_require">*</b>楼名称</label>
120 120
                 <div class="col-sm-9">
121 121
                     <!--<select class="form-control selectpicker" id="repairreplace" data-live-search="true">
122 122
 
123 123
                     </select>-->
124 124
                     <div>
125 125
                         <select class="form-control selectpicker" id="build" data-live-search="true">
126
-                            <option value="">请选科室</option>
126
+                            <option value="">请选择楼</option>
127 127
                         </select>
128 128
                     </div>
129
-                    <div id="things">
130
-                        <select class="form-control selectpicker" id="floor" data-live-search="true">
131
-                            <option value="">请选择物品</option>
132
-                        </select>
133
-                    </div>
134
-					<div id="equipment">
135
-					        <input id="equipmentext" class="form-control equipmentval" type="text" placeholder="请输入故障说明"  />
136
-					</div>
129
+                   
137 130
                 </div>
138 131
             </div>
132
+			<div class="form-group" >
133
+			    <label for="floor" class="col-sm-3 control-label text-right"><b class="text_require">*</b>科室名称</label>
134
+			    <div class="col-sm-9">
135
+			       <div id="things">
136
+			           <select class="form-control selectpicker" id="floor" data-live-search="true">
137
+			               <option value="">请选择科室</option>
138
+			           </select>
139
+			       </div>
140
+			       <div id="equipment">
141
+			               <input id="equipmentext" class="form-control equipmentval" type="text" placeholder="请输入故障说明"  />
142
+			       </div>
143
+			    </div>
144
+			</div>
145
+			<div class="form-group">
146
+			    <label for="equipname" class="col-sm-3 control-label text-right"><b class="text_require">*</b>设备名称</label>
147
+			    <div class="col-sm-9">
148
+			        <select class="form-control selectpicker" id="equipname" data-live-search="true">
149
+			            <option value="">请选择设备</option>
150
+			        </select>
151
+			    </div>
152
+			</div>
139 153
             <div class="form-group hidden">
140 154
                 <label for="protype_addText" class="col-sm-3 control-label text-right"><b class="text_require">*</b>项目类型</label>
141 155
                 <div class="col-sm-9">
@@ -179,14 +193,7 @@
179 193
                     </select>
180 194
                 </div>
181 195
             </div>-->
182
-            <!--<div class="form-group">
183
-                <label for="equipname" class="col-sm-3 control-label text-right"><b class="text_require">*</b>设备名称</label>
184
-                <div class="col-sm-9">
185
-                    <select class="form-control selectpicker" id="equipname" data-live-search="true">
186
-
187
-                    </select>
188
-                </div>
189
-            </div>-->
196
+            
190 197
             <!--<div class="form-group">
191 198
                 <label for="faulttype" class="col-sm-3 control-label text-right"><b class="text_require">*</b>故障类型</label>
192 199
                 <div class="col-sm-9">
@@ -420,14 +427,14 @@
420 427
 				$("#equipment").css({"display":"none"})
421 428
 				$("#things").css({"display":"inline-block"})
422 429
 			    repairplaceStr = $("#build option:selected").text() + " " + $("#floor option:selected").text();
423
-			    descripe= $("#floor option:selected").text()
430
+			    // descripe= $("#floor option:selected").text()
424 431
 			}
425 432
 		})
426 433
         //添加
427 434
         function addValue() {
428 435
 			if($("#build option:selected").text()=='器械科'){
429 436
 				repairplaceStr = $("#build option:selected").text() + " " + $(".equipmentval").val();
430
-				descripe= $(".equipmentval").val()
437
+				// descripe= $(".equipmentval").val()
431 438
 			}
432 439
 			console.log($(".equipmentval").val(),$("#build option:selected").text())
433 440
             if (!regexs.phone.test($.trim($("#contactway").val())) || $("#contactway").val() == '') {
@@ -479,7 +486,7 @@
479 486
                     repairtime: getFormatDate(), //	报修时间
480 487
                     repairman: $('#repairman').val(), // 是	string	报修人
481 488
                     contactway: $('#contactway').val(), //		是	string	联系方式
482
-                    faultdescripe:descripe , // $('#faultdescripe').val(), //	否	string	故障说明
489
+                    faultdescripe:$("#equipname").val() , // $('#faultdescripe').val(), //	否	string	故障说明
483 490
                     faultpic: imageArr0 //		故障图片,上传的json
484 491
                     //callid: $('#callid').val(), //否	string	通话标志ID
485 492
                 },

+ 153 - 87
WebUI/CallCenterWeb.UI/equipmentOperationManage/template/assignEquipmentRepair.html

@@ -1,22 +1,22 @@
1
-<!DOCTYPE html>
1
+<!DOCTYPE html>
2 2
 <html>
3 3
 
4
-<head>
5
-    <meta charset="UTF-8">
6
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-    <link href="../../css/plugins/cropper/cropper.min.css" rel="stylesheet">
8
-    <script src="../../Script/Common/huayi.load.js"></script>
9
-    <script src="../../Script/Common/huayi.config.js"></script>
10
-    <script src="../../js/bootstrap-select/js/bootstrap-select.js"></script>
11
-    <script src="../../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
12
-    <script src="../../js/laydate/laydate.js"></script>
13
-    <link href="../../css/init.css" rel="stylesheet" />
14
-    <link rel="stylesheet" type="text/css" href="../../css/Table/table1.css" />
15
-    <link href="../../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
16
-    <link rel="stylesheet" href="../../css/webuploader.css" />
17
-    <title>设备维修派单</title>
18
-    <style>
19
-        .btnn {
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+		<link href="../../css/plugins/cropper/cropper.min.css" rel="stylesheet">
8
+		<script src="../../Script/Common/huayi.load.js"></script>
9
+		<script src="../../Script/Common/huayi.config.js"></script>
10
+		<script src="../../js/bootstrap-select/js/bootstrap-select.js"></script>
11
+		<script src="../../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
12
+		<script src="../../js/laydate/laydate.js"></script>
13
+		<link href="../../css/init.css" rel="stylesheet" />
14
+		<link rel="stylesheet" type="text/css" href="../../css/Table/table1.css" />
15
+		<link href="../../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
16
+		<link rel="stylesheet" href="../../css/webuploader.css" />
17
+		<title>设备维修派单</title>
18
+		<style>
19
+			.btnn {
20 20
             background: #2f4050;
21 21
             color: #fff;
22 22
             padding: 3px 10px;
@@ -55,21 +55,28 @@
55 55
             background: url(../../img/upLod.png) no-repeat;
56 56
         }
57 57
     </style>
58
-</head>
59
-
60
-<body class="gray-bg">
61
-    <div class="container wrapper-content animated fadeInRight">
62
-        <div class="form-horizontal">
63
-
64
-            <div class="form-group">
65
-                <label for="serviceman" class="col-sm-3 control-label text-right">被指派人</label>
66
-                <div class="col-sm-9">
67
-                    <select class="form-control selectpicker" id="serviceman" data-live-search="true">
68
-                        <option value="">请选择维修人</option>
69
-                    </select>
70
-                </div>
71
-            </div>
72
-            <!--<div class="form-group">
58
+	</head>
59
+
60
+	<body class="gray-bg">
61
+		<div class="container wrapper-content animated fadeInRight">
62
+			<div class="form-horizontal">
63
+				<div class="form-group">
64
+					<label for="serviceteam" class="col-sm-3 control-label text-right">维修班组</label>
65
+					<div class="col-sm-9">
66
+						<select class="form-control selectpicker" id="serviceteam" data-live-search="true">
67
+							<option value="">请选择维修班组</option>
68
+						</select>
69
+					</div>
70
+				</div>
71
+				<div class="form-group">
72
+					<label for="serviceman" class="col-sm-3 control-label text-right">被指派人</label>
73
+					<div class="col-sm-9">
74
+						<select class="form-control selectpicker" id="serviceman" data-live-search="true">
75
+							<option value="">请选择维修人</option>
76
+						</select>
77
+					</div>
78
+				</div>
79
+				<!--<div class="form-group">
73 80
                 <label for="states" class="col-sm-3 control-label text-right">工单状态</label>
74 81
                 <div class="col-sm-9">
75 82
                     <select class="form-control"  id="states">
@@ -79,58 +86,117 @@
79 86
                     </select>
80 87
                 </div>
81 88
             </div>-->
82
-            <div class="form-group">
83
-                <label for="assignremark" class="col-sm-3 control-label text-right">指派说明</label>
84
-                <div class="col-sm-9">
85
-                    <textarea type="text" class="form-control" id="assignremark"></textarea>
86
-                </div>
87
-            </div>
88
-            <div class="form-group">
89
-                <div class="col-sm-12" style="text-align: center;">
90
-                    <input type="button" id="HY_save" class="btn_gray btn" onclick="assignOrder()" value="派单" />
91
-                </div>
92
-            </div>
93
-
94
-        </div>
95
-
96
-    </div>
97
-    <script src="../../js/webuploader.min.js"></script>
98
-    <script>
99
-        //			var ids = helper.request.queryString("ids");
100
-        var proId = helper.request.queryString("proId");
101
-        var wocode = helper.request.queryString("code");
102
-
103
-        $(document).ready(function () {
104
-            helper.getDropList.getProUser(proId, $('#serviceman')); //维修人员下拉
105
-        })
106
-
107
-        //派单
108
-        function assignOrder() {
109
-            /*发送请求*/
110
-            $.ajax({
111
-                type: "post",
112
-                url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/assign",
113
-                async: true,
114
-                dataType: 'json',
115
-                data: {
116
-                    wocode: wocode,
117
-                    assignman: $('#serviceman').val(),
118
-                    assignremark: $('#assignremark').val(),
119
-                    channel: 1
120
-                },
121
-                success: function (result) {
122
-                    if (result.state.toLowerCase() == "success") {
123
-                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
124
-                        parent.layer.close(index); //再执行关闭
125
-                        layer.msg(result.message);
126
-                        parent.$('#table1').bootstrapTable('refresh');
127
-                    }
128
-
129
-                }
130
-            });
131
-        }
132
-
133
-    </script>
134
-</body>
135
-
136
-</html>
89
+				<div class="form-group">
90
+					<label for="assignremark" class="col-sm-3 control-label text-right">指派说明</label>
91
+					<div class="col-sm-9">
92
+						<textarea type="text" class="form-control" id="assignremark"></textarea>
93
+					</div>
94
+				</div>
95
+				<div class="form-group">
96
+					<div class="col-sm-12" style="text-align: center;">
97
+						<input type="button" id="HY_save" class="btn_gray btn" onclick="assignOrder()" value="派单" />
98
+					</div>
99
+				</div>
100
+
101
+			</div>
102
+
103
+		</div>
104
+		<script src="../../js/webuploader.min.js"></script>
105
+		<script>
106
+			//			var ids = helper.request.queryString("ids");
107
+			var proId = helper.request.queryString("proId");
108
+			var wocode = helper.request.queryString("code");
109
+			var roleData=[]
110
+// configurationapi/api/RoleInfo/getlistdrop   
111
+// signtokenapi/api/UserAccount/getlistsbypage
112
+			$(document).ready(function() {
113
+				/*发送请求*/
114
+				$.ajax({
115
+					type: "get",
116
+					url: huayi.config.callcenter_url + "configurationapi/api/RoleInfo/getlistdrop",
117
+					async: true,
118
+					dataType: 'json',
119
+					success: function(result) {
120
+						if (result.state.toLowerCase() == "success") {
121
+							const res=result.data
122
+							res.map(item=>{
123
+								
124
+								if(item.role_name.substr(item.role_name.length-1,1)=='班'){
125
+									roleData.push(item)
126
+								}
127
+							})
128
+							console.log(roleData)
129
+							$(roleData).each(function(q, p) {
130
+								$("<option value='" + p.id + "'>" + p.role_name + "</option>").appendTo("#serviceteam");
131
+								$("#serviceteam").selectpicker('refresh');
132
+								// console.log(p.equipment_name)
133
+							});
134
+						}
135
+				
136
+					}
137
+				});
138
+			})
139
+        $('#serviceteam').change(function(){
140
+			// console.log($('#serviceteam').val())
141
+			$("#serviceman").html('');
142
+			$("#serviceman").append('<option selected="selected" value="">请选择维修人</option>');
143
+			/*发送请求*/
144
+			$.ajax({
145
+				type: "get",
146
+				url: huayi.config.callcenter_url + "signtokenapi/api/UserAccount/getlistsbypage",
147
+				async: true,
148
+				dataType: 'json',
149
+				data:{
150
+					pageindex: 1,
151
+					pagesize: 1000,
152
+					roleid:$('#serviceteam').val()
153
+				},
154
+				success: function(result) {
155
+					if (result.state.toLowerCase() == "success") {
156
+						const res=result.data.rows
157
+						if(res.length>0){
158
+							$(res).each(function(q, p) {
159
+								console.log(p)
160
+								$("<option value='" + p.username + "'>" + p.usercode+'-'+p.username + "</option>").appendTo("#serviceman");
161
+								$("#serviceman").selectpicker('refresh');
162
+								
163
+							});
164
+						}else{
165
+							$("#serviceman").html('');
166
+							$("#serviceman").selectpicker('refresh');
167
+						}
168
+						
169
+					}
170
+			
171
+				}
172
+			});
173
+		})
174
+			//派单
175
+			function assignOrder() {
176
+				/*发送请求*/
177
+				$.ajax({
178
+					type: "post",
179
+					url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/assign",
180
+					async: true,
181
+					dataType: 'json',
182
+					data: {
183
+						wocode: wocode,
184
+						assignman: $('#serviceman').val(),
185
+						assignremark: $('#assignremark').val(),
186
+						channel: 1
187
+					},
188
+					success: function(result) {
189
+						if (result.state.toLowerCase() == "success") {
190
+							var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
191
+							parent.layer.close(index); //再执行关闭
192
+							layer.msg(result.message);
193
+							parent.$('#table1').bootstrapTable('refresh');
194
+						}
195
+
196
+					}
197
+				});
198
+			}
199
+		</script>
200
+	</body>
201
+
202
+</html>