From 6abb245f57df470849d2609d0dd37e42c3dbcdf1 Mon Sep 17 00:00:00 2001 From: hdm Date: Thu, 29 Dec 2022 22:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/customer/view/contact/index.html | 19 ++++++++++++++++++- app/customer/view/grade/index.html | 1 + app/customer/view/index/index.html | 15 ++++++++++++++- app/customer/view/index/rush.html | 1 + app/customer/view/index/sea.html | 3 ++- app/customer/view/index/trash.html | 3 ++- app/customer/view/source/index.html | 1 + 7 files changed, 39 insertions(+), 4 deletions(-) diff --git a/app/customer/view/contact/index.html b/app/customer/view/contact/index.html index 9a81e78..c2cab0d 100644 --- a/app/customer/view/contact/index.html +++ b/app/customer/view/contact/index.html @@ -2,7 +2,7 @@ {block name="body"}
-
+
@@ -22,6 +22,7 @@ layui.pageTable = table.render({ elem: '#test' ,toolbar: '#toolbarDemo' + ,defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}] ,title:'联系人列表' ,url: "/customer/contact/index" ,cellMinWidth: 240 @@ -91,6 +92,22 @@ } }); + //表头工具栏事件 + table.on('toolbar(test)', function(obj){ + if(obj.event === 'LAYTABLE_EXCEL'){ + var formSelect = form.val('barsearchform'); + formSelect.limit=99999; + $.ajax({ + url: '/customer/contact/index', + data: formSelect, + success:function(res){ + table.exportFile('test', res.data,'xls'); + } + }); + return; + } + }) + //监听搜索提交 form.on('submit(webform)', function(data) { layui.pageTable.reload({ diff --git a/app/customer/view/grade/index.html b/app/customer/view/grade/index.html index 372ef82..b0cd466 100644 --- a/app/customer/view/grade/index.html +++ b/app/customer/view/grade/index.html @@ -21,6 +21,7 @@ layui.pageTable = table.render({ elem: '#test' ,toolbar: '#toolbarDemo' + ,defaultToolbar: false ,title:'客户等级列表' ,url: "/customer/grade/index" ,page: false diff --git a/app/customer/view/index/index.html b/app/customer/view/index/index.html index aeee98c..a5eae7c 100644 --- a/app/customer/view/index/index.html +++ b/app/customer/view/index/index.html @@ -12,7 +12,7 @@
- +