Browse Source

修改市场部添加工单

zhangshuangnan 7 years ago
parent
commit
b61450a9c6

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

@@ -179,7 +179,6 @@
179 179
 								<ul class="testInput-list">
180 180
 									<li></li>
181 181
 								</ul>-->
182
-								
183 182
 							</td>
184 183
 						</tr>
185 184
 						<tr>
@@ -312,8 +311,31 @@
312 311
 									<option value="">请选择反馈单位</option>
313 312
 								</select>
314 313
 							</td>
314
+							
315
+							<th>工单来源:</th>
316
+							<td>
317
+								<div class="form-group">
318
+									<select name="" class="form-control" id="DicValueList_market"> </select>
319
+								</div>
320
+							</td>
321
+								<th>工单类型:</th>
322
+							<td>
323
+								<div class="time-box">
324
+									<i class="tub fa fa-caret-down down" style="color: #676b6d;"></i>
325
+									<input class="form-control" type="text" id="typeclass_market" readonly="readonly">
326
+									<input type="hidden" id="typeclassId_market" />
327
+									<div class="addTree treeList_market">
328
+										<ul id="TreeDemo_market" class="ztree">
329
+
330
+										</ul>
331
+									</div>
332
+								</div>
333
+							</td>
334
+						
335
+							
315 336
 						</tr>
316 337
 						<tr>
338
+							
317 339
 							<th>备注内容:</th>
318 340
 							<td colspan="5">
319 341
 								<textarea name="" rows="5" cols="" id="remark_market"></textarea>

+ 29 - 6
CallCenterWeb.UI/js/WorkOrder/AddWorkOrder.js

@@ -28,7 +28,7 @@ $.ajax({
28 28
 });
29 29
 $(document).ready(function() {
30 30
 	//工单来源
31
-	getOrderSource('#orderSource');
31
+	getOrderSource();
32 32
 	//工单类型
33 33
 	getOrderType();
34 34
 	//工单状态
@@ -75,6 +75,7 @@ function getOrderType() {
75 75
 	}, function(result) {
76 76
 		result = $.parseJSON(result);
77 77
 		$.fn.zTree.init($("#TreeDemo"), setting3, result.data); //实例化树形图
78
+		$.fn.zTree.init($("#TreeDemo_market"), setting3, result.data); //实例化树形图
78 79
 	});
79 80
 }
80 81
 var setting3 = {
@@ -97,7 +98,8 @@ function changeTreeClick(event, treeId, treeNode) {
97 98
 	var chanId = treeNode.id;
98 99
 	var changeName = treeNode.text;
99 100
 	$('#typeclass').val(changeName);
100
-	$('#typeclassId').val(chanId);
101
+	$('#typeclass_market ').val(changeName);
102
+	$('#typeclassId_market').val(chanId);
101 103
 	var pidnode = treeNode.getParentNode();
102 104
 	$('.addTree').hide();
103 105
 };
@@ -115,9 +117,14 @@ $('#typeclass').click(function() {
115 117
 $('.treeList').mouseleave(function() {
116 118
 	$(this).css('display', 'none')
117 119
 })
120
+$('#typeclass_market').click(function() {
121
+	$('.treeList_market').css('display', 'block')
122
+})
123
+$('.treeList_market').mouseleave(function() {
124
+	$(this).css('display', 'none')
125
+})
118 126
 //工单状态
119 127
 function getOrderState() {
120
-
121 128
 	$.ajax({
122 129
 		url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
123 130
 		type: 'get',
@@ -161,8 +168,10 @@ function getOrderSource(obj) {
161 168
 			$(Count).each(function(i, n) {
162 169
 				if(n.F_DictionaryValueId == "468") {
163 170
 					$('<option value="' + n.F_DictionaryValueId + '" selected="selected">' + n.F_Name + '</option>').appendTo($("#DicValueList"));
171
+					$('<option value="' + n.F_DictionaryValueId + '" selected="selected">' + n.F_Name + '</option>').appendTo($("#DicValueList_market"));
164 172
 				} else {
165 173
 					$('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>').appendTo($("#DicValueList"));
174
+					$('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>').appendTo($("#DicValueList_market"));
166 175
 				}
167 176
 
168 177
 			})
@@ -233,7 +242,7 @@ function saveCustomer() {
233 242
 		});
234 243
 		return;
235 244
 	}
236
-	if($('#orderSource').val() == '') {
245
+	if($('#DicValueList').val() == '') {
237 246
 		layer.confirm('请选择工单来源!', {
238 247
 			icon: 2,
239 248
 			btn: ['确定']
@@ -321,6 +330,20 @@ function saveMarket() {
321 330
 		});
322 331
 		return;
323 332
 	}
333
+	if($('#DicValueList_market').val() == '') {
334
+		layer.confirm('请选择工单来源!', {
335
+			icon: 2,
336
+			btn: ['确定']
337
+		});
338
+		return;
339
+	}
340
+	if($('#typeclassId_market').val() == '') {
341
+		layer.confirm('请选择工单类型!', {
342
+			icon: 2,
343
+			btn: ['确定']
344
+		});
345
+		return;
346
+	}
324 347
 	$.ajax({
325 348
 		type: "post",
326 349
 		url: huayi.config.callcenter_url + "CallInScreen/AddWorkOrder",
@@ -334,10 +357,10 @@ function saveMarket() {
334 357
 			token: $.cookie("token"),
335 358
 			callCustomer: $('#name_market').val(), //姓名
336 359
 			tel: $('#tel_market').val(), //号码
337
-//			lddep: $('#LDunit_').val(), //来电单位
338 360
 			lddep: $('#testInput3_input').val(), //来电单位
339 361
 			fkdep: $('#testInput4_input').val(), //反馈单位
340
-//			fkcont: encodeURIComponent(marketEditor.html()), //反馈内容
362
+			gdly: $('#DicValueList_market').val(), //工单来源
363
+			gdlx: $('#typeclassId_market').val(), //工单类型id
341 364
 			fkcont: helper.HtmlUtil.htmlEncodeByRegExp(marketEditor.html()), //反馈内容
342 365
 			callid: $("#CallID").val()
343 366
 		},