Merge remote-tracking branch 'origin/release' into release

master
liuweiwen 5 years ago
commit d50627e4fb

@ -59,6 +59,8 @@ class PromoteCompanyController extends ThinkController
$companyids = implode(',', array_column($companyres, 'id')); $companyids = implode(',', array_column($companyres, 'id'));
//获取所属会长及其游戏分成 //获取所属会长及其游戏分成
$promotemap['company_id']=["in",$companyids]; $promotemap['company_id']=["in",$companyids];
$promotemap['level'] = 1;
$promoteres = M("Promote","tab_") $promoteres = M("Promote","tab_")
->field("id,company_id,account,settlement_type") ->field("id,company_id,account,settlement_type")
->where($promotemap) ->where($promotemap)
@ -177,20 +179,29 @@ class PromoteCompanyController extends ThinkController
if($v['platform_name'] == '' || $v['platform_name'] == "0"){ if($v['platform_name'] == '' || $v['platform_name'] == "0"){
$v['platform_name'] = "--"; $v['platform_name'] = "--";
} }
$v["is_sign_contact"] = ($v["is_sign_contact"]=="1" ? "是" :'否');
$v["is_sign_contact"] = ($v["is_sign_contact"]=="1" ? "是" :'否');
$v["company_type"] = ($v["company_type"]=="1" ? "公司" :'个人');
$v["company_belong"] = ($v["company_belong"]=="0" ? "内团" : ($v["company_belong"]=="1" ? "外团" : ($v["company_belong"]=="2" ? "外团分发" : '无')));
} }
// dd($companyres); // dd($companyres);
//公司及会长数量统计
$companycount = $model->field("id")->where($map)->select();
$count = count($companycount);
$companyallids = implode(',', array_column($companycount, 'id'));
$promotemap['company_id']=["in",$companyallids];
$promotecount = M("Promote","tab_")->where($promotemap)->count();
$this->assign('listData', $companyres);
$this->assign('count', $count);
$this->assign('promotecount', $promotecount);
if($is_export){ if($is_export){
$this->assign('listData', $companyres); //导出
$this->display("export"); $this->display("export");
die(); die();
} }
/* 查询记录总数 */
$count = $model
->where($map)
->count();
//分页 //分页
$parameter['p'] = $page; $parameter['p'] = $page;
$parameter['row'] = $row; $parameter['row'] = $row;
@ -198,9 +209,7 @@ class PromoteCompanyController extends ThinkController
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
//分配其他页面需要参数
$this->assign('listData', $companyres);
$this->assign('count', $count);
$this->assign('promoteList', getPromoteByLevel(1)); $this->assign('promoteList', getPromoteByLevel(1));
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find());
$this->meta_title = '推广公司'; $this->meta_title = '推广公司';

@ -29,48 +29,67 @@
<table border="1" id="exporttable" style="opacity: 0;"> <table border="1" id="exporttable" style="opacity: 0;">
<!-- 表头 --> <!-- 表头 -->
<thead> <thead>
<tr> <tr>
<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>会长账号</th> <th>会长账号</th>
<th>结算周期</th> <th>结算周期</th>
<th>产品类型</th> <th>产品类型</th>
<th>游戏名称</th> <th>游戏名称</th>
<th colspan="2">合作方分成比例</th> <th colspan="2">合作方分成比例</th>
</tr> </tr>
</thead> </thead>
<!-- 列表 --> <!-- 列表 -->
<tbody> <tbody>
<empty name ="listData"> <empty name ="listData">
<td colspan="99" class="text-center">aOh! 暂时还没有内容!</td> <td colspan="99" class="text-center">aOh! 暂时还没有内容!</td>
<else /> <else />
<volist name="listData" id="data" key="companykey"> <volist name="listData" id="data" key="companykey">
<tr> <tr>
<td rowspan="{$data.row}">{$data.company_name}</td> <td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.platform_name}</td> <td rowspan="{$data.row}">{$data.platform_name}</td>
<td rowspan="{$data.row}">{$data.contact_begin} - {$data.contact_end}</td> <td rowspan="{$data.row}">{$data.company_type}</td>
<td rowspan="{$data.row}">{$data.fax_ratio}%</td> <td rowspan="{$data.row}">{$data.company_belong}</td>
<td rowspan="{$data.row}">{$data.bank_name}</td> <td rowspan="{$data.row}">{$data.contact_begin} - {$data.contact_end}</td>
<td rowspan="{$data.row}">&nbsp;{$data.bank_card}</td> <td rowspan="{$data.row}">{$data.fax_ratio}%</td>
<td rowspan="{$data.row}">{$data.is_sign_contact}</td> <td rowspan="{$data.row}">{$data.bank_name}</td>
<td rowspan="{$data.row}">{$data.content}</td> <td rowspan="{$data.row}">&nbsp;{$data.bank_card}</td>
<notempty name="data.list"> <td rowspan="{$data.row}">{$data.is_sign_contact}</td>
<foreach name="data['list']" item="promote" key="promotekey"> <td rowspan="{$data.row}">{$data.content}</td>
<if condition="$promotekey gt 0"> <notempty name="data.list">
<tr> <foreach name="data['list']" item="promote" key="promotekey">
<td rowspan="{$promote['row']}"> {$promote['account']}</td> <if condition="$promotekey gt 0">
<td rowspan="{$promote['row']}"> {$promote['settlement_type']}</td> <tr>
<foreach name="promote['list']" item="game" key="gamekey"> <td rowspan="{$promote['row']}"> &nbsp;{$promote['account']}</td>
<if condition="$gamekey gt 0"> <td rowspan="{$promote['row']}"> {$promote['settlement_type']}</td>
<tr> <foreach name="promote['list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td rowspan="{$game['row']}">{$game['game_type_name']}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
<foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
<if condition="$ratiokey gt 0">
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</if>
</foreach>
</tr>
<else />
<td rowspan="{$game['row']}">{$game['game_type_name']}</td> <td rowspan="{$game['row']}">{$game['game_type_name']}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']}</td> <td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
<foreach name="game['turnover_ratio']" item="ratio" key="ratiokey"> <foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
@ -84,44 +103,14 @@
<td>{$ratio['ratio']}</td> <td>{$ratio['ratio']}</td>
</if> </if>
</foreach> </foreach>
</tr>
<else />
<td rowspan="{$game['row']}">{$game['game_type_name']}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
<foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
<if condition="$ratiokey gt 0">
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</if>
</foreach>
</if>
</foreach>
</tr>
<else />
<td rowspan="{$promote['row']}"> {$promote['account']}</td>
<td rowspan="{$promote['row']}"> {$promote['settlement_type']}</td>
<foreach name="promote['list']" item="game" key="gamekey">
<if condition="$gamekey eq 0">
<td rowspan="{$game['row']}">{$game['game_type_name']}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
<foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
<if condition="$ratiokey gt 0">
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</if> </if>
</foreach> </foreach>
<else /> </tr>
<tr> <else />
<td rowspan="{$promote['row']}"> &nbsp;{$promote['account']}</td>
<td rowspan="{$promote['row']}"> {$promote['settlement_type']}</td>
<foreach name="promote['list']" item="game" key="gamekey">
<if condition="$gamekey eq 0">
<td rowspan="{$game['row']}">{$game['game_type_name']}</td> <td rowspan="{$game['row']}">{$game['game_type_name']}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']}</td> <td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
<foreach name="game['turnover_ratio']" item="ratio" key="ratiokey"> <foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
@ -135,16 +124,37 @@
<td>{$ratio['ratio']}</td> <td>{$ratio['ratio']}</td>
</if> </if>
</foreach> </foreach>
</tr> <else />
</if> <tr>
</foreach> <td rowspan="{$game['row']}">{$game['game_type_name']}</td>
</if> <td rowspan="{$game['row']}">{$game['relation_game_name']}</td>
</foreach> <foreach name="game['turnover_ratio']" item="ratio" key="ratiokey">
</notempty> <if condition="$ratiokey gt 0">
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
</if>
</foreach>
</tr>
</if>
</foreach>
</if>
</foreach>
</notempty>
</tr>
</volist>
<tr class="data_summary">
<td style="text-align: center;">汇总:</td>
<td colspan="15">
累计推广公司数量:{$count}&#12288;&#12288;会长数量:{$promotecount}
</td>
</tr> </tr>
</volist> </empty>
</empty> </tbody>
</tbody>
</table> </table>
<script> <script>

@ -93,6 +93,8 @@
<th style="width:10%;min-width:150px;">操作</th> <th style="width:10%;min-width:150px;">操作</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>
@ -122,6 +124,8 @@
</td> </td>
<td rowspan="{$data.row}">{$data.company_name}</td> <td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.platform_name}</td> <td rowspan="{$data.row}">{$data.platform_name}</td>
<td rowspan="{$data.row}">{$data.company_type}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<td rowspan="{$data.row}">{$data.contact_begin} - {$data.contact_end}</td> <td rowspan="{$data.row}">{$data.contact_begin} - {$data.contact_end}</td>
<td rowspan="{$data.row}">{$data.fax_ratio}%</td> <td rowspan="{$data.row}">{$data.fax_ratio}%</td>
<td rowspan="{$data.row}">{$data.bank_name}</td> <td rowspan="{$data.row}">{$data.bank_name}</td>
@ -209,6 +213,12 @@
</notempty> </notempty>
</tr> </tr>
</volist> </volist>
<tr class="data_summary">
<td style="text-align: center;">汇总:</td>
<td colspan="16">
累计推广公司数量:{$count}&#12288;&#12288;会长数量:{$promotecount}
</td>
</tr>
</empty> </empty>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save