优化下游导出

master
chenzhi 4 years ago
parent 8ac604be33
commit d91d8346b9

@ -70,9 +70,26 @@ class PromoteCompanyController extends ThinkController
foreach($companyres as $k=>&$v){
$tmpr = D("CompanyRelation")->getCompanyRelation(2,$v['id']);
$v["settlement_type"] = $tmpr['settlement_type'];
$v["collection"] = $tmpr['collection'];
$v["invoice_type"] = $tmpr['invoice_type'];
$v["invoice_content"] = $tmpr['invoice_content'];
$v["company_belong"] = getCompanyBlong($v["company_belong"]);
$v["develop_type"] = getCompanyRelation($v["develop_type"]);
$v['company_type'] = $v['company_type'] == 2 ? '个人' : '公司';
$v['is_sign_contract'] = $v['is_sign_contract'] ? '是' : '否';
$contract_start_time = $v['company_info']['contact_begin'] ?
time_format($v['company_info']['contact_begin'], 'Y/m/d') : '-';
$contract_end_time = $v['company_info']['contact_end'] ?
time_format($v['company_info']['contact_end'], 'Y/m/d') : '-';
$v['contract_time'] = $contract_start_time . '-' . $contract_end_time;
$validity_start_time = $v['company_info']['validity_start_time'] ?
time_format($v['company_info']['validity_start_time'], 'Y/m/d') : '-';
$validity_end_time = $v['company_info']['validity_end_time'] ?
time_format($v['company_info']['validity_end_time'], 'Y/m/d') : '-';
$v['validity_time'] = $validity_start_time . '-' . $validity_end_time;
//遍历获取游戏信息
if(empty($v["game_ids"])){
$game = $this->getPromoteGameRadio($v["id"],false);
@ -88,6 +105,7 @@ class PromoteCompanyController extends ThinkController
$count = count($companycount);
$companyallids = implode(',', array_column($companycount, 'id'));
$promotemap['company_id']=["in",$companyallids];
$promotemap['level']=1;
$promotecount = M("Promote","tab_")->where($promotemap)->count();
// dd($companyres);
$this->assign('listData', $companyres);

@ -25,11 +25,11 @@
</style>
<body>
<!-- <div style="margin:auto;font-size: 20px;color: red;line-height: 3;padding: 20px;">
<div style="margin:auto;font-size: 16px;color: red;line-height: 3;padding: 20px;">
导出进行中。。。<br />
如果导出成功你也可以手动关闭此页面
</div> -->
<table border="1" id="exporttable" style="opacity: 1;">
</div>
<table border="1" id="exporttable" style="opacity: 0;">
<!-- 表头 -->
<thead>
<tr>
@ -43,11 +43,36 @@
<th>市场专员</th>
<th>押金</th>
<th>押金金额</th>
<th>押金状态</th>
<th>原包名</th>
<th>现包名</th>
<th>产品类型</th>
<th colspan="2">推广分成比例</th>
<th colspan="2">CP分成比例</th>
<th>户名</th>
<th>银行账号</th>
<th>开户行</th>
<th>是否收款方</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
<th>是否签署合同</th>
<th>合同期限</th>
<th>生效时间</th>
<th>开票税点</th>
<th>发票类型</th>
<th>税费费率</th>
<th>渠道费率</th>
<th>注册地址</th>
<th>注册电话</th>
<th>联系人</th>
<th>联系电话</th>
<th>联系地址</th>
</tr>
</thead>
@ -68,10 +93,12 @@
<td rowspan="{$data.row}">{$data.settlement_type}</td>
<notempty name="data.list">
<td rowspan="{$data['list'][0]['row']}">{$data['list'][0]['account']|default="--"}</td>
<td rowspan="{$data['list'][0]['row']}">
{$data['list'][0]['market_admin_username']|default="--"}</td>
<td rowspan="{$data['list'][0]['row']}">{$data['list'][0]['market_admin_username']|default="--"}</td>
<td rowspan="{$data['list'][0]['row']}">{$data['list'][0]['pay_type']|default="--"}</td>
<td rowspan="{$data['list'][0]['row']}">{$data['list'][0]['amount']|default="--"}</td>
<td rowspan="{$data['list'][0]['row']}">{$data['list'][0]['status']|default="--"}</td>
<notempty name="data['list'][0]['list']">
<td rowspan="{$data['list'][0]['list'][0]['row']}">
{$data['list'][0]['list'][0]['original_package_name']|default="--"}</td>
@ -110,7 +137,30 @@
<td>--</td>
<td>--</td>
<td>--</td>
<td>--</td>
<td>--</td>
</notempty>
<td rowspan="{$data.row}">{$data.bank_address|default="--"}</td>
<td rowspan="{$data.row}">&nbsp;{$data.bank_card|default="--"}</td>
<td rowspan="{$data.row}">{$data.bank_name|default="--"}</td>
<td rowspan="{$data.row}">{$data.collection|default="--"}</td>
<td rowspan="{$data.row}">{$data.ali_user|default="--"}</td>
<td rowspan="{$data.row}">{$data.ali_account|default="--"}</td>
<td rowspan="{$data.row}">{$data.is_sign_contract|default="--"}</td>
<td rowspan="{$data.row}">{$data.contract_time|default="--"}</td>
<td rowspan="{$data.row}">{$data.validity_time|default="--"}</td>
<td rowspan="{$data.row}">{$data.fax_ratio|showPercent}</td>
<td rowspan="{$data.row}">{$data.invoice_type|default="--"}</td>
<td rowspan="{$data.row}">{$data.taxation_rate|showPercent}</td>
<td rowspan="{$data.row}">{$data.channel_rate|showPercent}</td>
<td rowspan="{$data.row}">{$data.reg_address|default="--"}</td>
<td rowspan="{$data.row}">{$data.reg_phon|default="--"}</td>
<td rowspan="{$data.row}">{$data.settlement_contact|default="--"}</td>
<td rowspan="{$data.row}">{$data.contact_phone|default="--"}</td>
<td rowspan="{$data.row}">{$data.address|default="--"}</td>
</tr>
<if condition="$data['list'][0]['list'][0]['row'] gt 1">
@ -176,10 +226,12 @@
<if condition="$promotekey gt 0">
<tr>
<td rowspan="{$promote['row']}">{$promote['account']|default="--"}</td>
<td rowspan="{$promote['row']}">{$promote['market_admin_username']|default="--"}
</td>
<td rowspan="{$promote['row']}">{$promote['market_admin_username']|default="--"}</td>
<td rowspan="{$promote['row']}">{$promote['pay_type']|default="--"}</td>
<td rowspan="{$promote['row']}">{$promote['amount']|default="--"}</td>
<td rowspan="{$promote['row']}">{$promote['status']|default="--"}</td>
<notempty name="promote['list']">
<td rowspan="{$promote['list']['row']}">
{$promote['list']['original_package_name']|default="--"}</td>
@ -215,7 +267,7 @@
</volist>
<tr class="data_summary">
<td style="text-align: center;" colspan="3">汇总:</td>
<td colspan="16">
<td colspan="33">
累计推广公司数量:{$count}&#12288;&#12288;会长数量:{$promotecount}
</td>
</tr>
@ -229,7 +281,6 @@
filename: "推广公司.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
//搜索功能
$("#search").click(function () {
console.log(222);

@ -205,7 +205,7 @@
<if condition="$gamekey gt 0">
<tr>
<td>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|default="--"}%</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
@ -237,7 +237,7 @@
<if condition="$gamekey gt 0">
<tr>
<td artt= '2'>{$game_ratio['name']|default="--"}</td>
<td>{$game_ratio['ratio']|default="--"}%</td>
<td>{$game_ratio['ratio']|showPercent}</td>
</tr>
</if>
</foreach>
@ -392,14 +392,18 @@
});
$("#downloadexcel").on("click",function(){
var url = $(this).attr("url");
var title = '推广公司导出';
var title = '推广公司导出,请耐心等待数据处理....';
var index = layer.load(2);
layer.open({
type: 2,
title: title,
shadeClose: true,
shade: 0.8,
area: ['40%', '60%'],
content: url
area: ['40%', '30%'],
content: url,
success:function(){
layer.close(index);
}
});
})

Loading…
Cancel
Save