|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html>
|
|
|
3
|
+
|
|
|
4
|
+ <head>
|
|
|
5
|
+
|
|
|
6
|
+ <meta charset="utf-8">
|
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
8
|
+
|
|
|
9
|
+ <title>业务数据报表</title>
|
|
|
10
|
+ <!--[if lt IE 9]>
|
|
|
11
|
+ <meta http-equiv="refresh" content="0;ie.html" />
|
|
|
12
|
+ <![endif]-->
|
|
|
13
|
+ <script src="../Script/Common/huayi.load.js"></script>
|
|
|
14
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
15
|
+ <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
|
|
|
16
|
+ <link rel="stylesheet" href="../js/layui/css/layui.css" />
|
|
|
17
|
+ <link rel="stylesheet" href="../css/init.css" />
|
|
|
18
|
+ <style>
|
|
|
19
|
+ .zxt-top {
|
|
|
20
|
+ background: #f3f3f4;
|
|
|
21
|
+ height: 60px;
|
|
|
22
|
+ padding: 10px 20px;
|
|
|
23
|
+ }
|
|
|
24
|
+
|
|
|
25
|
+ .topCon {
|
|
|
26
|
+ float: right;
|
|
|
27
|
+ margin-right: 45px;
|
|
|
28
|
+ }
|
|
|
29
|
+
|
|
|
30
|
+ .zxt-content {
|
|
|
31
|
+ width: 90%;
|
|
|
32
|
+ margin: 20px auto 0 auto;
|
|
|
33
|
+ }
|
|
|
34
|
+ .select2-container--default .select2-selection--single{
|
|
|
35
|
+ border-color: #e5e6e7;
|
|
|
36
|
+ }
|
|
|
37
|
+ </style>
|
|
|
38
|
+ </head>
|
|
|
39
|
+
|
|
|
40
|
+ <body class="gray-bg" style="background: #fefefe;">
|
|
|
41
|
+ <div class="zxtable">
|
|
|
42
|
+ <div class="daoHang clearfix">
|
|
|
43
|
+ <div class="dhLeft">
|
|
|
44
|
+ <sapn><i class="syIcon"></i>位置:
|
|
|
45
|
+ <a id="ReIndex" href="javaScript:;">首页</a>>
|
|
|
46
|
+ <a href="javaScript:;">报表分析</a>>
|
|
|
47
|
+ <a href="javaScript:;">业务数据分析</a>>
|
|
|
48
|
+ <a href="" class="nowPosition">业务数据报表</a>
|
|
|
49
|
+ </sapn>
|
|
|
50
|
+ </div>
|
|
|
51
|
+ <div class="dhRight">
|
|
|
52
|
+ <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
|
|
|
53
|
+ </div>
|
|
|
54
|
+ </div>
|
|
|
55
|
+ <div class="zxt-top clearfix">
|
|
|
56
|
+ <div class="topCon">
|
|
|
57
|
+ <div class="form-inline th-bar clearfix">
|
|
|
58
|
+ <div class="time-box form-group">
|
|
|
59
|
+ <i class="tub fa fa-calendar"></i>
|
|
|
60
|
+ <input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
|
|
|
61
|
+ </div>
|
|
|
62
|
+ <div class="time-box form-group">
|
|
|
63
|
+ 部门:
|
|
|
64
|
+ <select id="bumen">
|
|
|
65
|
+ <option value="">请选择</option>
|
|
|
66
|
+ </select>
|
|
|
67
|
+ </div>
|
|
|
68
|
+ <div class="form-group tool_bars pull-right">
|
|
|
69
|
+ <button class="btns sear">搜索</button>
|
|
|
70
|
+ <a class="btns export">导出</a>
|
|
|
71
|
+ </div>
|
|
|
72
|
+ </div>
|
|
|
73
|
+ </div>
|
|
|
74
|
+ </div>
|
|
|
75
|
+
|
|
|
76
|
+ <div class="zxt-content">
|
|
|
77
|
+ <table class="layui-hide" id="t_callTotal"></table>
|
|
|
78
|
+ </div>
|
|
|
79
|
+ </div>
|
|
|
80
|
+
|
|
|
81
|
+ <script src="../js/layui/layui.js"></script>
|
|
|
82
|
+ <script src="../js/select2/js/select2.min.js"></script>
|
|
|
83
|
+
|
|
|
84
|
+ <script>
|
|
|
85
|
+ var token = $.cookie("token");
|
|
|
86
|
+ var stime = ''; //开始时间
|
|
|
87
|
+ var endtime = ''; //结束时间
|
|
|
88
|
+ var dpt = ''; //部门
|
|
|
89
|
+ $(function() {
|
|
|
90
|
+ var regNum = /^[0-9]+$/;
|
|
|
91
|
+ layui.use('laydate', function() {
|
|
|
92
|
+ var laydate = layui.laydate;
|
|
|
93
|
+ //日期
|
|
|
94
|
+ laydate.render({
|
|
|
95
|
+ elem: '#startTime',
|
|
|
96
|
+ range: '~',
|
|
|
97
|
+ theme: '#1ab394',
|
|
|
98
|
+ calendar: 'true'
|
|
|
99
|
+ });
|
|
|
100
|
+ });
|
|
|
101
|
+ getDept(); //获取部门下拉
|
|
|
102
|
+ getTableDataList(); //获取表格数据
|
|
|
103
|
+ //搜索事件
|
|
|
104
|
+ $(".sear").click(function() {
|
|
|
105
|
+ dpt = $('#bumen').val();
|
|
|
106
|
+ dpt = dpt === null ? '' : dpt;
|
|
|
107
|
+ stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
|
|
|
108
|
+ endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
|
|
|
109
|
+ getTableDataList(); //获取表格数据
|
|
|
110
|
+ });
|
|
|
111
|
+ //导出
|
|
|
112
|
+ $('.export').click(function() {
|
|
|
113
|
+ dpt = $('#bumen').val();
|
|
|
114
|
+ dpt = dpt === null ? '' : dpt;
|
|
|
115
|
+ stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
|
|
|
116
|
+ endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
|
|
|
117
|
+ dcexcel(this);
|
|
|
118
|
+ });
|
|
|
119
|
+
|
|
|
120
|
+ });
|
|
|
121
|
+
|
|
|
122
|
+ function dcexcel(obj) {
|
|
|
123
|
+ var url = huayi.config.callcenter_url + "WOReport/ExptList?token=" + token;
|
|
|
124
|
+ url += "&stime=" + stime + "&endtime=" + endtime + "&dpt=" + dpt;
|
|
|
125
|
+ obj.href = url;
|
|
|
126
|
+ }
|
|
|
127
|
+ //加载表格
|
|
|
128
|
+ function getTableDataList() {
|
|
|
129
|
+ layui.use('table', function() {
|
|
|
130
|
+ var table = layui.table;
|
|
|
131
|
+ //方法级渲染
|
|
|
132
|
+ table.render({
|
|
|
133
|
+ elem: '#t_callTotal',
|
|
|
134
|
+ url: huayi.config.callcenter_url + "WOReport/GetDataList",
|
|
|
135
|
+ method: 'get', //如果无需自定义HTTP类型,可不加该参数
|
|
|
136
|
+ skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
|
|
|
137
|
+ even: true, //开启隔行背景
|
|
|
138
|
+ size: 'md', //sm,lg,md尺寸的表格
|
|
|
139
|
+ cellMinWidth: 160,
|
|
|
140
|
+ where: {
|
|
|
141
|
+ stime: stime, // 开始时间
|
|
|
142
|
+ endtime: endtime, // 结束时间
|
|
|
143
|
+ dpt: dpt, // 部门id
|
|
|
144
|
+ token: token
|
|
|
145
|
+ }, //如果无需传递额外参数,可不加该参数
|
|
|
146
|
+ //request: {}, //如果无需自定义请求参数,可不加该参数
|
|
|
147
|
+ response: {
|
|
|
148
|
+ statusName: 'state', //数据状态的字段名称,默认:code
|
|
|
149
|
+ statusCode: 'success', //成功的状态码,默认:0
|
|
|
150
|
+ msgName: 'message', //状态信息的字段名称,默认:msg
|
|
|
151
|
+ //countName: 'total', //数据总数的字段名称,默认:count
|
|
|
152
|
+ //dataName: 'rows', //数据列表的字段名称,默认:data
|
|
|
153
|
+ }, //如果无需自定义数据响应名称,可不加该参数
|
|
|
154
|
+ cols: [
|
|
|
155
|
+ [{
|
|
|
156
|
+ field: '部门',
|
|
|
157
|
+ title: '部门',
|
|
|
158
|
+ align: 'center',
|
|
|
159
|
+ fixed: true,
|
|
|
160
|
+ //sort: true,
|
|
|
161
|
+ width: 150,
|
|
|
162
|
+ }, {
|
|
|
163
|
+ field: '工号',
|
|
|
164
|
+ title: '工号',
|
|
|
165
|
+ align: 'center',
|
|
|
166
|
+ width: '',
|
|
|
167
|
+ },
|
|
|
168
|
+ {
|
|
|
169
|
+ field: '姓名',
|
|
|
170
|
+ title: '姓名',
|
|
|
171
|
+ align: 'center',
|
|
|
172
|
+ width: '',
|
|
|
173
|
+ },
|
|
|
174
|
+ {
|
|
|
175
|
+ field: '建单量',
|
|
|
176
|
+ title: '建单量',
|
|
|
177
|
+ align: 'center',
|
|
|
178
|
+ width: '',
|
|
|
179
|
+ },
|
|
|
180
|
+ {
|
|
|
181
|
+ field: '接单量',
|
|
|
182
|
+ title: '接单量',
|
|
|
183
|
+ align: 'center',
|
|
|
184
|
+ width: '',
|
|
|
185
|
+ },
|
|
|
186
|
+ {
|
|
|
187
|
+ field: '未处理量',
|
|
|
188
|
+ title: '未处理量',
|
|
|
189
|
+ align: 'center',
|
|
|
190
|
+ width: '',
|
|
|
191
|
+ },
|
|
|
192
|
+ {
|
|
|
193
|
+ field: '异常量',
|
|
|
194
|
+ title: '异常量',
|
|
|
195
|
+ align: 'center',
|
|
|
196
|
+ width: '',
|
|
|
197
|
+ },
|
|
|
198
|
+ {
|
|
|
199
|
+ field: '已处理量',
|
|
|
200
|
+ title: '已处理量',
|
|
|
201
|
+ align: 'center',
|
|
|
202
|
+ width: '',
|
|
|
203
|
+ }
|
|
|
204
|
+ // {
|
|
|
205
|
+ // field: '平均通话总时长',
|
|
|
206
|
+ // title: '平均通话总时长',
|
|
|
207
|
+ // align: 'center',
|
|
|
208
|
+ // templet: '<div><span class="color_73926">{{d.平均通话总时长}}</span></div>',
|
|
|
209
|
+ // width: '',
|
|
|
210
|
+ // },
|
|
|
211
|
+ ]
|
|
|
212
|
+ ],
|
|
|
213
|
+
|
|
|
214
|
+ //height: 'full-150'
|
|
|
215
|
+ });
|
|
|
216
|
+ });
|
|
|
217
|
+ }
|
|
|
218
|
+
|
|
|
219
|
+ function getDept() {
|
|
|
220
|
+ //部门下拉数据
|
|
|
221
|
+ $("#bumen").select2({
|
|
|
222
|
+ width: 'resolve',
|
|
|
223
|
+ minimumResultsForSearch: -1,
|
|
|
224
|
+ ajax: {
|
|
|
225
|
+ type: "get",
|
|
|
226
|
+ url: huayi.config.callcenter_url + "Department/GetDeptList",
|
|
|
227
|
+ async: true,
|
|
|
228
|
+ dataType: "json",
|
|
|
229
|
+ data: function(params) {
|
|
|
230
|
+ return {
|
|
|
231
|
+ token: token,
|
|
|
232
|
+ pid: params.id
|
|
|
233
|
+ }
|
|
|
234
|
+ },
|
|
|
235
|
+ processResults: function(data) {
|
|
|
236
|
+
|
|
|
237
|
+ return {
|
|
|
238
|
+ results: data.data
|
|
|
239
|
+ }
|
|
|
240
|
+ },
|
|
|
241
|
+ cache: true
|
|
|
242
|
+ },
|
|
|
243
|
+ placeholder: "请选择",
|
|
|
244
|
+
|
|
|
245
|
+ });
|
|
|
246
|
+ }
|
|
|
247
|
+
|
|
|
248
|
+ </script>
|
|
|
249
|
+ </body>
|
|
|
250
|
+
|
|
|
251
|
+</html>
|