diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index 91c917c3c..4423d2a57 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; }); //搜索功能