Przeglądaj źródła

值班电话管理;增加坐席组;

fanlongfei 7 lat temu
rodzic
commit
c291e90932
1 zmienionych plików z 70 dodań i 25 usunięć
  1. 70 25
      CallCenterWeb.UI/OnDuty/Duty.html

+ 70 - 25
CallCenterWeb.UI/OnDuty/Duty.html

@@ -9,25 +9,24 @@
9 9
 		<script src="../Script/Common/huayi.config.js"></script>
10 10
 		<link href="../css/Table/table1.css" rel="stylesheet" />
11 11
 		<link href="../css/init.css" rel="stylesheet" />
12
-		<!--<script src="../css/laydate/laydate.js"></script>-->
13 12
 		<script src="../js/laydate/laydate.js"></script>
14
-		<script src="../My97DatePicker/WdatePicker.js"></script>
15 13
 		<style>
16 14
 			table td {
17 15
 				word-break: break-all;
18 16
 				word-wrap: break-word;
19 17
 			}
20
-			.time-box{
18
+			
19
+			.time-box {
21 20
 				position: relative;
22 21
 			}
22
+			
23 23
 			i.tub {
24
-			    position: absolute;
25
-			    right: 11px;
26
-			    top: 8px;
27
-			    font-size: 18px;
28
-			    color: #1cb494;
24
+				position: absolute;
25
+				right: 11px;
26
+				top: 8px;
27
+				font-size: 18px;
28
+				color: #1cb494;
29 29
 			}
30
-		
31 30
 		</style>
32 31
 	</head>
33 32
 
@@ -42,8 +41,8 @@
42 41
 					</sapn>
43 42
 				</div>
44 43
 				<div class="dhRight">
45
-            		<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
46
-            	</div>
44
+					<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
45
+				</div>
47 46
 			</div>
48 47
 			<div class="th-box">
49 48
 				<div class="th-bar">
@@ -52,10 +51,6 @@
52 51
 					<a class="sc_btn  remove">删除</a>
53 52
 					<div class="seach-box fr">
54 53
 						<ul>
55
-							<li>电话号码:<input class="photo x-color" type="text" id="tel" /></li>
56
-							<!--<li>添加时间:<input class="laydate-icon photo x-color " type="text" id="settime" />
57
-								-<input class="laydate-icon photo x-color " type="text" id="endtime" />
58
-							</li>-->
59 54
 							<li>
60 55
 								添加时间:
61 56
 								<div class="time-box form-group" style="display: inline-block;width: 225px;">
@@ -64,6 +59,15 @@
64 59
 								</div>
65 60
 							</li>
66 61
 							<li>
62
+								坐席组:
63
+								<select id="s_department" class="photo x-color"></select>
64
+							</li>
65
+
66
+							<li>电话号码:<input class="photo x-color" type="text" id="tel" /></li>
67
+							<!--<li>添加时间:<input class="laydate-icon photo x-color " type="text" id="settime" />
68
+								-<input class="laydate-icon photo x-color " type="text" id="endtime" />
69
+							</li>-->
70
+							<li>
67 71
 								<a class="sc_btn  Block" id="sc_btns">搜索</a>
68 72
 							</li>
69 73
 						</ul>
@@ -76,6 +80,7 @@
76 80
 						<tr>
77 81
 							<th data-field="state" data-checkbox="true"></th>
78 82
 							<th data-field="F_ZBDH" data-align="center">值班电话</th>
83
+							<th data-field="F_ZXZName" data-align="center">坐席组</th>
79 84
 							<th data-field="F_Remark" data-align="center">说明</th>
80 85
 							<th data-field="F_CreateBy" data-align="center">添加人</th>
81 86
 							<th data-field="F_CreateTime" data-align="center">添加时间</th>
@@ -94,10 +99,16 @@
94 99
 				'</li>' +
95 100
 				'</ul>' +
96 101
 				'<div class="add_time">' +
97
-				'<label for="">电话号码:</label>' +
102
+				'<label for="TelNum"><b class="text-danger">*</b>电话号码:</label>' +
98 103
 				'<input type="text" id="TelNum" class="photo"  />' +
99 104
 				'</div>' +
100 105
 				'<div class="add_time">' +
106
+				'<label for="t_department"><b class="text-danger">*</b>坐席组:</label>' +
107
+				'<select id="t_department" class="photo">' +
108
+				'<option value="">请选择</option>' +
109
+				'</select>' +
110
+				'</div>' +
111
+				'<div class="add_time">' +
101 112
 				'<label for="" class="Pb_sm">说明:</label>' +
102 113
 				'<textarea type="text" id="Pb"></textarea>' +
103 114
 				'</div>' +
@@ -111,12 +122,12 @@
111 122
 				laydate.render({
112 123
 					elem: '#settime',
113 124
 					range: '~',
114
-//					type: 'datetime',
125
+					//					type: 'datetime',
115 126
 					//max : 31,
116
-//					min: 0,
117
-					theme: '#00a1cb',
127
+					//					min: 0,
128
+					theme: '#1ab394',
118 129
 				});
119
-
130
+				getDepts($('#s_department')); //坐席组下拉
120 131
 				/*搜索*/
121 132
 				$(".Block").click(function() {
122 133
 					initTable();
@@ -160,9 +171,14 @@
160 171
 									area: ['30%', '38%'], //宽高
161 172
 									content: html
162 173
 								});
163
-
164 174
 								$("#ID").val(result.data.F_ZBID);
165 175
 								$("#TelNum").val(result.data.F_ZBDH);
176
+								debugger
177
+								if(result.data.F_Groupid) {
178
+									getDepts($('#t_department')).then(function() {
179
+										$("#t_department").val(result.data.F_Groupid);
180
+									}); //坐席组下拉
181
+								}
166 182
 								$("#Pb").val(result.data.F_Remark);
167 183
 							}
168 184
 						})
@@ -176,10 +192,11 @@
176 192
 						title: '添加值班号码',
177 193
 						area: ['40%', '50%'], //宽高
178 194
 					});
195
+					getDepts($('#t_department')); //坐席组下拉
179 196
 				});
180 197
 
181 198
 				initTable();
182
-			})
199
+			});
183 200
 
184 201
 			function initTable() {
185 202
 				//先销毁表格
@@ -205,8 +222,9 @@
205 222
 							page: params.pageNumber,
206 223
 							pagesize: params.pageSize,
207 224
 							telnum: $("#tel").val(),
208
-							btime: $('#settime').val() && $('#settime').val().split('~')[0],
209
-							etime:$('#settime').val() && $('#settime').val().split('~')[1],
225
+							zxzid: $('#s_department').val(),
226
+							btime: $('#settime').val() && $('#settime').val().split(' ~ ')[0],
227
+							etime: $('#settime').val() && $('#settime').val().split(' ~ ')[1],
210 228
 							token: $.cookie("token")
211 229
 						};
212 230
 						return param;
@@ -247,17 +265,26 @@
247 265
 			//新增或者编辑
248 266
 			function addedit() {
249 267
 				var telreg = /^[0-9]+.?[0-9]*$/;
250
-            	if (!telreg.test($.trim($("#TelNum").val()))) {
268
+				if(!telreg.test($.trim($("#TelNum").val()))) {
251 269
 					layer.confirm('请输入有效的电话号码', {
252 270
 						icon: 2,
253 271
 						btn: ['确定'] //按钮
254 272
 					});
255 273
 					return;
256 274
 				}
275
+				debugger
276
+				if(!$.trim($("#t_department").val())) {
277
+					layer.confirm('请选择坐席组', {
278
+						icon: 2,
279
+						btn: ['确定'] //按钮
280
+					});
281
+					return;
282
+				}
257 283
 				/*发送请求*/
258 284
 				$.post(huayi.config.callcenter_url + "DutyPhone/AddDutyPhone", {
259 285
 					zbid: $("#ID").val(),
260 286
 					telphone: $("#TelNum").val(),
287
+					groupid: $('#t_department').val(),
261 288
 					des: $("#Pb").val(),
262 289
 					token: $.cookie("token")
263 290
 				}, function(result) {
@@ -273,6 +300,24 @@
273 300
 					}
274 301
 				})
275 302
 			}
303
+
304
+			//获取坐席组部门下拉
305
+			function getDepts(el) {
306
+				var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
307
+				$.getJSON(huayi.config.callcenter_url + "SeatGroup/GetList", {
308
+					token: $.cookie("token"),
309
+				}, function(data) {
310
+					if(data.rows && data.rows.length > 0) {
311
+						el.html('');
312
+						el.append('<option value="">请选择</option>');
313
+						$.each(data.rows, function(i, v) {
314
+							$('<option value="' + v.F_ZXZID + '">' + v.F_ZXZName + '</option>').appendTo(el);
315
+						});
316
+						dtd.resolve(); // 改变Deferred对象的执行状态
317
+					}
318
+				});
319
+				return dtd.promise(); // 返回promise对象
320
+			}
276 321
 		</script>
277 322
 
278 323
 	</body>