Просмотр исходного кода

新增 欢迎词语音管理 通话记录增加满意度一列

zhangshuangnan лет назад: 7
Родитель
Сommit
44aff2c08d

+ 1 - 0
CallCenterWeb.UI/TelCall/CallRecord.html

@@ -332,6 +332,7 @@
332 332
 							<!--<th data-field="DealType" data-formatter="formatterDealType" data-align="center">处理方式</th>-->
333 333
 							<!--<th data-field="F_SeartGroup" data-align="center">部门</th>-->
334 334
 							<th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
335
+							<th data-field="MYDs" data-align="center">满意度</th>
335 336
 							<th data-field="UserCode" data-align="center">坐席工号</th>
336 337
 							<th data-field="UserName" data-align="center">坐席姓名</th>
337 338
 							<th data-field="BeginTime" data-align="center">呼叫开始时间</th>

+ 313 - 0
CallCenterWeb.UI/TelCall/WelcomeWords.html

@@ -0,0 +1,313 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>黑名单管理</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link href="../css/Table/table1.css" rel="stylesheet" />
11
+		<link href="../css/init.css" rel="stylesheet" />
12
+		<script src="../js/laydate/laydate.js"></script>
13
+		<style>
14
+			table td {
15
+				word-break: break-all;
16
+				word-wrap: break-word;
17
+			}
18
+			
19
+			.add_time input {
20
+				width: 50%;
21
+			}
22
+			.th-box {
23
+			    background-color: #ffffff;
24
+			}
25
+			#settime,#settime{
26
+				width: 228px;
27
+			}
28
+
29
+		</style>
30
+	</head>
31
+
32
+	<body class="gray-bg">
33
+		<div class="daoHang clearfix">
34
+				<div class="dhLeft">
35
+					<sapn><i class="syIcon"></i>位置:
36
+						<a href="javaScript:;" id="ReIndex">首页</a>&gt;
37
+						<a href="javaScript:;">话务管理</a>&gt;
38
+						<a href="" style="color: #000;">欢迎词语音管理</a>
39
+					</sapn>
40
+				</div>
41
+				<div class="dhRight">
42
+					<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
43
+				</div>
44
+
45
+			</div>
46
+		<div class="wrapper wrapper-content animated fadeInRight">
47
+			
48
+			<div class="th-box">
49
+				<div class="form-inline clearfix th-bar">
50
+					<div class="form-group time-box">
51
+						<i class="tub fa fa-search"></i>
52
+						<input type="text" class="form-control" id="KeyWords" placeholder="请输入关键字">
53
+					</div>
54
+						<div class="form-group time-box">
55
+						<select class="form-control" id="itemid">
56
+							<option value="">请选择项目id</option>
57
+							<option value="0">未启动</option>
58
+							<option value="1">启动中</option>
59
+						</select>
60
+					</div>
61
+					<div class="form-group time-box">
62
+						<i class="tub fa fa-calendar"></i>
63
+						<input type="text" class="form-control" id="settime" placeholder="请选择起止时间">
64
+					</div>
65
+					<div class="form-group time-box">
66
+						<i class="tub fa fa-calendar"></i>
67
+						<input type="text" class="form-control" id="settimes" placeholder="请选择有效时间">
68
+					</div>
69
+					<div class="form-group time-box">
70
+						<select class="form-control" id="state">
71
+							<option value="">请选择状态</option>
72
+							<option value="0">未启动</option>
73
+							<option value="1">启动中</option>
74
+						</select>
75
+					</div>
76
+				
77
+					<div class="form-group pull-right tool_bars">
78
+						<input type="button" class="sc_btn" id="sceach_btn" value="搜索" />
79
+						<input type="button" class="sc_btn" id="HY_add" onclick="btn_add()" value="添加" />
80
+						<input type="button" class="sc_btn" id="HY_edit" onclick="btn_edit()" value="修改" />
81
+						<input type="button" class="sc_btn" id="HY_delete" onclick="btn_deletes()" value="删除" />
82
+					</div>
83
+				</div>
84
+			</div>
85
+			<div style="width: 100%;padding-top: 10px;">
86
+				<table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
87
+					<thead>
88
+						<tr>
89
+							<th data-field="state" data-checkbox="true"></th>
90
+							<th data-field="item">项目名称</th>
91
+							<th data-field="path" data-formatter="setCode" data-align="center">录音</th>
92
+							<th data-field="bytime">生效时间</th>
93
+							<th data-field="eytime">失效时间</th>
94
+							<th data-field="btime">开始时间</th>
95
+							<th data-field="etime">结束时间</th>
96
+							<th data-field="state" data-formatter="formatterState">状态</th>
97
+							<th data-field="remark" data-formatter="formatterRemark">备注</th>
98
+						</tr>
99
+					</thead>
100
+					<tbody id="tbody"></tbody>
101
+				</table>
102
+			</div>
103
+		</div>
104
+	<!--下载框-->
105
+		<div class="t-shade">
106
+			<div class="shade_k">
107
+				<div class="shade_title">
108
+					<span>录音播放与下载<srong class="cknum"></srong></span>
109
+					<span class="setwin"><a>x</a></span>
110
+				</div>
111
+				<div class="shade_content">
112
+					<div class="Ly_box audiojs">
113
+					</div>
114
+					<div class="boxCon LY_box">
115
+
116
+					</div>
117
+				</div>
118
+			</div>
119
+		</div>
120
+		<script>
121
+			$(document).ready(function() {
122
+				laydate.render({
123
+					elem: '#settime',
124
+					theme: '#1ab394',
125
+					calendar: true,
126
+					range: '~'
127
+				});
128
+				laydate.render({
129
+					elem: '#settimes',
130
+					theme: '#1ab394',
131
+					calendar: true,
132
+					range: '~'
133
+				});
134
+				initTable();
135
+				/*搜索*/
136
+				$("#sceach_btn").click(function() {
137
+					initTable();
138
+				})
139
+				$(".setwin").click(function() {
140
+					$(".t-shade").removeClass("cx");
141
+					$('audio')[0].pause();
142
+				});
143
+			})
144
+			function initTable() {
145
+				//先销毁表格
146
+				$('#list').bootstrapTable('destroy');
147
+				//初始化表格,动态从服务器加载数据
148
+				$("#list").bootstrapTable({
149
+					method: "get", //使用get请求到服务器获取数据
150
+					url: huayi.config.callcenter_url + "IVRWelcome/GetList", //获取数据的Servlet地址
151
+					contentType: 'application/x-www-form-urlencoded',
152
+					striped: true, //表格显示条纹
153
+					pagination: true, //启动分页
154
+					pageSize: 10, //每页显示的记录数
155
+					pageNumber: 1, //当前第几页
156
+					pageList: [10, 20, 50, 100], //记录数可选列表
157
+					search: false, //是否启用查询
158
+					showColumns: false, //显示下拉框勾选要显示的列
159
+					showRefresh: false, //显示刷新按钮
160
+					sidePagination: "server", //表示服务端请求
161
+					//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
162
+					//设置为limit可以获取limit, offset, search, sort, order
163
+					queryParamsType: "undefined",
164
+					queryParams: function queryParams(params) { //设置查询参数
165
+						var param = {
166
+							page: params.pageNumber,
167
+							pagesize: params.pageSize,
168
+							key: $("#KeyWords").val(),
169
+							itemid: $("#itemid").val(),
170
+							btime: $('#settime').val() && $('#settime').val().split(' ~ ')[0],
171
+							etime: $('#settime').val() && $('#settime').val().split(' ~ ')[1],
172
+							bytime: $('#settimes').val() && $('#settimes').val().split(' ~ ')[0],
173
+							eytime: $('#settimes').val() && $('#settimes').val().split(' ~ ')[1],
174
+							state:$('#state').val(),
175
+							token: $.cookie("token")
176
+						};
177
+						return param;
178
+					},
179
+					onLoadSuccess: function() { //加载成功时执行
180
+						//layer.msg("加载成功");
181
+					},
182
+					onLoadError: function() { //加载失败时执行
183
+						//layer.msg("加载数据失败", { time: 1500, icon: 2 });
184
+					}
185
+				});
186
+			}
187
+			/*删除提示*/
188
+			function btn_deletes(){
189
+				var ids = $.map($('#list').bootstrapTable('getSelections'),
190
+						function(row) {
191
+							return row.id;
192
+						});
193
+					/*判断长度*/
194
+					if(ids.length <= 0) {
195
+						layer.confirm('没有可删除的选项?', {
196
+							btn: ['确定'] //按钮
197
+						});
198
+						return;
199
+					}
200
+					removes();
201
+			}
202
+			function removes() {
203
+				layer.confirm('确定删除当前记录?', {
204
+					btn: ['是', '否'] //按钮
205
+				}, function() {
206
+
207
+					/*执行删除*/
208
+					var ids = $.map($('#list').bootstrapTable('getSelections'),
209
+						function(row) {
210
+							return row.id;
211
+						});
212
+					/*发送请求*/
213
+					$.post(huayi.config.callcenter_url + "IVRWelcome/DelIVRWords", {
214
+						ids: ids,
215
+						token: $.cookie("token")
216
+					}, function(result) {
217
+						result = JSON.parse(result);
218
+						if(result.state.toLowerCase() == "success") {
219
+							layer.msg("删除成功");
220
+							$('#list').bootstrapTable('refresh');
221
+						}
222
+					})
223
+				});
224
+			}
225
+			//添加
226
+			function btn_add(){
227
+				layer.open({
228
+						type: 2,
229
+						content: "addWelcomeWords.html",
230
+						title: '添加欢迎词语音',
231
+						area: ['75%', '70%'], //宽高
232
+					});
233
+			}
234
+			//修改
235
+			function btn_edit(){
236
+				var ids = $.map($('#list').bootstrapTable('getSelections'),
237
+						function(row) {
238
+							return row.id;
239
+						});
240
+					if(ids.length != 1) {
241
+						layer.confirm('请选择一行进行修改?', {
242
+							btn: ['确定'] //按钮
243
+						});
244
+						return;
245
+					} else {
246
+						layer.open({
247
+						type: 2,
248
+						content: "addWelcomeWords.html?id="+ids,
249
+						title: '修改欢迎词语音',
250
+						area: ['75%', '70%'], //宽高
251
+					});
252
+
253
+					}
254
+			}
255
+			//状态
256
+			function formatterState(val,row){
257
+				var str="";
258
+				if(val==0){
259
+					str='未启动'
260
+				}else{
261
+					str='启动中'
262
+				}
263
+				return str
264
+			}
265
+			//备注
266
+			function formatterRemark(val){
267
+				var str="";
268
+				if(val) {
269
+					if(val.length > 12) {
270
+						str='<div title="'+ val +'">'+val.substring(0, 12) + '...</div>';
271
+					}else{
272
+						str='<div title="'+ val +'">'+ val + '</div>';
273
+					}
274
+					return str;
275
+				}
276
+			}
277
+				//音频
278
+			function setCode(val) {
279
+				if(val) {
280
+					return '<div class="imgs">' +
281
+						'<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
282
+						'</div>';
283
+				} else {
284
+					return '';
285
+				}
286
+			}
287
+				//录音
288
+			function ck(val) {
289
+//				if(!!window.ActiveXObject || "ActiveXObject" in window){
290
+//					layer.open({
291
+//						type: 1,
292
+//						content: htmls,
293
+//						title: '录音播放',
294
+//						area: ['55%', '65%'], //宽高
295
+//					});
296
+//					WindowsMediaPlayer.URL=$(val).attr('item');
297
+//					$('<a href="' + $(val).attr('item') + '" class="sc_btn LY "download="' + $(val).attr('item') + '">下载录音</a>').appendTo(".xzly");
298
+//					
299
+//				}else{
300
+						var path = $(val).attr("item");
301
+						$(".t-shade").addClass("cx");
302
+						$(".Ly_box").empty();
303
+						$(".LY_box").empty();
304
+						$('<audio  style="width:100%;"class=" " src="' + path + '" loop="loop" type="audio/v3" controls="controls"></audio>').appendTo(".Ly_box");
305
+						$('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");
306
+//				}
307
+			}
308
+		
309
+		</script>
310
+
311
+	</body>
312
+
313
+</html>

+ 225 - 0
CallCenterWeb.UI/TelCall/addWelcomeWords.html

@@ -0,0 +1,225 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>黑名单管理</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<script src="../js/laydate/laydate.js"></script>
11
+		<style>
12
+			.greetings{
13
+				margin-top: 20px;
14
+			}
15
+			.greetings label{
16
+				text-align: right;
17
+			}
18
+			.greetings ul{
19
+				margin: 0;
20
+				padding: 0;
21
+			}
22
+			.greetings li{
23
+				list-style: none;
24
+			}
25
+			.text_require {
26
+				color: red;
27
+				vertical-align: middle;
28
+				font-weight: 900;
29
+			}
30
+			.time-box{
31
+				position: relative;
32
+			}
33
+			i.tub {
34
+			    position: absolute;
35
+			    right: 26px;
36
+			    top: 8px;
37
+			    font-size: 18px;
38
+			    color:  rgb(26, 179, 148);
39
+			}
40
+			.greetings .radio-inline input[type="radio"] {
41
+		   	 	margin-top: 4px;
42
+		   	}
43
+			.greetings textarea {
44
+		   	 	resize: none;
45
+		   	}
46
+		   	.greetings .form-horizontal .radio-inline {
47
+		  		padding-top: 0;
48
+		    }
49
+		    #greetingSave{
50
+		    	    background: rgb(26, 179, 148);
51
+		    	    color: #fff;
52
+		    }
53
+		</style>
54
+	</head>
55
+
56
+	<body class="gray-bg">
57
+		<div class="container greetings">
58
+			<ul class="row clearfix form-horizontal">
59
+				<li class="form-group">
60
+					<label for="greetingTimes" class="col-md-2"><b class="text_require">*</b>项目Id</label>
61
+					<div class="col-md-10 time-box">
62
+					<select id="itemid" class="form-control" >
63
+							<option value="0">项目1</option>
64
+							<option value="1">项目2</option>
65
+					</select>
66
+					</div>
67
+				</li>
68
+				<li class="form-group">
69
+					<label for="greetingRemark" class="col-md-2"><b class="text_require">*</b>项目名称</label>
70
+					<div class="col-md-10">
71
+						<input type="text" class="form-control" id="item" placeholder="请输入项目名称"  />
72
+					</div>
73
+				</li>
74
+				<li class="form-group">
75
+					<label for="greetingTimes" class="col-md-2"><b class="text_require">*</b>生效时限</label>
76
+					<div class="col-md-10 time-box">
77
+						<i class="tub fa fa-calendar"></i>
78
+						<input class="form-control" type="text" id="greetingTimes">
79
+					</div>
80
+				</li>
81
+				<li class="form-group">
82
+					<label for="greetingTimes" class="col-md-2"><b class="text_require">*</b>状态</label>
83
+					<div class="col-md-10 time-box">
84
+					<select id="isstate" class="form-control" >
85
+							<option value="0">未启动</option>
86
+							<option value="1">启动中</option>
87
+					</select>
88
+					</div>
89
+				</li>
90
+				<li class="form-group">
91
+					<label for="greetingTimes" class="col-md-2"><b class="text_require">*</b>语音文件</label>
92
+					<div class="col-md-10 time-box">
93
+						<div style="display: none;">
94
+	                   		<input type="file" id="upFile" name="Files" accept="audio/*">
95
+	               		 </div>
96
+	               		    <input type="button" class="btn" id="HY_subImport" onclick="btn_subImport()" value="导入文件" />
97
+	               		    <span class="fileName"></span>
98
+					</div>
99
+				</li>
100
+				<li class="form-group">
101
+					<label for="greetingRemark" class="col-md-2">备注</label>
102
+					<div class="col-md-10">
103
+						<textarea id="remark" class="form-control" rows="7" placeholder="请输入备注"></textarea>
104
+					</div>
105
+				</li>
106
+			</ul>
107
+			<div class="form-group row clearfix" style="text-align: center;">
108
+				<div class="col-md-offset-2 col-md-10">
109
+					<button class="btn" id="greetingSave" type="button" onclick="addedit()">保存</button>
110
+				</div>
111
+			</div>
112
+			<input type="hidden" id="path"/>
113
+			<input type="hidden" id="filename"/>
114
+			<input type="hidden" id="loadpath"/>
115
+		</div>
116
+		<script>
117
+			var ids=helper.request.queryString("id");
118
+			$(document).ready(function() {
119
+				laydate.render({
120
+					elem: '#greetingTimes',
121
+					range: '~',
122
+					type: 'datetime',
123
+					//max : 31,
124
+					min: 0,
125
+					theme: '#1ab394',
126
+				});
127
+  				$("#upFile").change(function () {
128
+                        upload();
129
+                    });
130
+                    
131
+			})
132
+			//新增或者编辑
133
+			function addedit() {
134
+				if(!$("#itemid").val()) {
135
+					layer.confirm('请选择项目Id', {
136
+						icon: 2,
137
+						btn: ['确定'] //按钮
138
+					});
139
+					return;
140
+				}
141
+				if(!$("#item").val()) {
142
+					layer.confirm('请输入项目名称', {
143
+						icon: 2,
144
+						btn: ['确定'] //按钮
145
+					});
146
+					return;
147
+				}
148
+				if(!$("#greetingTimes").val()) {
149
+					layer.confirm('请选择时间', {
150
+						icon: 2,
151
+						btn: ['确定'] //按钮
152
+					});
153
+					return;
154
+				}
155
+				if(!$("#path").val()) {
156
+					layer.confirm('请上传语音文件', {
157
+						icon: 2,
158
+						btn: ['确定'] //按钮
159
+					});
160
+					return;
161
+				}
162
+				/*发送请求*/
163
+				$.post(huayi.config.callcenter_url + "IVRWelcome/AddIVRWords", {
164
+					id: ids,
165
+					itemid: $("#itemid").val(),//项目ID
166
+					item: $("#item").val(),//项目
167
+					loadpath: $("#loadpath").val(),//本地路径
168
+					filename: $("#filename").val(),//文件名称
169
+					path: $("#path").val(),//语音路径
170
+					isstate: $("#isstate").val(),//状态
171
+					sdate: $('#greetingTimes').val() && $('#greetingTimes').val().split(' ~ ')[0],//生效时间
172
+					edate: $('#greetingTimes').val() && $('#greetingTimes').val().split(' ~ ')[1],//失效时间
173
+					remark: $("#remark").val(),//备注
174
+					token: $.cookie("token")
175
+				}, function(result) {
176
+					result = JSON.parse(result);
177
+					if(result.state.toLowerCase() == "success") {
178
+						var index = parent.layer.getFrameIndex(window.name);
179
+            			parent.layer.close(index);
180
+						parent.layer.msg("保存成功!");
181
+						parent.$('#list').bootstrapTable('refresh');
182
+					}
183
+				})
184
+			}
185
+			function btn_subImport(){
186
+				 $("#upFile").trigger('click')
187
+			}
188
+			function upload(){
189
+				 var formData = new FormData();
190
+	            formData.append("upFile", document.getElementById("upFile").files[0]);
191
+	            $.ajax({
192
+	                url: huayi.config.callcenter_url + 'IVRWelcome/UploadWav',
193
+	                type: "POST",
194
+	                data: formData,
195
+	                /**
196
+	                 *必须false才会自动加上正确的Content-Type
197
+	                 */
198
+	                contentType: false,
199
+	                /**
200
+	                 * 必须false才会避开jQuery对 formdata 的默认处理
201
+	                 * XMLHttpRequest会对 formdata 进行正确的处理
202
+	                 */
203
+	                processData: false,
204
+	                success: function (result) {
205
+	                    document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
206
+	                    $("#upFile").change(function () {
207
+	                        upload();
208
+	                    });
209
+	                    var r = $.parseJSON(result);
210
+	                    if (r.state.toLowerCase() == 'success') {
211
+	                        layer.msg("导入成功");
212
+	                        $('#loadpath').val(r.data.loadpath);
213
+	                        $('#filename').val(r.data.filename);
214
+	                        $('.fileName').text(r.data.filename);
215
+	                        $('#path').val(r.data.wavpath);
216
+	                        
217
+	                    }
218
+	                }
219
+	            });
220
+			}
221
+		</script>
222
+
223
+	</body>
224
+
225
+</html>