From 8ac604be3338f5fecc4c0c98411ab8e53c928c35 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 21 Jul 2020 16:58:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 14 + .../PromoteCompanyController.class.php | 24 +- .../Admin/View/PromoteCompany/export.html | 334 ++++++++++-------- 3 files changed, 229 insertions(+), 143 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 5e7fcaef4..6659484eb 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -1027,4 +1027,18 @@ function PromoteStatistics($orderNo) { } } +function showPercent($num) +{ + if($num-0 > 0){ + if(strpos($num,"%")){ + return $num; + }else{ + return $num."%"; + } + + }else{ + return $num ?? "--"; + } + +} diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index ceb8ab474..236a4639d 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -68,7 +68,7 @@ class PromoteCompanyController extends ThinkController //获取公司信息 if(!empty($companyres)){ foreach($companyres as $k=>&$v){ - $tmpr = D("CompanyRelation")->getCompanyRelation(2,$value['id']); + $tmpr = D("CompanyRelation")->getCompanyRelation(2,$v['id']); $v["settlement_type"] = $tmpr['settlement_type']; $v["company_belong"] = getCompanyBlong($v["company_belong"]); $v["develop_type"] = getCompanyRelation($v["develop_type"]); @@ -1058,8 +1058,17 @@ class PromoteCompanyController extends ThinkController if($is_export){ if(isset($CpRadio[$t_gid])){ $senddata[$t_gid]["cp_ratio"] = $CpRadio[$t_gid]; - if( count($CpRadio[$t_gid]) > $senddata[$t_gid]['row'] ){ + if( count($CpRadio[$t_gid]) >= $senddata[$t_gid]['row'] ){ + $c = count($CpRadio[$t_gid]) - $senddata[$t_gid]['row']; + for ($x=0; $x<$c; $x++) { + $senddata[$t_gid]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + } $senddata[$t_gid]['row'] = count($CpRadio[$t_gid]); + }else{ + $c = $senddata[$t_gid]['row'] - count($CpRadio[$t_gid]); + for ($x=0; $x<$c; $x++) { + $senddata[$t_gid]['cp_ratio'][]=["name"=>"--","ratio"=>"--"]; + } } } } @@ -1085,8 +1094,17 @@ class PromoteCompanyController extends ThinkController if($is_export){ if(isset($CpRadio[$t_gid])){ $senddata[$t_gid]["cp_ratio"] = $CpRadio[$t_gid]; - if( count($CpRadio[$t_gid]) > $senddata[$t_gid]['row'] ){ + if( count($CpRadio[$t_gid]) >= $senddata[$t_gid]['row'] ){ + $c = count($CpRadio[$t_gid]) - $senddata[$t_gid]['row']; + for ($x=0; $x<$c; $x++) { + $senddata[$t_gid]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + } $senddata[$t_gid]['row'] = count($CpRadio[$t_gid]); + }else{ + $c = $senddata[$t_gid]['row'] - count($CpRadio[$t_gid]); + for ($x=0; $x<$c; $x++) { + $senddata[$t_gid]['cp_ratio'][]=["name"=>"--","ratio"=>"--"]; + } } } } diff --git a/Application/Admin/View/PromoteCompany/export.html b/Application/Admin/View/PromoteCompany/export.html index 66785a993..f63a5a59b 100644 --- a/Application/Admin/View/PromoteCompany/export.html +++ b/Application/Admin/View/PromoteCompany/export.html @@ -1,5 +1,6 @@ + @@ -15,187 +16,240 @@ + -
- 导出进行中。。。
+ + + + - - - - - - - - - - - - - - - + + + + + + - - + + - + - - - + + + - - + - + - - - - - + - - + + + + + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - +
合作方名称 对应平台内外团开发类型 公司性质内外团归属合同期限开票税点账户名开户行银行账号是否签署合同支付宝真实姓名支付宝账号备注会长账号 结算周期会长账号市场专员押金原包名现包名 产品类型游戏名称合作方分成比例推广分成比例CP分成比例
aOh! 暂时还没有内容!
{$data.company_name}{$data.platform_name}{$data.company_type}{$data.platform_name|default="--"} {$data.company_belong}{$data.contact_begin} - {$data.contact_end}{$data.develop_type}{$data.fax_ratio}%{$data.bank_address}{$data.bank_name} {$data.bank_card}{$data.is_sign_contact}{$data.company_type}{$data.ali_user}{$data.ali_account}{$data.settlement_type}{$data['list'][0]['account']|default="--"} + {$data['list'][0]['market_admin_username']|default="--"}{$data['list'][0]['pay_type']|default="--"}{$data.content} + {$data['list'][0]['list'][0]['original_package_name']|default="--"} + {$data['list'][0]['list'][0]['relation_game_name']|default="--"} + {$data['list'][0]['list'][0]['game_type_name']|default="--"}
 {$promote['account']} {$promote['settlement_type']}
{$game['game_type_name']}{$game['relation_game_name']}
{$ratio['name']}{$ratio['ratio']}
{$ratio['name']}{$ratio['ratio']}
{$game['game_type_name']}{$game['relation_game_name']}
{$ratio['name']}{$ratio['ratio']}
{$ratio['name']}{$ratio['ratio']}
 {$promote['account']} {$promote['settlement_type']}{$game['game_type_name']}{$game['relation_game_name']}
{$ratio['name']}{$ratio['ratio']}
{$ratio['name']}{$ratio['ratio']}{$data['list'][0]['list'][0]['turnover_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['turnover_ratio'][0]['ratio']|showPercent}{$data['list'][0]['list'][0]['cp_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['cp_ratio'][0]['ratio']|showPercent} --------------------------------------
{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$data['list'][0]['list'][0]['cp_ratio'][$gamekey]['name']|default="--"}{$data['list'][0]['list'][0]['cp_ratio'][$gamekey]['ratio']|showPercent}
{$p_ratio['original_package_name']|default="--"} + {$p_ratio['relation_game_name']|default="--"}{$p_ratio['game_type_name']|default="--"}{$p_ratio['turnover_ratio'][0]['name']|default="--"}{$p_ratio['turnover_ratio'][0]['ratio']|showPercent}{$p_ratio['cp_ratio'][0]['name']|default="--"}{$p_ratio['cp_ratio'][0]['ratio']|showPercent}----
{$game['game_type_name']}{$game['relation_game_name']}
{$ratio['name']}{$ratio['ratio']}
{$ratio['name']}{$ratio['ratio']}{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$p_ratio['cp_ratio'][$gamekey]['name']|default="--"}{$p_ratio['cp_ratio'][$gamekey]['ratio']|showPercent}
{$promote['account']|default="--"}{$promote['market_admin_username']|default="--"} + {$promote['pay_type']|default="--"} + {$promote['list']['original_package_name']|default="--"} + {$promote['list']['relation_game_name']|default="--"} + {$promote['list']['game_type_name']|default="--"}{$promote['list']['turnover_ratio'][0]['name']|default="--"}{$promote['list']['turnover_ratio'][0]['ratio']|default="--"}{$promote['list']['cp_ratio'][0]['name']|default="--"}{$promote['list']['cp_ratio'][0]['ratio']|showPercent}----------------------
汇总: + 汇总: 累计推广公司数量:{$count}  会长数量:{$promotecount}
- + }); + - + + \ No newline at end of file