|
|
@@ -77,6 +77,32 @@
|
|
77
|
77
|
background: #1ab394;
|
|
78
|
78
|
color: #fff;
|
|
79
|
79
|
}
|
|
|
80
|
+ .zxt-table .pageList{
|
|
|
81
|
+ width: 100%;
|
|
|
82
|
+ overflow: hidden;
|
|
|
83
|
+ }
|
|
|
84
|
+ .zxt-table .pageList .pageCon{
|
|
|
85
|
+ display: flex;
|
|
|
86
|
+ float: right;
|
|
|
87
|
+ }
|
|
|
88
|
+ .zxt-table .pageList .pageCon div{
|
|
|
89
|
+ height: 30px;
|
|
|
90
|
+ line-height: 30px;
|
|
|
91
|
+ margin: 8px;
|
|
|
92
|
+ }
|
|
|
93
|
+ .zxt-table .pageList .pageCon div input{
|
|
|
94
|
+ width: 40px;
|
|
|
95
|
+ padding: 0 8px;
|
|
|
96
|
+ text-align: center;
|
|
|
97
|
+ }
|
|
|
98
|
+ .zxt-table .pageList .pageCon div button{
|
|
|
99
|
+ background: #1ab394;
|
|
|
100
|
+ border: none;
|
|
|
101
|
+ color: #FFFFFF;
|
|
|
102
|
+ border-radius: 5px;
|
|
|
103
|
+ font-size: 14px;
|
|
|
104
|
+ }
|
|
|
105
|
+
|
|
80
|
106
|
</style>
|
|
81
|
107
|
</head>
|
|
82
|
108
|
|
|
|
@@ -114,6 +140,16 @@
|
|
114
|
140
|
<tbody class="tbody"></tbody>
|
|
115
|
141
|
|
|
116
|
142
|
</table>
|
|
|
143
|
+ <div class="pageList">
|
|
|
144
|
+ <div class="pageCon">
|
|
|
145
|
+ <div>共<span id="pageTotal">2</span>条</div>
|
|
|
146
|
+ <div>共<span id="pageSize">2</span>页</div>
|
|
|
147
|
+ <div><button id="prePage">上一页</button></div>
|
|
|
148
|
+ <div><input id="pageindex" value="" /></div>
|
|
|
149
|
+ <div><button id="turnPage">跳转</button></div>
|
|
|
150
|
+ <div><button id="nextPage">下一页</button></div>
|
|
|
151
|
+ </div>
|
|
|
152
|
+ </div>
|
|
117
|
153
|
</div>
|
|
118
|
154
|
</div>
|
|
119
|
155
|
</div>
|
|
|
@@ -125,9 +161,12 @@
|
|
125
|
161
|
<script src="./js/select2/js/select2.min.js"></script>
|
|
126
|
162
|
|
|
127
|
163
|
<script>
|
|
|
164
|
+ var stime, endtime, bumen,expor;//开始时间
|
|
|
165
|
+ var token = $.cookie("token");
|
|
|
166
|
+ var content = [];
|
|
|
167
|
+ var pageindex = 1;
|
|
128
|
168
|
$(function() {
|
|
129
|
|
- var token = $.cookie("token");
|
|
130
|
|
- var content = [];
|
|
|
169
|
+
|
|
131
|
170
|
laydate.skin('molv');
|
|
132
|
171
|
//开始时间
|
|
133
|
172
|
laydate({
|
|
|
@@ -143,52 +182,14 @@
|
|
143
|
182
|
istoday: true,
|
|
144
|
183
|
format: 'YYYY-MM-DD', // 分隔符可以任意定义,该例子表示只显示年月
|
|
145
|
184
|
});
|
|
146
|
|
-
|
|
147
|
|
- var stime, //开始时间
|
|
148
|
|
- endtime, //结束时间
|
|
149
|
|
- bumen,
|
|
150
|
|
- expor;
|
|
151
|
185
|
getDepartList($("#bumen"))
|
|
152
|
186
|
tbodyAjax();
|
|
153
|
|
- //点击搜索事件
|
|
154
|
|
- $('.sear').click(function() {
|
|
155
|
|
- $('.zjTable tbody').html('');
|
|
156
|
|
- stime = $('#startTime').val(); //开始时间
|
|
157
|
|
- endtime = $('#endTime').val(); //结束时间
|
|
158
|
|
- bumen = $('#bumen').val(); //部门
|
|
159
|
|
- if(stime != '' && endtime != '') {
|
|
160
|
|
- tbodyAjax(stime, endtime, bumen);
|
|
161
|
|
- }else{
|
|
162
|
|
- tbodyAjax();
|
|
163
|
|
- if(stime==''){
|
|
164
|
|
- alert('请选择开始时间!');
|
|
165
|
|
- }else if(endtime ==''){
|
|
166
|
|
- alert('请选择结束时间!');
|
|
167
|
|
- }
|
|
168
|
|
- }
|
|
169
|
187
|
|
|
170
|
|
- })
|
|
171
|
|
- //导出
|
|
172
|
|
- $('.daochu').click(function() {
|
|
173
|
|
- let sdate = $('#startTime').val()
|
|
174
|
|
- let edate = $('#endTime').val()
|
|
175
|
|
- var url = huayi.config.callcenter_url + "QCResult/ExportToExcelHeBing?token=" + $.cookie("token");
|
|
176
|
|
- url += "&stime=" + sdate + "&endtime=" + edate + "&dpt=" + $('#bumen').val()
|
|
177
|
|
- window.location.href = url;
|
|
178
|
|
- })
|
|
179
|
|
- //导出
|
|
180
|
|
- function dcexcel(obj) {
|
|
181
|
|
- let sdate = $('#startTime').val()
|
|
182
|
|
- let edate = $('#endTime').val()
|
|
183
|
|
- var url = huayi.config.callcenter_url + "QCResult/ExportToExcelHeBing?token=" + $.cookie("token");
|
|
184
|
|
- url += "&stime=" + sdate + "&endtime=" + edate + "&dpt=" + $('#bumen').val()
|
|
185
|
|
- obj.href = url;
|
|
186
|
|
- }
|
|
187
|
188
|
//表头
|
|
188
|
|
- $.ajax({
|
|
|
189
|
+ $.ajax({
|
|
189
|
190
|
type: "get",
|
|
190
|
191
|
dataType: "json",
|
|
191
|
|
- url: huayi.config.callcenter_url+"QCResult/GetColumnList",
|
|
|
192
|
+ url: huayi.config.callcenter_url+"ExportQCResult/GetColumnList",
|
|
192
|
193
|
async: false,
|
|
193
|
194
|
data: {
|
|
194
|
195
|
token:token,
|
|
|
@@ -223,79 +224,95 @@
|
|
223
|
224
|
}
|
|
224
|
225
|
});
|
|
225
|
226
|
|
|
226
|
|
- //表格数据
|
|
227
|
|
- function tbodyAjax(stime, endtime,bumen) {
|
|
228
|
|
- $.ajax({
|
|
229
|
|
- type: "get",
|
|
230
|
|
- dataType: "json",
|
|
231
|
|
- url: huayi.config.callcenter_url+"QCResult/GetDataList",
|
|
232
|
|
- async: true,
|
|
233
|
|
- data: {
|
|
234
|
|
- token:token,
|
|
235
|
|
- stime: stime,
|
|
236
|
|
- endtime: endtime,
|
|
237
|
|
- dpt:bumen,
|
|
238
|
|
- },
|
|
239
|
|
- success: function(result) {
|
|
240
|
|
- var tbodyCon = result.data;
|
|
241
|
|
- var html =""
|
|
242
|
|
- for(var i = 0; i < tbodyCon.length; i++) {
|
|
243
|
|
- html +="<tr>"
|
|
244
|
|
- for(var key in tbodyCon[i]){
|
|
245
|
|
- delete tbodyCon[i].AllScore
|
|
246
|
|
- html += '<td>' + tbodyCon[i][key] + '</td>'
|
|
247
|
|
- }
|
|
248
|
|
- html += "</tr>"
|
|
|
227
|
+
|
|
|
228
|
+ })
|
|
|
229
|
+ //点击搜索事件
|
|
|
230
|
+ $('.sear').click(function() {
|
|
|
231
|
+ pageindex =1
|
|
|
232
|
+ tbodyAjax();
|
|
|
233
|
+ })
|
|
|
234
|
+
|
|
|
235
|
+ $("#prePage").click(function(){
|
|
|
236
|
+ if(pageindex>1){
|
|
|
237
|
+ pageindex --
|
|
|
238
|
+ tbodyAjax();
|
|
|
239
|
+ }
|
|
|
240
|
+ })
|
|
|
241
|
+ $("#turnPage").click(function(){
|
|
|
242
|
+ pageindex = $("#pageindex").val()
|
|
|
243
|
+ tbodyAjax();
|
|
|
244
|
+ })
|
|
|
245
|
+
|
|
|
246
|
+ $("#nextPage").click(function(){
|
|
|
247
|
+
|
|
|
248
|
+ if(pageindex !=$("#pageSize").text()){
|
|
|
249
|
+ pageindex ++
|
|
|
250
|
+ tbodyAjax();
|
|
|
251
|
+ }
|
|
|
252
|
+
|
|
|
253
|
+ })
|
|
|
254
|
+
|
|
|
255
|
+ //导出
|
|
|
256
|
+ $('.daochu').click(function() {
|
|
|
257
|
+ var url = huayi.config.callcenter_url + "ExportQCResult/ExportToExcelHeBing?token=" + $.cookie("token");
|
|
|
258
|
+ url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val() + "&dpt=" + $('#bumen').val()
|
|
|
259
|
+ window.location.href = url;
|
|
|
260
|
+ })
|
|
|
261
|
+
|
|
|
262
|
+ //表格数据
|
|
|
263
|
+ function tbodyAjax() {
|
|
|
264
|
+
|
|
|
265
|
+ $.ajax({
|
|
|
266
|
+ type: "get",
|
|
|
267
|
+ dataType: "json",
|
|
|
268
|
+ url: huayi.config.callcenter_url+"ExportQCResult/GetDataList",
|
|
|
269
|
+ async: true,
|
|
|
270
|
+ data: {
|
|
|
271
|
+ token:token,
|
|
|
272
|
+ stime: $('#startTime').val(),
|
|
|
273
|
+ pageindex:pageindex,
|
|
|
274
|
+ pagesize:10,
|
|
|
275
|
+ endtime: $('#endTime').val(),
|
|
|
276
|
+ dpt:$('#bumen').val(),
|
|
|
277
|
+ },
|
|
|
278
|
+ success: function(result) {
|
|
|
279
|
+ var tbodyCon = result.rows;
|
|
|
280
|
+
|
|
|
281
|
+ $("#pageSize").text(Math.ceil(result.total/10))
|
|
|
282
|
+ $("#pageindex").val(pageindex)
|
|
|
283
|
+ $("#pageTotal").text(result.total)
|
|
|
284
|
+ $('.zjTable tbody').html('');
|
|
|
285
|
+ var html =""
|
|
|
286
|
+ for(var i = 0; i < tbodyCon.length; i++) {
|
|
|
287
|
+ html +="<tr>"
|
|
|
288
|
+ for(var key in tbodyCon[i]){
|
|
|
289
|
+ delete tbodyCon[i].AllScore
|
|
|
290
|
+ html += '<td>' + tbodyCon[i][key] + '</td>'
|
|
249
|
291
|
}
|
|
250
|
|
- $(html).appendTo('.zjTable tbody')
|
|
251
|
|
-
|
|
|
292
|
+ html += "</tr>"
|
|
252
|
293
|
}
|
|
253
|
|
- });
|
|
254
|
|
-
|
|
255
|
|
- }
|
|
|
294
|
+ $(html).appendTo('.zjTable tbody')
|
|
|
295
|
+
|
|
|
296
|
+ }
|
|
|
297
|
+ });
|
|
256
|
298
|
|
|
257
|
|
- //部门下拉框
|
|
258
|
|
- //营业部
|
|
259
|
|
- function getDepartList(obj) {
|
|
260
|
|
- obj.empty();
|
|
261
|
|
- let str = '<option value="">请选择</option>'
|
|
262
|
|
- $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
|
|
263
|
|
- "token": $.cookie("token")
|
|
264
|
|
- }, function(result) {
|
|
265
|
|
- if(result.state.toLowerCase() == "success") {
|
|
266
|
|
- result.data.forEach(function(v, n) {
|
|
267
|
|
- str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
|
|
268
|
|
- })
|
|
269
|
|
- obj.html(str)
|
|
270
|
|
- }
|
|
271
|
|
- })
|
|
272
|
|
- }
|
|
273
|
|
- // $("#bumen").select2({
|
|
274
|
|
- // width: 'resolve' ,
|
|
275
|
|
- // minimumResultsForSearch: -1,
|
|
276
|
|
- // ajax:{
|
|
277
|
|
- // type:"get",
|
|
278
|
|
- // url:huayi.config.callcenter_url+"Department/GetDeptList",
|
|
279
|
|
- // async:true,
|
|
280
|
|
- // dataType: "json",
|
|
281
|
|
- // data:function(params){
|
|
282
|
|
- // return{
|
|
283
|
|
- // token:token,
|
|
284
|
|
- // pid:params.id
|
|
285
|
|
- // }
|
|
286
|
|
- // },
|
|
287
|
|
- // processResults:function(data){
|
|
288
|
|
-
|
|
289
|
|
- // return{
|
|
290
|
|
- // results:data.data
|
|
291
|
|
- // }
|
|
292
|
|
- // },
|
|
293
|
|
- // cache: true
|
|
294
|
|
- // },
|
|
295
|
|
- // placeholder: "请选择",
|
|
|
299
|
+ }
|
|
296
|
300
|
|
|
297
|
|
- // });
|
|
298
|
|
- })
|
|
|
301
|
+ //部门下拉框
|
|
|
302
|
+ function getDepartList(obj) {
|
|
|
303
|
+ obj.empty();
|
|
|
304
|
+ let str = '<option value="">请选择</option>'
|
|
|
305
|
+ $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
|
|
|
306
|
+ "token": $.cookie("token")
|
|
|
307
|
+ }, function(result) {
|
|
|
308
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
309
|
+ result.data.forEach(function(v, n) {
|
|
|
310
|
+ str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
|
|
|
311
|
+ })
|
|
|
312
|
+ obj.html(str)
|
|
|
313
|
+ }
|
|
|
314
|
+ })
|
|
|
315
|
+ }
|
|
299
|
316
|
</script>
|
|
300
|
317
|
</body>
|
|
301
|
318
|
|