浏览代码

点击外呼结果查询自定义列-列表

yuqian 8 年之前
父节点
当前提交
c8378a56ba
共有 1 个文件被更改,包括 45 次插入29 次删除
  1. 45 29
      CallCenterWeb.UI/clickcall/phoneresultlist.html

+ 45 - 29
CallCenterWeb.UI/clickcall/phoneresultlist.html

@@ -220,7 +220,7 @@
220 220
             </div>
221 221
             <div class="anniu" style="margin: 20px 0;">
222 222
                 <button class="btns search"><i class="fa fa-search"></i>查询</button>
223
-                <!--<button class="btns"><i class="fa fa-sign-in"></i>导出</button>-->
223
+                <button class="btns"><i class="fa fa-sign-in"></i>导出</button>
224 224
             </div>
225 225
             <table class="layui-hide" id="table1"></table>
226 226
         </div>
@@ -293,8 +293,11 @@
293 293
         function initTable() {
294 294
             var colsData = [];
295 295
             var arrData = [];
296
+            var theadData;
297
+            var theadDataLength;
298
+            //加载头部
296 299
             $.ajax({
297
-                url: huayi.config.callcenter_url + 'CallPlan/GetPhoneResult',
300
+                url: huayi.config.callcenter_url + 'CallPlan/GetPhoneResultHead',
298 301
                 type: 'get',
299 302
                 data: {
300 303
                     id: $('.taskselect').val(),
@@ -314,59 +317,72 @@
314 317
                 success: function (returnValue) {
315 318
                     //异步获取数据
316 319
                     if (returnValue.data) {
317
-                        var theadData = returnValue.data.headlist,
318
-						theadDataLength = theadData.length,
319
-						resultData1 = returnValue.data.datalist,
320
-						resultData1Length = resultData1.length;
321
-                        recordCount = returnValue.data.recordcount;
320
+                        theadData = returnValue.data.headlist,
321
+						theadDataLength = theadData.length;
322
+
322 323
                         //加载头部
323 324
 
324 325
                         for (var i = 0; i < theadDataLength; i++) {
325 326
                             var obj1 = {};
326 327
                             obj1['field'] = 'items' + i;
327 328
                             obj1['title'] = theadData[i];
329
+                            //obj1['width'] = 80;
328 330
                             colsData.push(obj1);
329 331
                         }
330
-                        //console.log(colsData);
331
-                        for (var x = 0; x < resultData1Length; x++) {
332
-                            var temData = resultData1[x],
333
-								temLength = resultData1[x].length,
334
-								obj = {};
335
-                            for (var y = 0; y < temLength; y++) {
336
-                                obj['items' + y + ''] = temData[y];
337
-                            }
338
-                            arrData.push(obj);
339
-                        }
340
-                        //console.log(arrData);
341
-                        //debugger;
342
-
343 332
 
333
+                        //加载表格数据
344 334
                         layui.use('table', function () {
345 335
                             var table = layui.table;
346 336
                             var laypage = layui.laypage;
347 337
                             //展示已知数据
348 338
                             table.render({
339
+                                url: huayi.config.callcenter_url + 'CallPlan/GetPhoneResult',
340
+
341
+                                where: {
342
+                                    id: $('.taskselect').val(),
343
+                                    //id: 14,
344
+                                    phone: $(".phone").val(),
345
+                                    fpstate: $(".allotselect").val(),
346
+                                    hcstate: $(".callselect").val(),
347
+                                    yjstate: $(".connectselect").val(),
348
+                                    userid: $(".agentselect").val(),
349
+                                    requesttype: 3,
350
+                                    yhfkid: $(".yhfkselect").val(),
351
+                                    hjjgid: $(".hjjgselect").val(),
352
+                                    token: token,
353
+                                }, //如果无需传递额外参数,可不加该参数
349 354
                                 elem: '#table1',
350 355
                                 cols: [colsData],
351
-                                data: arrData,
356
+                                //data: arrData,
352 357
                                 //skin: 'line', //表格风格
353 358
                                 even: true,
354
-                                page: true //是否显示分页
355
-                                , limits: [20]
356
-                                , limit: 20 //每页默认显示的数量
357
-                                , curr: 1
358
-
359
+                                page: true, //是否显示分页
360
+                                limits: [10, 20],
361
+                                limit: 20, //每页默认显示的数量
362
+                                request: {
363
+                                    pageName: 'pageindex', //页码的参数名称,默认:page
364
+                                    limitName: 'pagesize' //每页数据量的参数名,默认:limit
365
+                                },
366
+                                response: {
367
+                                    countName: 'total', //数据总数的字段名称,默认:count
368
+                                    dataName: 'rows' //数据列表的字段名称,默认:data
369
+                                },
370
+
371
+                                done: function (res, curr, count) {
372
+                                }
359 373
                             });
360 374
 
361
-                            laypage.render({
362
-                                count: recordCount
363
-                            });
375
+
364 376
                         });
377
+
378
+
365 379
                     } else {
366 380
                         //console.log(returnValue.message);
367 381
                     }
368 382
                 },
369 383
             });
384
+
385
+
370 386
         }
371 387
     </script>
372 388
 </body>