新增基础信息导出

master
chenzhi 2 years ago
parent a35dcbf604
commit fb68a757b4

@ -36,7 +36,7 @@ class PromoteCompanyController extends ThinkController
$model = M($this->modelName, 'tab_');
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
if (isset($_REQUEST['export']) && ($_REQUEST['export']==1 || $_REQUEST['export']==2)){
$is_export = true;
$this->getAggregatePackage();
}
@ -139,6 +139,22 @@ class PromoteCompanyController extends ThinkController
->order("last_up_time desc");
if($is_export){
$companyres = $companyres->select();
if ($_REQUEST['export']==2){
foreach ($companyres as $key => &$v) {
$v['bank_card'] = "`".$v['bank_card'];
$v['ali_account'] = "`".$v['ali_account'];
}
//基础信息导出
data2csv($companyres,'下游推广公司基础信息导出',array(
"company_name"=>"推广公司名称",
"bank_name"=>"银行名称",
"bank_address"=>"账户名",
"bank_card"=>"银行卡号",
"ali_user"=>"支付宝真实名称",
"ali_account"=>"支付宝登陆账号",
"wx_account"=>"微信账号"
));
}
}else{
$companyres = $companyres->page($page,$row)->select();
}

@ -162,6 +162,9 @@
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出excel</a>
</div>
<div class="input-list">
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>2],I('get.')))}" style="width: auto;padding-left: 10px;padding-right: 10px;" url="">银行信息导出</a>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save