diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php
index 8cce3f05b..c1d3c91e5 100644
--- a/Application/Admin/Controller/CompanyStatementPoolController.class.php
+++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php
@@ -171,42 +171,76 @@ class CompanyStatementPoolController extends ThinkController
}
$id = $_REQUEST['id'];
//获取基本信息
- $dbres = $this->DBModel->where("id='{$id}'")->find();
-
- $first_party_info = json_decode($dbres['first_party_info'],true);
- $second_party_info = json_decode($dbres['second_party_info'],true);
- $statement_info = json_decode($dbres['statement_info'],true);
-
- if($dbres['pay_type'] == 2){
- $company = $second_party_info['partner'];
- $pyinfo = $second_party_info;
- $fkf_pyinfo = $first_party_info;
- }else{
- $company = $first_party_info['partner'];
- $pyinfo = $first_party_info;
- $fkf_pyinfo = $second_party_info;
- }
- $senddata = array(
- "company"=>$company,
- "payinfo"=>$pyinfo,
- "fkf_payinfo"=>$fkf_pyinfo,
- "first_part_company"=>$first_party_info['partner'],
- "second_part_company"=>$second_party_info['partner'],
- "pay_type"=>$dbres['pay_type'],
- "withdraw_type"=>$dbres['withdraw_type'],//2补丁
- "first_party_info"=>$first_party_info,
- "second_party_info"=>$second_party_info,
- "statement_info"=>$statement_info,
- "statement_count"=>array("pay_amount"=>$dbres['pay_amount'],"statement_money"=>$dbres['statement_money'],"big_ratio_money"=>convertAmountToCn($dbres['statement_money']))
- );
- $this->assign("data",$senddata);
-
- if($dbres["company_belong"] == 9){
+ $infolist = M("company_statement_info","tab_")->where("pool_id = '{$id}'")->select();
+ if($infolist[0]['company_type'] == 1){
//上游
- $this->display("viewCpStatement");
+ $line = 2;
}else{
- $this->display("viewPcStatement");
+ $line = 1;
}
+ //初始值
+ foreach($infolist as $k=>&$v){
+ $v['statement_info'] = json_decode($v['statement_info'],true);
+ $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
+ $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
+ $cline = $line+1;
+
+ $v['statement_money_exp'] = "=";
+ foreach($v['statement_info'] as $ke=>&$va){
+ $line ++;
+ if($infolist[0]['company_type'] == 1){
+ $va['sum_money_exp'] = "=F{$line}*G{$line}";
+ $v['statement_money_exp'] .= "K{$line}+";
+ $va['company_ratio'] = 100-$va['ratio'];
+ }
+
+
+ }
+ if($infolist[0]['company_type'] == 1){
+ $v['statement_money_exp'] .= "M{$cline}-L{$cline}";
+ }
+
+ $v['statement_count'] = count($v['statement_info']);
+ }
+ // dd($infolist);
+
+
+ // $dbres = $this->DBModel->where("id='{$id}'")->find();
+
+ // $first_party_info = json_decode($dbres['first_party_info'],true);
+ // $second_party_info = json_decode($dbres['second_party_info'],true);
+ // $statement_info = json_decode($dbres['statement_info'],true);
+
+ // if($dbres['pay_type'] == 2){
+ // $company = $second_party_info['partner'];
+ // $pyinfo = $second_party_info;
+ // $fkf_pyinfo = $first_party_info;
+ // }else{
+ // $company = $first_party_info['partner'];
+ // $pyinfo = $first_party_info;
+ // $fkf_pyinfo = $second_party_info;
+ // }
+ // $senddata = array(
+ // "company"=>$company,
+ // "payinfo"=>$pyinfo,
+ // "fkf_payinfo"=>$fkf_pyinfo,
+ // "first_part_company"=>$first_party_info['partner'],
+ // "second_part_company"=>$second_party_info['partner'],
+ // "pay_type"=>$dbres['pay_type'],
+ // "withdraw_type"=>$dbres['withdraw_type'],//2补丁
+ // "first_party_info"=>$first_party_info,
+ // "second_party_info"=>$second_party_info,
+ // "statement_info"=>$statement_info,
+ // "statement_count"=>array("pay_amount"=>$dbres['pay_amount'],"statement_money"=>$dbres['statement_money'],"big_ratio_money"=>convertAmountToCn($dbres['statement_money']))
+ // );
+ $this->assign("data",$infolist);
+
+ // if($dbres["company_belong"] == 9){
+ // //上游
+ $this->display("viewCpPool");
+ // }else{
+ // $this->display("viewPcStatement");
+ // }
}
//审批通过
@@ -416,7 +450,7 @@ class CompanyStatementPoolController extends ThinkController
$remark = $info['remark'];
//原始列表
$opBtn = [
- "viewPool"=>"查看",
+ "viewPool"=>"查看",
"addRemark"=>"",
"editRemark"=>"",
diff --git a/Application/Admin/View/CompanyStatementPool/lists.html b/Application/Admin/View/CompanyStatementPool/lists.html
index a516fc9c2..b79a5beca 100644
--- a/Application/Admin/View/CompanyStatementPool/lists.html
+++ b/Application/Admin/View/CompanyStatementPool/lists.html
@@ -270,9 +270,9 @@
})
$("#company_type").change();
- $(".viewStatement").click(function () {
+ $(".viewPool").click(function () {
var id = $(this).data("id");
- var url = "{:U('viewStatement')}"+"&id="+id
+ var url = "{:U('viewPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
@@ -282,19 +282,7 @@
content: url
});
});
- $(".editStatement").click(function () {
- var id = $(this).data("id");
- var url = "{:U('editStatement')}"+"&id="+id
- layer.open({
- type: 2,
- title: "海南万盟天下科技有限公司",
- shadeClose: true,
- shade: 0.8,
- area: ['70%', '80%'],
- content: url
- });
- });
$("#verifyAgree,#verifyRefuse,#cancelPool").on("click",function(){
var id = $(this).attr("id");
diff --git a/Application/Admin/View/CompanyStatementPool/viewCpPool.html b/Application/Admin/View/CompanyStatementPool/viewCpPool.html
new file mode 100644
index 000000000..ee1004416
--- /dev/null
+++ b/Application/Admin/View/CompanyStatementPool/viewCpPool.html
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合作公司 |
+ 平台 |
+ 结算日期 |
+
+ 产品 |
+ 平台流水 |
+ 未结算平台流水 |
+
+ 分成比例 |
+
+ 渠道费率 |
+ 税费费率 |
+ 合作方待结算分成 |
+ 违规罚款 |
+ 奖励 |
+ 合作待结算金额 |
+ 备注 |
+
+
+
+ 合作方 |
+ 我方 |
+
+
+
+
+
+ {$com.company_name} |
+ {$com.company_name} |
+ {$com.statement_begin_time} ~ {$com.statement_end_time} |
+
+ {$com['statement_info'][0]['game_name']} |
+ {$com['statement_info'][0]['pay_amount']} |
+ {$com['statement_info'][0]['pay_amount']} |
+ {$com['statement_info'][0]['ratio']}% |
+ {$com['statement_info'][0]['company_ratio']}% |
+ {$com['statement_info'][0]['promote_ratio']}% |
+ {$com['statement_info'][0]['fax_ratio']}% |
+ {$com['statement_info'][0]['sum_money']} |
+
+ {$com.fine} |
+ {$com.reward} |
+ {$com.statement_money} |
+ {$com.renark} |
+
+
+
+
+ {$it['game_name']} |
+ {$it['pay_amount']} |
+ {$it['pay_amount']} |
+ {$it['ratio']}% |
+ {$it['company_ratio']}% |
+ {$it['promote_ratio']}% |
+ {$it['fax_ratio']}% |
+ {$it['sum_money']} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/CompanyStatementPool/viewCpStatement.html b/Application/Admin/View/CompanyStatementPool/viewCpStatement.html
deleted file mode 100644
index eadbad10d..000000000
--- a/Application/Admin/View/CompanyStatementPool/viewCpStatement.html
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 结算时间 |
- 产品 |
- 平台总额 |
- 分成比例 |
-
- 渠道费率 |
- 税费费率 |
-
- 结算金额 |
-
-
- 甲方 |
- 乙方 |
-
- 结算金额=平台总额*(1-渠道费)*分成比例*(1-税费费率) |
-
-
-
-
-
- {$it.statement_begin_time}~{$it.statement_end_time} |
- {$it.game_name} |
-
- -{$it.pay_amount} |
-
- {$it.pay_amount} |
-
-
- {$it.first_ratio}% |
- {$it.second_ratio}% |
- {$it.promote_ratio}% |
- {$it.fax_ratio}% |
-
- |
- |
- |
- |
-
-
- -{$it.sum_money} |
-
- {$it.sum_money} |
-
-
-
-
-
-
- 合计 |
- |
- {$data.statement_count.pay_amount} |
- |
- |
- |
- |
- {$data.statement_count.statement_money} |
-
-
- 本月分成总金额(人民币大写): |
- {$data.statement_count.big_ratio_money} |
-
-
-
-
-
-
-
-
-
-