优化导出2

master
chenzhi 5 years ago
parent c5dc3b4f22
commit e414013f8b

@ -73,6 +73,7 @@ class FinancePromoteController extends AdminController
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
$v['promote_account'] = get_promote_name($v['p_id']);
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
$count['cash_count'] += $v['cash_count'];
$count['balance_coin_count'] += $v['balance_coin_count'];
@ -82,6 +83,17 @@ class FinancePromoteController extends AdminController
$data[] = $v;
}
$data = my_sort($data, $data_order_type, (int)$data_order);
if(isset($_REQUEST['export'])){
data2csv($data,'公会统计',array(
"company_name"=>"推广公司",
"promote_account"=>"会长渠道",
"cash_count"=>"游戏现金金额",
"balance_coin_count"=>"平台币直充支出",
"bind_coin_count"=>"内充支出",
"inside_cash_count"=>"平台币内充",
"allcount"=>"渠道游戏内充值合计"
));die();
}
$this->assign('list_data', $data);
$this->assign('all_count', $count);
$this->meta_title = '公会统计';

@ -203,7 +203,7 @@
<volist name="list_data" id="data">
<tr>
<td>{$data.company_name}</td>
<td>{:get_promote_name($data['p_id'])}</td>
<td>{$data['promote_account']}</td>
<td>{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">

Loading…
Cancel
Save