liuyifan 5 年 前
コミット
8ed7efe502

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

@@ -716,3 +716,104 @@ $("#customerProvince").on('change',function(){
716 716
 $("#customerCity").on('change',function(){
717 717
 	getProvinceCounty($("#customerCounty"), $("#customerCity").val(), "请选择县/区");
718 718
 });
719
+
720
+// 快捷回复
721
+var quickReplyFloatSign = 1;
722
+$(".quickReplyButton").click(function(){
723
+    if (quickReplyFloatSign === 1) {
724
+        console.log("if")
725
+        $(".quickReplyFloat").show()
726
+        quickReplyFloatSign = 0; 
727
+        quickReplyFloatInitTable()
728
+    } else if (quickReplyFloatSign === 0) {
729
+        console.log("else")
730
+        $(".quickReplyFloat").hide()
731
+        quickReplyFloatSign = 1; 
732
+    }
733
+})
734
+
735
+$(".quickReplyFloatTab ul li").click(function () {
736
+    $(this).addClass("quickReplyFloatTabActivity").siblings().removeClass("quickReplyFloatTabActivity");
737
+});
738
+
739
+function quickReplyFloatInitTable(token, id, keyWord) {
740
+	//先销毁表格
741
+	$("#quickReplyFloatTable").bootstrapTable('destroy');
742
+	//初始化表格,动态从服务器加载数据
743
+	$("#quickReplyFloatTable").bootstrapTable({
744
+		method: "get", //使用get请求到服务器获取数据
745
+		url: huayi.config.callcenter_url + "AccessLog/GetHightFrequencyList", //获取数据的Servlet地址
746
+		contentType: 'application/x-www-form-urlencoded',
747
+		striped: true, //表格显示条纹
748
+		pagination: true, //启动分页
749
+		pageSize: 5, //每页显示的记录数
750
+		pageNumber: 1, //当前第几页
751
+		pageList: [5, 10, 15], //记录数可选列表
752
+		search: false, //是否启用查询
753
+		showColumns: false, //显示下拉框勾选要显示的列
754
+		showRefresh: false, //显示刷新按钮
755
+		sidePagination: "server", //表示服务端请求
756
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
757
+		//设置为limit可以获取limit, offset, search, sort, order
758
+		queryParamsType: "undefined",
759
+		queryParams: function queryParams(params) { //设置查询参数
760
+			var param = {
761
+				page: params.pageNumber,
762
+				pagesize: params.pageSize,
763
+				token: $.cookie("token"),
764
+				pid: "",
765
+				keywords: "",
766
+			};
767
+			return param;
768
+		},
769
+		onLoadSuccess: function() { //加载成功时执行
770
+			//layer.msg("加载成功");
771
+		},
772
+		onLoadError: function() { //加载失败时执行
773
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
774
+		}
775
+	});
776
+}
777
+
778
+//编号
779
+function setCode(val, row, index) {
780
+	return index + 1;
781
+}
782
+
783
+function formatterTitle(val, row){
784
+	if(val.length > 15){
785
+		val = val.substring(0,15) + "...";
786
+	}
787
+	return '<div onclick="btn_knowledge_base_detail('+ row.F_RepositoryId +')" class="knowledgeBaseDetail">' + val + '</div>'
788
+}
789
+
790
+function oper(val, row) {
791
+	if(val.length > 20){
792
+		val = val.substring(0,20) + "...";
793
+	}
794
+	return '<div onclick="btn_knowledge_base_detail('+ row.F_RepositoryId +')" class="knowledgeBaseDetail">' + val + '</div>'
795
+}
796
+
797
+function formatterKey(val, row) {
798
+	if(val.length > 10){
799
+		val = val.substring(0,10) + "...";
800
+	}
801
+	return val; 
802
+}
803
+
804
+//点击标题 内容查看详情
805
+function btn_knowledge_base_detail(seeid) {
806
+	layer.open({
807
+		type: 2,
808
+		title: '查看知识库',
809
+		shadeClose: true, //是否开启点击遮罩关闭
810
+		shade: 0.4, //遮罩
811
+		maxmin: true, //开启最大化最小化按钮
812
+		id: 'LAY_layuipro', //防止重复弹出
813
+		moveType: 1, //拖拽类型 默认的拖拽风格正如你所见到的,会有个过度的透明框。但是如果你不喜欢,你可以设定moveType: 1切换到传统的拖拽模式
814
+		moveOut: true, //拖拽到窗口外
815
+		//resize: true,//是否允许拉伸
816
+		area: ['70%', '70%'],
817
+		content: '../zhiShiKu/addModel.html?changeGetid=' + seeid + ''
818
+	});
819
+}

+ 29 - 2
CallCenterWeb.UI/callScreen/callScreen.html

@@ -596,13 +596,40 @@
596 596
 						<li style="border-bottom:1px solid #f95a83;" itemtype="0" class="cr-click">来电登记</li>
597 597
 						<li style="border-bottom:1px solid #243747;" itemtype="1">历史通话</li>
598 598
                         <li style="border-bottom:1px solid #69cbd0;" itemtype="2" >历史记录</li>
599
-                        <li style="border-bottom:1px solid #69cbd0;" itemtype="3" >关联案件</li>
600
-						<li style="border-bottom:1px solid #69cbd0;" itemtype="4" >文书送达</li>
599
+                        <li style="border-bottom:1px solid #8C1293;" itemtype="3" >关联案件</li>
600
+						<li style="border-bottom:1px solid #19B361;" itemtype="4" >文书送达</li>
601 601
 					</ul>
602 602
                     <div class="ld-sercon">
603 603
                         <div class="complain" style="display: block;">
604 604
                             <div class="Pre-second second-con addgd">
605 605
                                 <div class="common">
606
+									<div class="quickReplyButton">
607
+										快捷回复
608
+									</div>
609
+									<div class="quickReplyFloat">
610
+										<div class="quickReplyFloatTab clearfix">
611
+											<ul class="clearfix">
612
+												<li style="border-bottom:1px solid #f95a83;" itemtype="0" class="quickReplyFloatTabActivity">个人</li>
613
+												<li style="border-bottom:1px solid #243747;" itemtype="1">企业</li>
614
+											</ul>
615
+										</div>				
616
+										<div class="quickReplyFloatTableWrapper">
617
+											<table id="quickReplyFloatTable" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
618
+												<thead>
619
+													<tr>
620
+														<th data-align="center" data-formatter="setCode">编号</th>
621
+														<!--<th data-align="center" data-field="id" data-formatter="setCode"></th>-->
622
+														<th data-field="F_Title" data-formatter="formatterTitle" data-align="center">标题</th>
623
+														<th data-field="F_Description" data-align="center" data-formatter="oper">内容</th>
624
+														<th data-field="F_KeyWords" data-formatter="formatterKey" data-align="center">关键字</th>
625
+														<th data-field="F_CreateOn" data-align="center">创建时间</th>
626
+													</tr>
627
+												</thead>
628
+												<tbody id="tbody">
629
+												</tbody>
630
+											</table>
631
+										</div>
632
+									</div>
606 633
                                 	<div class="form-group col-md-12 clearfix">
607 634
 										<label class="col-md-2 workOrderTypeText">登记类型:</label>
608 635
 										<div id="formRegistrationType" class="col-md-6 r_order_type">

+ 67 - 9
CallCenterWeb.UI/callScreen/css/call.css

@@ -248,15 +248,15 @@
248 248
 			float: left;
249 249
 			
250 250
 		}
251
-			.ldcr-bottom .ldcrb-top>ul li{
252
-				float: left;
253
-			    font-size: 14px;
254
-			    width: 90px;
255
-			    text-align: center;
256
-			    height: 30px;
257
-			    line-height: 30px;
258
-			    cursor: pointer;
259
-			}
251
+		.ldcr-bottom .ldcrb-top>ul li{
252
+			float: left;
253
+			font-size: 14px;
254
+			width: 90px;
255
+			text-align: center;
256
+			height: 30px;
257
+			line-height: 30px;
258
+			cursor: pointer;
259
+		}
260 260
 		.ldcr-bottom .ldcrb-top>div{
261 261
 			float: right;
262 262
 			width: 285px;
@@ -495,3 +495,61 @@
495 495
 			width: 380px;
496 496
 		}
497 497
 
498
+		/* 快捷回复 */
499
+		.common {
500
+			position: relative;
501
+		}
502
+		.quickReplyButton {
503
+			position: absolute;
504
+			top: 0;
505
+			right: 0;
506
+			width: 80px;
507
+			height: 40px;
508
+			background: #01a1cb;
509
+			text-align: center;
510
+			cursor: pointer;
511
+			color: white;
512
+			line-height: 40px;
513
+			z-index: 10;
514
+		}
515
+		.quickReplyButtonTitle {
516
+		}
517
+		.quickReplyFloat {
518
+			display: none;
519
+			position: absolute;
520
+			top: 0;
521
+			right: 80px;
522
+			width: 90%;
523
+			height: 100%;
524
+			padding: 30px 10%;
525
+			z-index: 10;
526
+			background: #F4F6F6;
527
+			border: 1px solid #BFC9CA;
528
+			overflow: auto;
529
+		}
530
+		.quickReplyFloatTableWrapper{
531
+			margin-top: 20px;
532
+		}
533
+		.quickReplyFloatTab ul li{
534
+			float: left;
535
+			font-size: 14px;
536
+			width: 90px;
537
+			text-align: center;
538
+			height: 30px;
539
+			line-height: 30px;
540
+			cursor: pointer;
541
+		}
542
+		.quickReplyFloatTabActivity{
543
+			background: black;
544
+			color: #fff
545
+		}
546
+		.knowledgeBaseDetail {
547
+			cursor: pointer;
548
+		}
549
+		
550
+		.knowledgeBaseDetail:hover{
551
+			color: #1ab394;
552
+		}
553
+
554
+		
555
+

+ 0 - 1
CallCenterWeb.UI/js/main.js

@@ -21,7 +21,6 @@ function createWebSocket() {
21 21
 	}
22 22
 }
23 23
 setInterval(function() {
24
-	debugger
25 24
 	$.cookie("token", $.cookie("token"))
26 25
 }, huayi.config.menuworktime);
27 26
 //连接

+ 110 - 10
CallCenterWeb.UI/zhiShiKu/js/zhiShiKuManger.js

@@ -133,7 +133,10 @@ $('.add').click(function() {
133 133
 		addPid = 0
134 134
 		//console.log(addPid);
135 135
 	}
136
+	$('.inps3').val('顶级分类');
137
+	did = 0;
136 138
 	getTree();
139
+	adddep();
137 140
 })
138 141
 $('.addBtr').click(function() {
139 142
 	$('.addModel').css('display', 'none');
@@ -151,13 +154,22 @@ $('.xl_one').click(function() {
151 154
 		$('.xlAdd').css('display', 'block')
152 155
 	}
153 156
 })
157
+$('.inps3').focus(function() {
158
+	$('.xlAddDep').css('display', 'block');
159
+})
160
+$('.xl_three').click(function() {
161
+	if($('.xlAddDep').css('display') == 'block') {
162
+		$('.xlAddDep').css('display', 'none')
163
+	} else {
164
+		$('.xlAddDep').css('display', 'block')
165
+	}
166
+})
154 167
 $('.addTree').mouseleave(function() {
155 168
 	$(this).css('display', 'none')
156 169
 })
157 170
 //保存添加按钮
158 171
 var addPid, addTitle, addKey, addCon, addDes;
159 172
 $('.addCun').click(function() {
160
-	console.log(addPid);
161 173
 	if($('.inps1').val() == "" || $('.addTitle').val() == "") {
162 174
 		layer.confirm('请输入标题!', {
163 175
 			btn: ['确定']
@@ -177,14 +189,14 @@ $('.addCun').click(function() {
177 189
 		addTitle = $('.addTitle').val();
178 190
 		addKey = $('.addKey').val();
179 191
 		addCon = encodeURIComponent(editor.html());
192
+		addindividualBusiness = $('.addIndividualBusiness input[name="individualBusinessInput"]:checked').val();
180 193
 		$('.addModel').css('display', 'none');
181
-		addCunTree(addPid, addTitle, addKey, addCon);
182
-
194
+		addCunTree(addPid, addTitle, addKey, addCon, addindividualBusiness);
183 195
 	}
184 196
 	emptyInput();
185 197
 })
186 198
 
187
-function addCunTree(addPid, addTitle, addKey, addCon) {
199
+function addCunTree(addPid, addTitle, addKey, addCon, addindividualBusiness) {
188 200
 	$.ajax({
189 201
 		type: "post",
190 202
 		url: huayi.config.callcenter_url + "Knowledge/AddInfo",
@@ -195,6 +207,8 @@ function addCunTree(addPid, addTitle, addKey, addCon) {
195 207
 			key: addKey,
196 208
 			con: addCon,
197 209
 			pid: addPid,
210
+			visibleDeptId: did,
211
+			isorPerson: addindividualBusiness,
198 212
 			token: token
199 213
 		},
200 214
 		success: function(data) {
@@ -233,6 +247,7 @@ $('.change').click(function() {
233 247
 	}
234 248
 	changeGetid = changes;
235 249
 	getChangeTree();
250
+	chanGetDep()
236 251
 	getChangeBox(changeGetid);
237 252
 })
238 253
 $('.changeBtr').click(function() {
@@ -251,8 +266,22 @@ $('.xl_two').click(function() {
251 266
 
252 267
 })
253 268
 
269
+$('.inps5').focus(function() {
270
+	$('.xlChangeDep').css('display', 'block')
271
+})
272
+//下拉按钮功能
273
+$('.xl_five').click(function() {
274
+	if($('.xlChangeDep').css('display') == 'block') {
275
+		$('.xlChangeDep').css('display', 'none')
276
+	} else {
277
+		$('.xlChangeDep').css('display', 'block')
278
+	}
279
+
280
+})
281
+
282
+
254 283
 //修改弹出框内 下拉树形图参数配置项
255
-var setting3 = {
284
+var setting4 = {
256 285
 	data: {
257 286
 		key: {
258 287
 			name: "text"
@@ -281,7 +310,7 @@ function getChangeTree() {
281 310
 		"pid": pid
282 311
 	}, function(result) {
283 312
 		result = $.parseJSON(result);
284
-		$.fn.zTree.init($("#changeTreeDemo"), setting3, result.data); //实例化树形图
313
+		$.fn.zTree.init($("#changeTreeDemo"), setting4, result.data); //实例化树形图
285 314
 	});
286 315
 
287 316
 }
@@ -302,12 +331,13 @@ function getChangeBox(changeGetid) {
302 331
 			$('.inps4').val(con.F_Expand1);
303 332
 			$('.changeTitle').val(con.F_Title);
304 333
 			$('.changeKey').val(con.F_KeyWords);
334
+			// $('.editIndividualBusiness input[name="individualBusinessInputEdit"]').prop(con.F_KeyWords)
305 335
 			changeEditor.html(con.F_Content);
306 336
 			cunId = con.F_CategoryId;
307 337
 			chanCunId = cunId;
338
+			chanDid = F_visibleDeptId;
308 339
 		}
309 340
 	});
310
-
311 341
 }
312 342
 
313 343
 function changeBaoCunAjax(changeGetid, chanCunId) {
@@ -317,12 +347,14 @@ function changeBaoCunAjax(changeGetid, chanCunId) {
317 347
 		async: true,
318 348
 		dataType: 'json',
319 349
 		data: {
320
-			infoid: changeGetid,
350
+			infoid: changeGetid[0],
321 351
 			title: $('.changeTitle').val(),
322 352
 			key: $('.changeKey').val(),
323 353
 			con: encodeURIComponent(changeEditor.html()), //内容
324 354
 			pid: chanCunId,
325
-			token: token
355
+			visibleDeptId: chanDid,
356
+			isorPerson: $('.editIndividualBusiness input[name="individualBusinessInputEdit"]:checked').val(),
357
+			token: token,
326 358
 		},
327 359
 		success: function(data) {
328 360
 			if(data.state == "success") {
@@ -487,4 +519,72 @@ function btn_detail(seeid) {
487 519
 		area: ['70%', '50%'],
488 520
 		content: 'addModel.html?changeGetid=' + seeid + ''
489 521
 	});
490
-}
522
+}
523
+
524
+//所属部门
525
+var setting3 = {
526
+	data: {
527
+		key: {
528
+			name: "text"
529
+		},
530
+		simpleData: {
531
+			enable: true,
532
+			idKey: "id",
533
+			rootPId: 0
534
+		}
535
+	},
536
+	callback: {
537
+		onClick: ztreeDep
538
+	}
539
+};
540
+var did; //部门id
541
+var dname; //部门name
542
+function ztreeDep(event, treeId, treeNode) {
543
+	did = treeNode.id;
544
+	dname = treeNode.text;
545
+	$('.inps3').val(dname);
546
+};
547
+function adddep() {
548
+	$.get(huayi.config.callcenter_url + "Department/GetDeptList", {
549
+		"token": $.cookie("token"),
550
+		"pid": pid
551
+	}, function(result) {
552
+		result = $.parseJSON(result);
553
+		$.fn.zTree.init($("#xlAdd_depTree"), setting3, result.data); //实例化树形图
554
+	});
555
+}
556
+
557
+//获取所属部门
558
+var setting5 = {
559
+	data: {
560
+		key: {
561
+			name: "text"
562
+		},
563
+		simpleData: {
564
+			enable: true,
565
+			idKey: "id",
566
+			rootPId: 0
567
+		}
568
+	},
569
+	callback: {
570
+		onClick: chanaDep
571
+	}
572
+};
573
+var chanDid = 0; //部门id
574
+var chanDname; //部门name
575
+function chanaDep(event, treeId, treeNode) {
576
+	chanDid = treeNode.id;
577
+	chanDname = treeNode.text;
578
+	$('.inps5').val(chanDname);
579
+};
580
+
581
+function chanGetDep() {
582
+	$.get(huayi.config.callcenter_url + "Department/GetDeptList", {
583
+		"token": $.cookie("token"),
584
+		"pid": pid
585
+	}, function(result) {
586
+		result = $.parseJSON(result);
587
+		$.fn.zTree.init($("#xlChange_depTree"), setting5, result.data); //实例化树形图
588
+	});
589
+}
590
+

+ 57 - 4
CallCenterWeb.UI/zhiShiKu/zhiShiKuManger.html

@@ -34,7 +34,10 @@
34 34
 			}
35 35
 			
36 36
 			.inps1,
37
-			.inps4 {
37
+			.inps2,
38
+			.inps3,
39
+			.inps4,
40
+			.inps5 {
38 41
 				width: 100%;
39 42
 				height: 24px;
40 43
 				outline: none;
@@ -78,6 +81,7 @@
78 81
 				display: none;
79 82
 				height: 220px;
80 83
 				overflow-y: auto;
84
+				z-index: 99;
81 85
 			}
82 86
 			
83 87
 			.treeTable {
@@ -111,7 +115,6 @@
111 115
 				white-space: nowrap;
112 116
 				text-overflow: ellipsis;
113 117
 			}
114
-			
115 118
 			.content {
116 119
 				cursor: pointer;
117 120
 			}
@@ -194,7 +197,7 @@
194 197
 								<th><i style="color: #FF0000">*&nbsp;</i>所属分类:</th>
195 198
 								<td colspan="3">
196 199
 									<div class="inpBox">
197
-										<input type="text" class="inps inps1" />
200
+										<input type="text" class="inps inps1" readonly="readonly" />
198 201
 										<i class="xl xl_one"></i>
199 202
 										<div class="addTree xlAdd">
200 203
 											<ul id="addTreeDemo" class="ztree">
@@ -209,6 +212,31 @@
209 212
 								<td colspan="3"><input type="text" class="addTitle" /></td>
210 213
 							</tr>
211 214
 							<tr>
215
+								<th>所属部门:</th>
216
+								<td>
217
+									<div class="inpBox">
218
+										<input type="text" class="inps inps3"  readonly="readonly"/>
219
+										<i class="xl xl_three"></i>
220
+										<div class="addTree xlAddDep">
221
+											<ul id="xlAdd_depTree" class="ztree">
222
+												
223
+											</ul>
224
+										</div>
225
+									</div>
226
+								</td>
227
+							</tr>
228
+							<tr>
229
+								<th>个人或企业:</th>
230
+								<td colspan="3" class="addIndividualBusiness">
231
+									<label class="radio-inline" >
232
+										<input type="radio" name="individualBusinessInput" value="0" style="vertical-align: middle;display: inline-block; margin-top: 5px" checked="checked" >个人
233
+									</label>
234
+									<label class="radio-inline">
235
+										<input type="radio" name="individualBusinessInput" value="1" style="vertical-align: middle;display: inline-block; margin-top: 5px">企业
236
+									</label>
237
+								</td>
238
+							</tr>
239
+							<tr>
212 240
 								<th>关键字:</th>
213 241
 								<td colspan="3"><input type="text" class="addKey" /></td>
214 242
 							</tr>
@@ -258,7 +286,7 @@
258 286
 								<th><i style="color: #FF0000">*&nbsp;</i>所属分类:</th>
259 287
 								<td colspan="3">
260 288
 									<div class="inpBox">
261
-										<input type="text" class="inps inps4" />
289
+										<input type="text" class="inps inps4" readonly="readonly" />
262 290
 										<i class="xl xl_two"></i>
263 291
 										<div class="addTree xlChange">
264 292
 											<ul id="changeTreeDemo" class="ztree">
@@ -272,6 +300,31 @@
272 300
 								<td colspan="3"><input type="text" class="changeTitle" /></td>
273 301
 							</tr>
274 302
 							<tr>
303
+								<th>所属部门:</th>
304
+								<td>
305
+									<div class="inpBox">
306
+										<input type="text" class="inps inps5"  readonly="readonly"/>
307
+										<i class="xl xl_five"></i>
308
+										<div class="addTree xlChangeDep">
309
+											<ul id="xlChange_depTree" class="ztree">
310
+												
311
+											</ul>
312
+										</div>
313
+									</div>
314
+								</td>
315
+							</tr>
316
+							<tr>
317
+								<th>个人或企业:</th>
318
+								<td colspan="3" class="editIndividualBusiness">
319
+									<label class="radio-inline" >
320
+										<input type="radio" name="individualBusinessInputEdit" value="0" style="vertical-align: middle;display: inline-block; margin-top: 5px" checked="checked" >个人
321
+									</label>
322
+									<label class="radio-inline">
323
+										<input type="radio" name="individualBusinessInputEdit" value="1" style="vertical-align: middle;display: inline-block; margin-top: 5px">企业
324
+									</label>
325
+								</td>
326
+							</tr>
327
+							<tr>
275 328
 								<th>关键字:</th>
276 329
 								<td colspan="3"><input type="text" class="changeKey" /></td>
277 330
 							</tr>