From 199b5e0f51837dad4ce2066be874c7fed8813762 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 28 Jan 2021 17:05:10 +0800 Subject: [PATCH] =?UTF-8?q?1.28=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SocietyInfoController.class.php | 1 + Application/Admin/View/SocietyInfo/lists.html | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index bb2d5162b..0cfd4ac65 100644 --- a/Application/Admin/Controller/SocietyInfoController.class.php +++ b/Application/Admin/Controller/SocietyInfoController.class.php @@ -75,6 +75,7 @@ class SocietyInfoController extends ThinkController $query = $model->where($map)->order("communication_time desc"); $count = $query->count(); if($is_export){ + $map['id'] = ['in',$_REQUEST['ids']]; $parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account") ->where($map) ->order("communication_time desc") diff --git a/Application/Admin/View/SocietyInfo/lists.html b/Application/Admin/View/SocietyInfo/lists.html index 3b74c4941..29495cd47 100644 --- a/Application/Admin/View/SocietyInfo/lists.html +++ b/Application/Admin/View/SocietyInfo/lists.html @@ -107,7 +107,7 @@
- 导出 + 导出
@@ -451,7 +451,16 @@ $("#downloadexcel").on("click",function(){ var url = $(this).attr("url"); - window.location.href = url; + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + return $(elem).val(); + }).get(); + + if(text.length < 1){ + layer.msg("" + '没有选择需要导出的数据' + ""); + return; + } + + window.location.href = url+"/ids/"+text; }); //搜索功能