From 31b1c771a117fc168d15dc2089e14ae3fe08bf7f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 25 Jul 2020 19:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A8=E9=87=8F=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 32 ++++++++++++++----- .../View/CompanyStatementPool/viewPuPool.html | 25 ++++++++++++--- 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 88a25469b..efc267025 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -118,6 +118,9 @@ class CompanyStatementPoolController extends ThinkController $v['company_type_str'] = $this->CompanyType[$v['company_type']]; $v['is_payment_str'] = $this->IsPayment[$v['is_payment']]; $v['can_export'] = $v['statement_money'] == 0 ? "0" : '1'; + if($v['company_type'] == 2){ + $v['can_export'] = 1; + } $v['op_time'] = date('Y-m-d H:i:s',$v['op_time']); $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; @@ -201,9 +204,11 @@ class CompanyStatementPoolController extends ThinkController $is_export = true; } //获取基本信息 - $infolist = M("company_statement_info","tab_")->where("pool_id = '{$id}'")->select(); + $infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select(); //获取母单 - $statement_num = M("company_statement_pool","tab_")->field('statement_num')->where("id={$id}")->find()['statement_num']; + $statement_num = + $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids')->where("id={$id}")->find(); + $statement_num = $pool_info['statement_num']; $this->assign("title",$statement_num); if($infolist[0]['company_type'] == 3){ @@ -213,12 +218,20 @@ class CompanyStatementPoolController extends ThinkController //下游公司 $this->viewPcPool($infolist,$is_export); }else{ + //获取母单 + if(!empty($pool_info['create_lack_ids'])){ + $l_ids = $pool_info['create_lack_ids']; + $lack_info = M("company_lack_statement_info","tab_")->field("*,'0' as st")->where("id in ({$l_ids})")->select(); + + $infolist += $lack_info; + } $this->viewPuPool($infolist,$is_export); } } //个人汇总结算查看 public function viewPuPool(&$infolist,$is_export){ + // dd($infolist); $line = 1; $count = []; //获取对接人 @@ -246,12 +259,15 @@ class CompanyStatementPoolController extends ThinkController }else{ $va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; } - $count['sum_money_exp'] .= "O{$line}+"; - $count['platform_amount_exp'] .= "J{$line}+"; - + if($v['st'] == 1){ + $count['sum_money_exp'] .= "O{$line}+"; + $count['platform_amount_exp'] .= "J{$line}+"; + } }else{ - $count['platform_amount'] += $va['pay_amount']; - $count['sum_money'] += $va['sum_money']; + if($v['st'] == 1){ + $count['platform_amount'] += $va['pay_amount']; + $count['sum_money'] += $va['sum_money']; + } } } $v['statement_count'] = count($v['statement_info']); @@ -868,7 +884,7 @@ class CompanyStatementPoolController extends ThinkController break; } // - if($info['platform_amount'] <= 0){ + if($info['platform_amount'] <= 0 && $info['company_type'] != 2){ $optist = array_diff($optist, ["viewPool"]); } //个人重算,上游撤销 diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index 8874584d9..6f3749935 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -116,11 +116,15 @@ 开户支行 帐户类型 备注 + + 是否结算 + + 操作 - + style='color:red;'> {$key-0+1} {$com.company_name} @@ -150,11 +154,21 @@ {$com.company_info.opening_bank} {$com.remark} + + + + + + + + 不结算 + + - + style='color:red;'> {$it['game_name']} {$it['game_type_name']} {$it['statement_begin_time']} ~ {$it['statement_end_time']} @@ -177,19 +191,20 @@ - 合计: - {$count.platform_amount} + 合计(仅统计结算公司): + {$count.platform_amount|default=0} - {$count.sum_money} + {$count.sum_money|default=0} +