Selaa lähdekoodia

数据量统计、坐席话务量统计、客户满意度统计、排队统计报表、置忙统计报表

zhangshuangnan 7 vuotta sitten
vanhempi
commit
3f5dcd847e

+ 200 - 0
CallCenterWeb.UI/ReportForm/CustomerSatisfaction.html

@@ -0,0 +1,200 @@
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 rel="stylesheet" href="../js/layui/css/layui.css" />
11
+		<link rel="stylesheet" href="../css/init.css" />
12
+		<style>
13
+			.toolBox {
14
+				background: #f3f3f4;
15
+				height: 60px;
16
+				padding: 10px 20px;
17
+			}
18
+			
19
+			.th-content {
20
+				width: 90%;
21
+				margin: 0 auto;
22
+			}
23
+		</style>
24
+	</head>
25
+
26
+	<body class="gray-bg" style="background: #fefefe;">
27
+		<div class="daoHang clearfix">
28
+			<div class="dhLeft">
29
+				<sapn><i class="syIcon"></i>位置:
30
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
31
+					<a href="javaScript:;">报表分析</a>&gt;
32
+					<a href="javaScript:;">报表统计</a>&gt;
33
+					<a href="" style="color: #000;">客户满意度统计</a>
34
+				</sapn>
35
+			</div>
36
+			<div class="dhRight">
37
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
38
+			</div>
39
+		</div>
40
+		<div class="toolBox">
41
+			<div class="th-bar clearfix">
42
+				<div class="pull-right">
43
+					<div class="form-inline">
44
+						<div class="time-box form-group">
45
+							<i class="tub fa fa-calendar"></i>
46
+							<input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
47
+						</div>
48
+						<div class="pull-right">
49
+							<button class="btns search">搜索</button>
50
+							<a href="" class="btns export">导出</a>
51
+						</div>
52
+					</div>
53
+				</div>
54
+			</div>
55
+		</div>
56
+		<div class="th-content">
57
+			<table class="layui-hide" id="t_callTotal"></table>
58
+		</div>
59
+		<script src="../js/layui/layui.js"></script>
60
+		<script>
61
+			var token = $.cookie("token");
62
+			var stime = ''; //开始时间
63
+			var endtime = ''; //结束时间
64
+
65
+			$(document).ready(function() {
66
+				layui.use('laydate', function() {
67
+					var laydate = layui.laydate;
68
+					//日期
69
+					laydate.render({
70
+						elem: '#startTime',
71
+						range: '~',
72
+						theme: '#1ab394',
73
+						calendar: 'true'
74
+					});
75
+				});
76
+				getTableDataList(); //获取表格数据
77
+
78
+				/*搜索*/
79
+				$(".search").click(function() {
80
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
81
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
82
+					getTableDataList(); //获取表格数据
83
+				})
84
+				//导出
85
+				$('.export').click(function() {
86
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
87
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
88
+					dcexcel(this);
89
+				});
90
+
91
+			});
92
+			function dcexcel(obj) {
93
+				var url = huayi.config.callcenter_url + "ZuoXiManYiDu/ExptList?token=" + token;
94
+				url += "&stime=" + stime + "&endtime=" + endtime;
95
+				obj.href = url;
96
+			}
97
+
98
+			//加载表格
99
+			function getTableDataList() {
100
+				var colsArr = [];
101
+				var dataArr = [];
102
+				var loadindex;
103
+				//表头
104
+			$.ajax({
105
+				type:"get",
106
+				url:huayi.config.callcenter_url + "ZuoXiManYiDu/GetColumnList",
107
+				async:true,
108
+				dataType: 'json',
109
+				beforeSend:function(){
110
+					loadindex = layer.load()
111
+				},
112
+				data: {
113
+						token: token,
114
+					},
115
+					success:function(data){
116
+						if(data.state.toLowerCase() == "success") {
117
+							var res = data.data;
118
+							if(res) {
119
+								var newArr = [];
120
+								if(res && res.length > 0) {
121
+									newArr.push({
122
+										field: res[0],
123
+										title: res[0],
124
+										align: 'center',
125
+										fixed: true, 
126
+										sort: true,
127
+										width: 150,
128
+									});
129
+									for(var i = 1, colNL = res.length; i < colNL; i++){
130
+										newArr.push({
131
+											field: res[i],
132
+											title: res[i],
133
+											align: 'center',
134
+											//fixed: true, 
135
+											//sort: true,
136
+											//width: 150,
137
+										});
138
+									}
139
+//									newArr.push({
140
+//											field: '总计',
141
+//											title: '总计',
142
+//											align: 'center',
143
+//											fixed: 'right', 
144
+//											templet: function(d){
145
+//										        return '<span class="color_73926">'+ d.总计 +'</span>'
146
+//										    },
147
+//											sort: true,
148
+//											//width: 150,
149
+//										});
150
+								}
151
+								colsArr.push(newArr);
152
+							}
153
+						}
154
+					}
155
+			});
156
+				//表格
157
+				$.ajax({
158
+					type: 'get',
159
+					url: huayi.config.callcenter_url + "ZuoXiManYiDu/GetDataList",
160
+					async: true,
161
+					dataType: 'json',
162
+					beforeSend:function(){
163
+						loadindex = layer.load()
164
+					},
165
+					data: {
166
+						stime: stime,
167
+						endtime: endtime,
168
+						token: token,
169
+					},
170
+					success: function(data) {
171
+						if(data.state.toLowerCase() == "success") {
172
+							var res = data.data;
173
+							if(res) {
174
+								dataArr = res;
175
+								layui.use('table', function() {
176
+									var table = layui.table;
177
+									//方法级渲染
178
+									table.render({
179
+										elem: '#t_callTotal',
180
+										skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
181
+										even: true, //开启隔行背景
182
+										size: 'lg', //sm,lg尺寸的表格
183
+										cellMinWidth: 100,
184
+										page: true,
185
+										data: dataArr,
186
+										cols: colsArr,
187
+										height: 'full-150'
188
+									});
189
+								});
190
+
191
+							}
192
+						}
193
+					},
194
+				}).then(function(){layer.close(loadindex);});
195
+			}
196
+		</script>
197
+
198
+	</body>
199
+
200
+</html>

+ 200 - 0
CallCenterWeb.UI/ReportForm/QueuingStatistics.html

@@ -0,0 +1,200 @@
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 rel="stylesheet" href="../js/layui/css/layui.css" />
11
+		<link rel="stylesheet" href="../css/init.css" />
12
+		<style>
13
+			.toolBox {
14
+				background: #f3f3f4;
15
+				height: 60px;
16
+				padding: 10px 20px;
17
+			}
18
+			
19
+			.th-content {
20
+				width: 90%;
21
+				margin: 0 auto;
22
+			}
23
+		</style>
24
+	</head>
25
+
26
+	<body class="gray-bg" style="background: #fefefe;">
27
+		<div class="daoHang clearfix">
28
+			<div class="dhLeft">
29
+				<sapn><i class="syIcon"></i>位置:
30
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
31
+					<a href="javaScript:;">报表分析</a>&gt;
32
+					<a href="javaScript:;">报表统计</a>&gt;
33
+					<a href="" style="color: #000;">排队统计报表</a>
34
+				</sapn>
35
+			</div>
36
+			<div class="dhRight">
37
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
38
+			</div>
39
+		</div>
40
+		<div class="toolBox">
41
+			<div class="th-bar clearfix">
42
+				<div class="pull-right">
43
+					<div class="form-inline">
44
+						<div class="time-box form-group">
45
+							<i class="tub fa fa-calendar"></i>
46
+							<input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
47
+						</div>
48
+						<div class="pull-right">
49
+							<button class="btns search">搜索</button>
50
+							<a href="" class="btns export">导出</a>
51
+						</div>
52
+					</div>
53
+				</div>
54
+			</div>
55
+		</div>
56
+		<div class="th-content">
57
+			<table class="layui-hide" id="t_callTotal"></table>
58
+		</div>
59
+		<script src="../js/layui/layui.js"></script>
60
+		<script>
61
+			var token = $.cookie("token");
62
+			var stime = ''; //开始时间
63
+			var endtime = ''; //结束时间
64
+
65
+			$(document).ready(function() {
66
+				layui.use('laydate', function() {
67
+					var laydate = layui.laydate;
68
+					//日期
69
+					laydate.render({
70
+						elem: '#startTime',
71
+						range: '~',
72
+						theme: '#1ab394',
73
+						calendar: 'true'
74
+					});
75
+				});
76
+				getTableDataList(); //获取表格数据
77
+
78
+				/*搜索*/
79
+				$(".search").click(function() {
80
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
81
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
82
+					getTableDataList(); //获取表格数据
83
+				})
84
+				//导出
85
+				$('.export').click(function() {
86
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
87
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
88
+					dcexcel(this);
89
+				});
90
+
91
+			});
92
+			function dcexcel(obj) {
93
+				var url = huayi.config.callcenter_url + "CallQueuing/ExptList?token=" + token;
94
+				url += "&stime=" + stime + "&endtime=" + endtime;
95
+				obj.href = url;
96
+			}
97
+
98
+			//加载表格
99
+			function getTableDataList() {
100
+				var colsArr = [];
101
+				var dataArr = [];
102
+				var loadindex;
103
+				//表头
104
+			$.ajax({
105
+				type:"get",
106
+				url:huayi.config.callcenter_url + "CallQueuing/GetColumnList",
107
+				async:true,
108
+				dataType: 'json',
109
+				beforeSend:function(){
110
+					loadindex = layer.load()
111
+				},
112
+				data: {
113
+						token: token,
114
+					},
115
+					success:function(data){
116
+						if(data.state.toLowerCase() == "success") {
117
+							var res = data.data;
118
+							if(res) {
119
+								var newArr = [];
120
+								if(res && res.length > 0) {
121
+									newArr.push({
122
+										field: res[0],
123
+										title: res[0],
124
+										align: 'center',
125
+										fixed: true, 
126
+										sort: true,
127
+										width: 150,
128
+									});
129
+									for(var i = 1, colNL = res.length; i < colNL; i++){
130
+										newArr.push({
131
+											field: res[i],
132
+											title: res[i],
133
+											align: 'center',
134
+											//fixed: true, 
135
+											//sort: true,
136
+											//width: 150,
137
+										});
138
+									}
139
+//									newArr.push({
140
+//											field: '总计',
141
+//											title: '总计',
142
+//											align: 'center',
143
+//											fixed: 'right', 
144
+//											templet: function(d){
145
+//										        return '<span class="color_73926">'+ d.总计 +'</span>'
146
+//										    },
147
+//											sort: true,
148
+//											//width: 150,
149
+//										});
150
+								}
151
+								colsArr.push(newArr);
152
+							}
153
+						}
154
+					}
155
+			});
156
+				//表格
157
+				$.ajax({
158
+					type: 'get',
159
+					url: huayi.config.callcenter_url + "CallQueuing/GetDataList",
160
+					async: true,
161
+					dataType: 'json',
162
+					beforeSend:function(){
163
+						loadindex = layer.load()
164
+					},
165
+					data: {
166
+						stime: stime,
167
+						endtime: endtime,
168
+						token: token,
169
+					},
170
+					success: function(data) {
171
+						if(data.state.toLowerCase() == "success") {
172
+							var res = data.data;
173
+							if(res) {
174
+								dataArr = res;
175
+								layui.use('table', function() {
176
+									var table = layui.table;
177
+									//方法级渲染
178
+									table.render({
179
+										elem: '#t_callTotal',
180
+										skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
181
+										even: true, //开启隔行背景
182
+										size: 'lg', //sm,lg尺寸的表格
183
+										cellMinWidth: 100,
184
+										page: true,
185
+										data: dataArr,
186
+										cols: colsArr,
187
+										height: 'full-150'
188
+									});
189
+								});
190
+
191
+							}
192
+						}
193
+					},
194
+				}).then(function(){layer.close(loadindex);});
195
+			}
196
+		</script>
197
+
198
+	</body>
199
+
200
+</html>

+ 205 - 0
CallCenterWeb.UI/ReportForm/sayBusyStatistics.html

@@ -0,0 +1,205 @@
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 rel="stylesheet" href="../js/layui/css/layui.css" />
11
+		<link rel="stylesheet" href="../css/init.css" />
12
+		<style>
13
+			.toolBox {
14
+				background: #f3f3f4;
15
+				height: 60px;
16
+				padding: 10px 20px;
17
+			}
18
+			
19
+			.th-content {
20
+				width: 90%;
21
+				margin: 0 auto;
22
+			}
23
+		</style>
24
+	</head>
25
+
26
+	<body class="gray-bg" style="background: #fefefe;">
27
+		<div class="daoHang clearfix">
28
+			<div class="dhLeft">
29
+				<sapn><i class="syIcon"></i>位置:
30
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
31
+					<a href="javaScript:;">报表分析</a>&gt;
32
+					<a href="javaScript:;">报表统计</a>&gt;
33
+					<a href="" style="color: #000;">置忙统计报表</a>
34
+				</sapn>
35
+			</div>
36
+			<div class="dhRight">
37
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
38
+			</div>
39
+		</div>
40
+		<div class="toolBox">
41
+			<div class="th-bar clearfix">
42
+				<div class="pull-right">
43
+					<div class="form-inline">
44
+						<div class="time-box form-group">
45
+							<i class="tub fa fa-calendar"></i>
46
+							<input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
47
+						</div>
48
+						<div class="pull-right">
49
+							<button class="btns search">搜索</button>
50
+							<a href="" class="btns export">导出</a>
51
+						</div>
52
+					</div>
53
+				</div>
54
+			</div>
55
+		</div>
56
+		<div class="th-content">
57
+			<table class="layui-hide" id="t_callTotal"></table>
58
+		</div>
59
+		<script src="../js/layui/layui.js"></script>
60
+		<script>
61
+			var token = $.cookie("token");
62
+			var stime = ''; //开始时间
63
+			var endtime = ''; //结束时间
64
+
65
+			$(document).ready(function() {
66
+				layui.use('laydate', function() {
67
+					var laydate = layui.laydate;
68
+					//日期
69
+					laydate.render({
70
+						elem: '#startTime',
71
+						range: '~',
72
+						theme: '#1ab394',
73
+						calendar: 'true'
74
+					});
75
+				});
76
+				getTableDataList(); //获取表格数据
77
+
78
+				/*搜索*/
79
+				$(".search").click(function() {
80
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
81
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
82
+					getTableDataList(); //获取表格数据
83
+				})
84
+				//导出
85
+				$('.export').click(function() {
86
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
87
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
88
+					dcexcel(this);
89
+				});
90
+
91
+			});
92
+			function dcexcel(obj) {
93
+				var url = huayi.config.callcenter_url + "CallBusy/ExptList?token=" + token;
94
+				url += "&stime=" + stime + "&endtime=" + endtime;
95
+				obj.href = url;
96
+			}
97
+
98
+			//加载表格
99
+			function getTableDataList() {
100
+				var colsArr = [];
101
+				var dataArr = [];
102
+				var loadindex;
103
+				//表头
104
+			$.ajax({
105
+				type:"get",
106
+				url:huayi.config.callcenter_url + "CallBusy/GetColumnList",
107
+				async:true,
108
+				dataType: 'json',
109
+				beforeSend:function(){
110
+					loadindex = layer.load()
111
+				},
112
+				data: {
113
+						token: token,
114
+					},
115
+					success:function(data){
116
+						if(data.state.toLowerCase() == "success") {
117
+							var res = data.data;
118
+							var reg = new RegExp("/","g");
119
+							if(res) {
120
+								var newArr = [];
121
+								if(res && res.length > 0) {
122
+									newArr.push({
123
+										field: res[0],
124
+										title: res[0],
125
+										align: 'center',
126
+										fixed: true, 
127
+										sort: true,
128
+										width: 150,
129
+									});
130
+									for(var i = 1, colNL = res.length; i < colNL; i++){
131
+										if(res[i].indexOf('/') !=-1){
132
+//											res[i]=res[i].replace('/', "与");
133
+											res[i]='时间比';
134
+										}
135
+										newArr.push({
136
+											field: res[i],
137
+											title: res[i],
138
+											align: 'center',
139
+											//fixed: true, 
140
+											//sort: true,
141
+											//width: 150,
142
+										});
143
+									}
144
+//									newArr.push({
145
+//											field: '总计',
146
+//											title: '总计',
147
+//											align: 'center',
148
+//											fixed: 'right', 
149
+//											templet: function(d){
150
+//										        return '<span class="color_73926">'+ d.总计 +'</span>'
151
+//										    },
152
+//											sort: true,
153
+//											//width: 150,
154
+//										});
155
+								}
156
+								colsArr.push(newArr);
157
+							}
158
+						}
159
+					}
160
+			});
161
+				//表格
162
+				$.ajax({
163
+					type: 'get',
164
+					url: huayi.config.callcenter_url + "CallBusy/GetDataList",
165
+					async: true,
166
+					dataType: 'json',
167
+					beforeSend:function(){
168
+						loadindex = layer.load()
169
+					},
170
+					data: {
171
+						stime: stime,
172
+						endtime: endtime,
173
+						token: token,
174
+					},
175
+					success: function(data) {
176
+						if(data.state.toLowerCase() == "success") {
177
+							var res = data.data;
178
+							if(res) {
179
+								dataArr = res;
180
+								layui.use('table', function() {
181
+									var table = layui.table;
182
+									//方法级渲染
183
+									table.render({
184
+										elem: '#t_callTotal',
185
+										skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
186
+										even: true, //开启隔行背景
187
+										size: 'lg', //sm,lg尺寸的表格
188
+										cellMinWidth: 100,
189
+										page: true,
190
+										data: dataArr,
191
+										cols: colsArr,
192
+										height: 'full-150'
193
+									});
194
+								});
195
+
196
+							}
197
+						}
198
+					},
199
+				}).then(function(){layer.close(loadindex);});
200
+			}
201
+		</script>
202
+
203
+	</body>
204
+
205
+</html>

+ 149 - 168
CallCenterWeb.UI/ReportForm/seatPhoneCount.html

@@ -2,81 +2,67 @@
2 2
 <html>
3 3
 
4 4
 	<head>
5
-		<meta charset="utf-8">
5
+		<meta charset="UTF-8">
6
+		<title>座席话务统计</title>
6 7
 		<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-
8
-		<title>坐席话务统计</title>
9
-		<!--[if lt IE 9]>
10
-	    	<meta http-equiv="refresh" content="0;ie.html" />
11
-	    <![endif]-->
12
-		<script src="Script/Common/huayi.load.js"></script>
13
-		<script src="Script/Common/huayi.config.js"></script>
14
-		<link rel="stylesheet" href="./js/layui/css/layui.css" />
15
-		<link rel="stylesheet" href="css/init.css" />
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link rel="stylesheet" href="../js/layui/css/layui.css" />
11
+		<link rel="stylesheet" href="../css/init.css" />
16 12
 		<style>
17
-			.zxt-top {
13
+			.toolBox {
18 14
 				background: #f3f3f4;
19 15
 				height: 60px;
20 16
 				padding: 10px 20px;
21 17
 			}
22 18
 			
23
-			.topCon {
24
-				float: right;
25
-				margin-right: 45px;
26
-			}
27
-			
28
-			.zxt-content {
29
-				width: 95%;
19
+			.th-content {
20
+				width: 90%;
30 21
 				margin: 0 auto;
31 22
 			}
32 23
 		</style>
33 24
 	</head>
34 25
 
35 26
 	<body class="gray-bg" style="background: #fefefe;">
36
-		<div class="zxtable">
37
-			<div class="daoHang clearfix">
38
-				<div class="dhLeft">
39
-					<sapn><i class="syIcon"></i>位置:
40
-						<a id="ReIndex" href="javaScript:;">首页</a>&gt;
41
-						<a href="javaScript:;">报表分析</a>&gt;
42
-						<a href="javaScript:;">话务运营分析</a>&gt;
43
-						<a href="" class="nowPosition">坐席话务统计</a>
44
-					</sapn>
45
-				</div>
46
-				<div class="dhRight">
47
-					<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
48
-				</div>
27
+		<div class="daoHang clearfix">
28
+			<div class="dhLeft">
29
+				<sapn><i class="syIcon"></i>位置:
30
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
31
+					<a href="javaScript:;">报表分析</a>&gt;
32
+					<a href="javaScript:;">报表统计</a>&gt;
33
+					<a href="" style="color: #000;">座席话务统计</a>
34
+				</sapn>
49 35
 			</div>
50
-			<div class="zxt-top clearfix">
51
-				<div class="topCon">
52
-					<div class="form-inline th-bar clearfix">
36
+			<div class="dhRight">
37
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
38
+			</div>
39
+		</div>
40
+		<div class="toolBox">
41
+			<div class="th-bar clearfix">
42
+				<div class="pull-right">
43
+					<div class="form-inline">
53 44
 						<div class="time-box form-group">
54 45
 							<i class="tub fa fa-calendar"></i>
55 46
 							<input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
56 47
 						</div>
57
-						<div class="time-box form-group">
58
-							<select name="" id="zuoxi" class="form-control"></select>
59
-
48
+						<div class="pull-right">
49
+							<button class="btns search">搜索</button>
50
+							<a href="" class="btns export">导出</a>
60 51
 						</div>
61
-						<div class="form-group tool_bars pull-right">
62
-							<button class="btns sear">搜索</button>
63
-							<!--<a class="btns export">导出</a>-->
64
-						</div>
65
-
66 52
 					</div>
67
-
68 53
 				</div>
69 54
 			</div>
70
-
71
-			<div class="zxt-content">
72
-				<table class="layui-hide" id="t_callTotal"></table>
73
-			</div>
74 55
 		</div>
75
-		<script src="js/layui/layui.js"></script>
56
+		<div class="th-content">
57
+			<table class="layui-hide" id="t_callTotal"></table>
58
+		</div>
59
+		<script src="../js/layui/layui.js"></script>
76 60
 		<script>
77 61
 			var token = $.cookie("token");
78
-			$(function() {
79
-				bindseat(); //获取坐席
62
+			var stime = ''; //开始时间
63
+			var endtime = ''; //结束时间
64
+
65
+			$(document).ready(function() {
80 66
 				layui.use('laydate', function() {
81 67
 					var laydate = layui.laydate;
82 68
 					//日期
@@ -88,133 +74,128 @@
88 74
 					});
89 75
 				});
90 76
 				getTableDataList(); //获取表格数据
91
-				//搜索事件
92
-				$(".sear").click(function() {
93
-					getTableDataList();
94
-				});
77
+
78
+				/*搜索*/
79
+				$(".search").click(function() {
80
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
81
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
82
+					getTableDataList(); //获取表格数据
83
+				})
95 84
 				//导出
96
-//				$('.export').click(function() {
97
-//					dcexcel(this);
98
-//				})
85
+				$('.export').click(function() {
86
+					stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
87
+					endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
88
+					dcexcel(this);
89
+				});
99 90
 
100
-			})
101
-			//加载表格
102
-			function getTableDataList() {
103
-				layui.use('table', function() {
104
-					var table = layui.table;
105
-					//方法级渲染
106
-					table.render({
107
-						elem: '#t_callTotal',
108
-						url: huayi.config.callcenter_url + "DaysTalkTime/GetDataList",
109
-						method: 'get', //如果无需自定义HTTP类型,可不加该参数
110
-						skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
111
-						even: true, //开启隔行背景
112
-						size: 'lg', //sm,lg尺寸的表格
113
-						where: {
114
-							stime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[0],
115
-							etime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[1],
116
-							usercode: $("#zuoxi option:selected").val(),
117
-							token: token
118
-						}, //如果无需传递额外参数,可不加该参数
119
-						//request: {}, //如果无需自定义请求参数,可不加该参数
120
-						response: {
121
-							statusName: 'state', //数据状态的字段名称,默认:code
122
-							statusCode: 'success', //成功的状态码,默认:0
123
-							msgName: 'message', //状态信息的字段名称,默认:msg
124
-							//countName: 'total', //数据总数的字段名称,默认:count
125
-							//dataName: 'rows', //数据列表的字段名称,默认:data
126
-						}, //如果无需自定义数据响应名称,可不加该参数
127
-						cols: [
128
-							[{
129
-									field: '日期',
130
-									title: '日期',
131
-									align: 'center',
132
-									fixed: true,
133
-									sort: true,
134
-									width: 150,
135
-								}, {
136
-									field: '呼入次数',
137
-									title: '呼入次数',
138
-									align: 'center',
139
-									width: '',
140
-								},
141
-								{
142
-									field: '呼入时长',
143
-									title: '呼入时长',
144
-									align: 'center',
145
-									width: '',
146
-								},
147
-								{
148
-									field: '呼出次数',
149
-									title: '呼出次数',
150
-									align: 'center',
151
-									width: '',
152
-								},
153
-								{
154
-									field: '呼出时长',
155
-									title: '呼出时长',
156
-									align: 'center',
157
-									width: '',
158
-								},
159
-								{
160
-									field: '呼出未接通次数',
161
-									title: '呼出未接通次数',
162
-									align: 'center',
163
-									width: '',
164
-								},
165
-								{
166
-									field: '振铃时长',
167
-									title: '振铃时长',
168
-									align: 'center',
169
-									width: '',
170
-								},
171
-								{
172
-									field: '通话总时长',
173
-									title: '通话总时长',
174
-									align: 'center',
175
-									templet: '<div><span class="color_73926">{{d.通话总时长}}</span></div>',
176
-									width: '',
177
-								},
178
-								{
179
-									field: '平均通话总时长',
180
-									title: '平均通话总时长',
181
-									align: 'center',
182
-									templet: '<div><span class="color_73926">{{d.平均通话总时长}}</span></div>',
183
-									width: '',
184
-								},
185
-							]
186
-						],
91
+			});
187 92
 
188
-						height: 'full-150'
189
-					});
190
-				});
93
+			function dcexcel(obj) {
94
+				var url = huayi.config.callcenter_url + "CallZuoXi/ExptList?token=" + token;
95
+				url += "&stime=" + stime + "&endtime=" + endtime;
96
+				obj.href = url;
191 97
 			}
192 98
 
193
-			//获取坐席
194
-			function bindseat() {
195
-				$.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
196
-					token: token
197
-				}, function(result) {
198
-					if(result.state.toLowerCase() == "success") {
199
-						seatlist = result.data;
200
-						$("#zuoxi").empty();
201
-						$("#zuoxi").append('<option value="">请选择坐席</option>');
202
-						$(seatlist).each(function(i, n) {
203
-							$("#zuoxi").append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
204
-						})
99
+			//加载表格
100
+			function getTableDataList() {
101
+				var colsArr = [];
102
+				var dataArr = [];
103
+				var loadindex;
104
+				//表头
105
+			$.ajax({
106
+				type:"get",
107
+				url:huayi.config.callcenter_url + "CallZuoXi/GetColumnList",
108
+				async:true,
109
+				dataType: 'json',
110
+				beforeSend:function(){
111
+					loadindex = layer.load()
112
+				},
113
+				data: {
114
+						token: token,
115
+					},
116
+					success:function(data){
117
+						if(data.state.toLowerCase() == "success") {
118
+							var res = data.data;
119
+							if(res) {
120
+								var newArr = [];
121
+								if(res && res.length > 0) {
122
+									newArr.push({
123
+										field: res[0],
124
+										title: res[0],
125
+										align: 'center',
126
+										fixed: true, 
127
+										sort: true,
128
+										width: 150,
129
+									});
130
+									for(var i = 1, colNL = res.length; i < colNL; i++){
131
+										newArr.push({
132
+											field: res[i],
133
+											title: res[i],
134
+											align: 'center',
135
+											//fixed: true, 
136
+											//sort: true,
137
+											//width: 150,
138
+										});
139
+									}
140
+//									newArr.push({
141
+//											field: '总计',
142
+//											title: '总计',
143
+//											align: 'center',
144
+//											fixed: 'right', 
145
+//											templet: function(d){
146
+//										        return '<span class="color_73926">'+ d.总计 +'</span>'
147
+//										    },
148
+//											sort: true,
149
+//											//width: 150,
150
+//										});
151
+								}
152
+								colsArr.push(newArr);
153
+							}
154
+						}
205 155
 					}
206
-				});
207
-
208
-			}
156
+			});
157
+				//表格
158
+				$.ajax({
159
+					type: 'get',
160
+					url: huayi.config.callcenter_url + "CallZuoXi/GetDataList",
161
+					async: true,
162
+					dataType: 'json',
163
+					beforeSend:function(){
164
+						loadindex = layer.load()
165
+					},
166
+					data: {
167
+						stime: stime,
168
+						endtime: endtime,
169
+						token: token,
170
+					},
171
+					success: function(data) {
172
+						if(data.state.toLowerCase() == "success") {
173
+							var res = data.data;
174
+							if(res) {
175
+								dataArr = res;
176
+								layui.use('table', function() {
177
+									var table = layui.table;
178
+									//方法级渲染
179
+									table.render({
180
+										elem: '#t_callTotal',
181
+										skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
182
+										even: true, //开启隔行背景
183
+										size: 'lg', //sm,lg尺寸的表格
184
+										cellMinWidth: 100,
185
+										page: true,
186
+										data: dataArr,
187
+										cols: colsArr,
188
+										height: 'full-150'
189
+									});
190
+								});
209 191
 
210
-			function dcexcel(obj) {
211
-				var stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
212
-				var etime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
213
-				var url = huayi.config.callcenter_url + "DaysTalkTime/ExptList?token=" + token;
214
-				url += "&stime=" + stime + "&etime=" + etime + "&usercode=" + $("#zuoxi option:selected").val();
215
-				obj.href = url;
192
+							}
193
+						}
194
+					},
195
+				}).then(function(){layer.close(loadindex);});
216 196
 			}
217 197
 		</script>
198
+
218 199
 	</body>
219 200
 
220 201
 </html>