瀏覽代碼

修改手工制单 获取来电单位

zhangshuangnan 7 年之前
父節點
當前提交
833b1dfd07

+ 1 - 52
CallCenterWeb.UI/WorkOrder/AddWorkOrder.html

334
 
334
 
335
 		<script src="../js/zTree/jquery.ztree.core.js"></script>
335
 		<script src="../js/zTree/jquery.ztree.core.js"></script>
336
 		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
336
 		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
337
-		<script src="../js/WorkOrder/AddWorkOrder.js"></script>
338
 		<script src="../js/WorkOrder/jquery.editable-select.js"></script>
337
 		<script src="../js/WorkOrder/jquery.editable-select.js"></script>
339
 			<script src="../js/comboSelect/jquery.combo.select.js"></script>
338
 			<script src="../js/comboSelect/jquery.combo.select.js"></script>
340
 		<script src="../js/kindeditor/kindeditor.js"></script>
339
 		<script src="../js/kindeditor/kindeditor.js"></script>
341
 		<script src="../js/kindeditor/lang/zh_CN.js"></script>
340
 		<script src="../js/kindeditor/lang/zh_CN.js"></script>
341
+		<script src="../js/WorkOrder/AddWorkOrder.js"></script>
342
 		<script>
342
 		<script>
343
 			//自己写的方法(未能实现鼠标下移选中)
343
 			//自己写的方法(未能实现鼠标下移选中)
344
 			
344
 			
394
 				//
394
 				//
395
 
395
 
396
 			}
396
 			}
397
-			//请求单位
398
-			
399
 			
397
 			
400
-			$(document).ready(function() {
401
-				$('#testInput1').comboSelect();
402
-				$('#testInput2').comboSelect();
403
-				$('#testInput3').comboSelect();
404
-				$('#testInput4').comboSelect();
405
-//				$(document).click(function(e) {
406
-//					if(!$(e.target).is($('.testInput-list>li')) && !$(e.target).is($('#testInput1')) && !$(e.target).is($('#testInput2')) && !$(e.target).is($('#testInput3')) && !$(e.target).is($('#testInput4'))) {
407
-//						$('.testInput-list').hide();
408
-//					}
409
-//				})
410
-			BindLDdep($("#testInput1"),$("#testInput2"),$("#testInput3"),$("#testInput4"));
411
-			})
412
-		
413
-				function BindLDdep(obj1,obj2,obj3,obj4,) {
414
-//					$('.testInput-list').empty();
415
-					$.ajax({
416
-						type: "get",
417
-						url: huayi.config.callcenter_url + "Customer/BindLDdep",
418
-						dataType: 'json',
419
-						async: true,
420
-						data: {
421
-//							keypara: str,
422
-							token: $.cookie("token")
423
-						},
424
-						success: function(data) {
425
-							var Count = data.data.dep;
426
-							var html = '';
427
-							$(Count).each(function(i, n) {
428
-								html = "<option value='" + n + "'>" + n + "</option>";
429
-								$(html).appendTo(obj1);
430
-								$(html).appendTo(obj2);
431
-								$(html).appendTo(obj3);
432
-								$(html).appendTo(obj4);
433
-//								$("<option value='" + n + "'>" + n + "</option>").appendTo(obj1)
434
-							});
435
-							obj1.comboSelect();
436
-							obj2.comboSelect();
437
-							obj3.comboSelect();
438
-							obj4.comboSelect();
439
-//							$('.testInput-list>li').click(function() {
440
-//								$('.testInput-list').show();
441
-//								obj.val($(this).html());
442
-//								$('.testInput-list').hide();
443
-//							})
444
-
445
-						}
446
-					});
447
-				};
448
-		
449
 		</script>
398
 		</script>
450
 	</body>
399
 	</body>
451
 
400
 

+ 0 - 1
CallCenterWeb.UI/callScreen/call.js

31
 		console.log(result);
31
 		console.log(result);
32
 		if(result.data.groname == "客服组") {
32
 		if(result.data.groname == "客服组") {
33
 			$(".KF").show();
33
 			$(".KF").show();
34
-			$(".SC").show();
35
 		} else {
34
 		} else {
36
 			$(".SC").show();
35
 			$(".SC").show();
37
 			$("#SCorderlist").show();
36
 			$("#SCorderlist").show();

+ 48 - 34
CallCenterWeb.UI/js/WorkOrder/AddWorkOrder.js

26
 		}
26
 		}
27
 	}
27
 	}
28
 });
28
 });
29
-if(id) {
30
-	$("#CallID").val(id);
31
-	$("#tel").val(phone);
32
-	$("#tel_market").val(phone);
33
-	if(unescape(decodeURI(name)) != 'null' && unescape(decodeURI(name)) != 'undefined') {
34
-		$("#name_market").val(unescape(decodeURI(name)));
35
-		$("#name").val(unescape(decodeURI(name)));
36
-	}
37
-	if(unescape(decodeURI(depName)) != 'null' && unescape(decodeURI(depName)) != 'undefined') {
38
-		$("#testInput1_input").val(unescape(decodeURI(depName)));
39
-		$("#testInput3_input").val(unescape(decodeURI(depName)));
40
-	}
41
-
42
-}
43
 $(document).ready(function() {
29
 $(document).ready(function() {
44
 	//工单来源
30
 	//工单来源
45
 	getOrderSource('#orderSource');
31
 	getOrderSource('#orderSource');
59
 		window.marketEditor = K.create('#remark_market');
45
 		window.marketEditor = K.create('#remark_market');
60
 	})
46
 	})
61
 	//保存
47
 	//保存
62
-
63
 	$('.customerSubmit').click(function() {
48
 	$('.customerSubmit').click(function() {
64
 		saveCustomer();
49
 		saveCustomer();
65
 	})
50
 	})
66
 	$('.marketSubmit').click(function() {
51
 	$('.marketSubmit').click(function() {
67
 		saveMarket();
52
 		saveMarket();
68
 	})
53
 	})
54
+		BindLDdep($("#testInput1"),$("#testInput2"),$("#testInput3"),$("#testInput4"));
55
+	if(id) {
56
+		$("#CallID").val(id);
57
+		$("#tel").val(phone);
58
+		$("#tel_market").val(phone);
59
+		if(unescape(decodeURI(name)) != 'null' && unescape(decodeURI(name)) != 'undefined') {
60
+			$("#name_market").val(unescape(decodeURI(name)));
61
+			$("#name").val(unescape(decodeURI(name)));
62
+		}
63
+		if(unescape(decodeURI(depName)) != 'null' && unescape(decodeURI(depName)) != 'undefined') {
64
+			$("#testInput1_input").val(unescape(decodeURI(depName)));
65
+			$("#testInput3_input").val(unescape(decodeURI(depName)));
66
+		}
67
+
68
+}
69
 
69
 
70
 })
70
 })
71
 //工单类型
71
 //工单类型
169
 		}
169
 		}
170
 	});
170
 	});
171
 }
171
 }
172
-//来电单位  
173
-function getAccount(obj) {
174
-	$.ajax({
175
-		type: "get",
176
-		url: huayi.config.callcenter_url + "Customer/BindLDdep",
177
-		dataType: 'json',
178
-		async: true,
179
-		data: {
180
-			token: $.cookie("token")
181
-		},
182
-		success: function(data) {
183
-			var Count = data.data.dep;
184
-			$(Count).each(function(i, n) {
185
-				$("<option value='" + n + "'>" + n + "</option>").appendTo($(obj));
186
-			})
187
-			//					$(obj).selectpicker('refresh');
188
-		}
189
-	});
190
 
172
 
191
-}
173
+//来电单位
174
+	$('#testInput1').comboSelect();
175
+	$('#testInput2').comboSelect();
176
+	$('#testInput3').comboSelect();
177
+	$('#testInput4').comboSelect();
192
 
178
 
179
+	function BindLDdep(obj1,obj2,obj3,obj4,) {
180
+					$.ajax({
181
+						type: "get",
182
+						url: huayi.config.callcenter_url + "Customer/BindLDdep",
183
+						dataType: 'json',
184
+						async: false,
185
+						data: {
186
+//							keypara: str,
187
+							token: $.cookie("token")
188
+						},
189
+						success: function(data) {
190
+							var Count = data.data.dep;
191
+							var html = '';
192
+							$(Count).each(function(i, n) {
193
+								html = "<option value='" + n + "'>" + n + "</option>";
194
+								$(html).appendTo(obj1);
195
+								$(html).appendTo(obj2);
196
+								$(html).appendTo(obj3);
197
+								$(html).appendTo(obj4);
198
+							});
199
+							obj1.comboSelect();
200
+							obj2.comboSelect();
201
+							obj3.comboSelect();
202
+							obj4.comboSelect();
203
+						}
204
+					});
205
+				};
206
+		
193
 function saveCustomer() {
207
 function saveCustomer() {
194
 	if($('#name').val() == '') {
208
 	if($('#name').val() == '') {
195
 		layer.confirm('请输入姓名!', {
209
 		layer.confirm('请输入姓名!', {