From 87b1b040401e78597335c54e945385f13abd0a5d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 17 Mar 2020 20:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E8=B4=A2=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=87=91=E9=A2=9D=E4=BF=9D=E7=95=99=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 6 ++++ .../FinancePromoteController.class.php | 28 ++++++++++++--- .../FinancialSummaryController.class.php | 10 +++--- .../Controller/PayChannelController.class.php | 28 ++++++++++++--- .../Admin/View/Finance/coinDetail.html | 4 +-- .../View/FinancePromote/gameCoinDetail.html | 4 +-- .../View/FinancePromote/promoteUser.html | 10 +++--- .../Admin/View/FinancialSummary/index.html | 16 ++++----- Application/Admin/View/PayChannel/index.html | 36 +++++++++---------- 9 files changed, 93 insertions(+), 49 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 7d3612a71..ff7c722ec 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -954,6 +954,9 @@ class FinanceController extends ThinkController foreach($data as $key => $value) { $data[$key]['pay_way'] = getPayType($value['pay_way']); + + $data[$key]['cost'] = number_format($value['cost'],2,'.',''); + $data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); } $count = D("spend")->getSpendData($map,$field,$group,$order); @@ -1360,6 +1363,9 @@ class FinanceController extends ThinkController }else { $fuhao = '-'; } + + $total = number_format($total,2,'.',''); + $page = set_pagination($counts,$row); if($page) {$this->assign('_page', $page);} $this->assign('fuhao', $fuhao); diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 93bbeb607..50173fd69 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -120,7 +120,9 @@ class FinancePromoteController extends AdminController if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0; if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0; $v['promote_account'] = get_promote_name($v['p_id']); - $v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count']; + + $v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.',''); + $v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.',''); $count['cash_count'] += $v['cash_count']; $count['balance_coin_count'] += $v['balance_coin_count']; $count['bind_coin_count'] += $v['bind_coin_count']; @@ -164,6 +166,13 @@ class FinancePromoteController extends AdminController } + $count['cash_count'] = number_format($count['cash_count'],2,'.',''); + $count['balance_coin_count'] = number_format($count['balance_coin_count'],2,'.',''); + $count['bind_coin_count'] = number_format($count['bind_coin_count'],2,'.',''); + $count['inside_cash_count'] = number_format($count['inside_cash_count'],2,'.',''); + $count['all_count'] = number_format($count['all_count'],2,'.',''); + + //外团占比 $this->assign('outBelong',number_format($outBelong/$count['all_count']*100,2,'.','')); //内团占比 @@ -318,7 +327,8 @@ class FinancePromoteController extends AdminController if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0; if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0; if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0; - $v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count']; + $v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.',''); + $v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.',''); $allcount['cash_count'] += $v['cash_count']; $allcount['balance_coin_count'] += $v['balance_coin_count']; $allcount['bind_coin_count'] += $v['bind_coin_count']; @@ -327,6 +337,12 @@ class FinancePromoteController extends AdminController $data[] = $v; } + $allcount['cash_count'] = number_format($allcount['cash_count'],2,'.',''); + $allcount['balance_coin_count'] = number_format($allcount['balance_coin_count'],2,'.',''); + $allcount['bind_coin_count'] = number_format($allcount['bind_coin_count'],2,'.',''); + $allcount['inside_cash_count'] = number_format($allcount['inside_cash_count'],2,'.',''); + $allcount['all_count'] = number_format($allcount['all_count'],2,'.',''); + $data = my_sort($data, $data_order_type, (int)$data_order); if(isset($_REQUEST['export'])){ @@ -438,7 +454,7 @@ class FinancePromoteController extends AdminController $value['cash_count']?:0; $value['balance_coin_count']?:0; $value['inside_cash_count']?:0; - $value['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; + $value['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.',''); $value['company_belong'] =getCompanyBlong($value['company_belong']); if(!$value['game_name']) $value['game_name'] = "无"; } @@ -473,7 +489,7 @@ class FinancePromoteController extends AdminController $sumCash = $totalData['cash_count']; $sumBalance = $totalData['balance_coin_count']; $sumInside = $totalData['inside_cash_count']; - $sumAll = $sumCash + $sumBalance + $sumInside; + $sumAll = number_format($sumCash + $sumBalance + $sumInside,2,'.',''); $this->assign('sumCash', $sumCash); $this->assign('sumBalance', $sumBalance); @@ -717,6 +733,10 @@ class FinancePromoteController extends AdminController foreach($data as $key => $value) { $data[$key]['pay_way'] = getPayType($value['pay_way']); + + $data[$key]['cost'] = number_format($value['cost'],2,'.',''); + $data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); + } if (isset($_REQUEST['export'])) { diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index aee550b32..22b4c2386 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -45,22 +45,22 @@ class FinancialSummaryController extends AdminController { $senddata = array( "income"=>[ - "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0] + "count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00'] ], "promote"=>[ - "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0] + "count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00'] ], "channel"=>[ - "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0] + "count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00'] ], "payway"=>[ - "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0] + "count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00'] ] ); $data = []; //初始化数据 foreach ($this->keyname as $k => $v) { - $data[$k] = array("name"=>$v,"money"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]); + $data[$k] = array("name"=>$v,"money"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']); } $map = array( "count_year"=>$_REQUEST['year'], diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 4489696c1..667021e46 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -261,10 +261,10 @@ class PayChannelController extends ThinkController foreach ($data as $key => $value) { - $data[$key]['pay_amount'] = $value['pay_amount'] - $value['test_coin']; - $data[$key]['platform_coin'] = $value['platform_coin'] - $value['test_platform_coin']; - $data[$key]['test_coin'] = $value['test_coin'] + $value['test_platform_coin']; - $data[$key]['sum'] = $value['pay_amount'] + $value['platform_coin']; + $data[$key]['pay_amount'] = number_format($value['pay_amount'] - $value['test_coin'],2,'.',''); + $data[$key]['platform_coin'] = number_format($value['platform_coin'] - $value['test_platform_coin'],2,'.',''); + $data[$key]['test_coin'] = number_format($value['test_coin'] + $value['test_platform_coin'],2,'.',''); + $data[$key]['sum'] = number_format($value['pay_amount'] + $value['platform_coin'],2,'.',''); if($_REQUEST['export'] == 1) { unset($data[$key]['game_id'] ); @@ -339,6 +339,12 @@ class PayChannelController extends ThinkController array_merge($data,[0=>$superSignData]),[0=>$offcialData])),[0=>$spreadData],[0=>$sumData])),[0=>$payTypeDataExport]),[0=>$channelDataExport]),'支付渠道统计导出',$title); } + + $sumData['pay_amount'] = number_format($sumData['pay_amount'],2,'.',''); + $sumData['platform_coin'] = number_format($sumData['platform_coin'],2,'.',''); + $sumData['test_coin'] = number_format($sumData['test_coin'],2,'.',''); + $sumData['test_platform_coin'] = number_format($sumData['test_platform_coin'],2,'.',''); + $this->meta_title = "支付渠道统计"; $size = $row;//每页显示的记录数 $data = array_slice($data, ($arraypage - 1) * $size, $size); @@ -676,8 +682,11 @@ class PayChannelController extends ThinkController } } + $sumAllData['pay_amount'] = number_format($sumAllData['pay_amount'],2,'.','');; + $sumAllData['platform_amount'] = number_format($sumAllData['platform_amount'],2,'.','');; + $this->meta_title = "游戏订单查看"; - $sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount']; + $sumAllData['sum'] = number_format($sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount'],2,'.',''); // var_dump($sumAllData);die(); $this->assign('sumAllData',$sumAllData); $this->assign('data',$data); @@ -1152,6 +1161,10 @@ class PayChannelController extends ThinkController $sumAllData['cost'] += $coinDataSum['cost']; } + $sumAllData['pay_amount'] = number_format($sumAllData['pay_amount'],2,'.',''); + $sumAllData['cost'] = number_format($sumAllData['cost'],2,'.',''); + + $this->assign('sumAllData',$sumAllData); @@ -1178,6 +1191,11 @@ class PayChannelController extends ThinkController } + $payTypeData['支付宝支付金额'] = number_format($payTypeData['支付宝支付金额'],2,'.',''); + $payTypeData['微信支付金额'] = number_format($payTypeData['微信支付金额'],2,'.',''); + $payTypeData['快捷支付金额'] = number_format($payTypeData['快捷支付金额'],2,'.',''); + $payTypeData['其他支付金额'] = number_format($payTypeData['其他支付金额'],2,'.',''); + $this->assign('payTypeData',$payTypeData); foreach($sumData as $key=>$value) { diff --git a/Application/Admin/View/Finance/coinDetail.html b/Application/Admin/View/Finance/coinDetail.html index 1f4c58998..d9ba26176 100644 --- a/Application/Admin/View/Finance/coinDetail.html +++ b/Application/Admin/View/Finance/coinDetail.html @@ -109,8 +109,8 @@ 总计 - {$total_cost}0 - {$total_pay_amount}0 + {$total_cost}0.00 + {$total_pay_amount}0.00 diff --git a/Application/Admin/View/FinancePromote/gameCoinDetail.html b/Application/Admin/View/FinancePromote/gameCoinDetail.html index 9995cfcc9..e49138ea4 100644 --- a/Application/Admin/View/FinancePromote/gameCoinDetail.html +++ b/Application/Admin/View/FinancePromote/gameCoinDetail.html @@ -138,8 +138,8 @@ 总计 - {$total_cost}0 - {$total_pay_amount}0 + {$total_cost}0.00 + {$total_pay_amount}0.00 diff --git a/Application/Admin/View/FinancePromote/promoteUser.html b/Application/Admin/View/FinancePromote/promoteUser.html index 3619e61fd..6073b4d60 100644 --- a/Application/Admin/View/FinancePromote/promoteUser.html +++ b/Application/Admin/View/FinancePromote/promoteUser.html @@ -224,11 +224,11 @@ 汇总: --- - {$all_count['cash_count']} - {$all_count['balance_coin_count']} - {$all_count['bind_coin_count']} - {$all_count['inside_cash_count']} - {$all_count['all_count']} + {$all_count['cash_count']} + {$all_count['balance_coin_count']} + {$all_count['bind_coin_count']} + {$all_count['inside_cash_count']} + {$all_count['all_count']} diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html index a94577f7d..c77ba424d 100644 --- a/Application/Admin/View/FinancialSummary/index.html +++ b/Application/Admin/View/FinancialSummary/index.html @@ -136,14 +136,14 @@ {$incomekey} {$income.name} - {$incomemoney} + {$incomemoney}0.00 合计: - {$incomecount} + {$incomecount}0.00 @@ -161,14 +161,14 @@ {$promotekey} {$promote.name} - {$promotemoney} + {$promotemoney}0.00 合计: - {$promotecount} + {$promotecount}0.00 @@ -186,14 +186,14 @@ {$channelkey} {$channel.name} - {$channelmoney} + {$channelmoney}0.00 合计: - {$channelcount} + {$channelcount}0.00 @@ -211,14 +211,14 @@ {$paywaykey} {$payway.name} - {$paywaymoney} + {$paywaymoney}0.00 合计: - {$paywaycount} + {$paywaycount}0.00 diff --git a/Application/Admin/View/PayChannel/index.html b/Application/Admin/View/PayChannel/index.html index ab7148a58..59fdfc13c 100644 --- a/Application/Admin/View/PayChannel/index.html +++ b/Application/Admin/View/PayChannel/index.html @@ -179,30 +179,30 @@ 超级签 - {$superSignData['pay_amount']}0 - 0 - {$superSignData.test_coin}0 - {$superSignData['sum']}0 + {$superSignData['pay_amount']}0.00 + 0.00 + {$superSignData.test_coin}0.00 + {$superSignData['sum']}0.00 订单查看 官网 - 0 + 0.00 {$offcialData['pay_amount']} - {$offcialData.test_coin}0 - {$offcialData['sum']}0 + {$offcialData.test_coin}0.00 + {$offcialData['sum']}0.00 订单查看 推广后台 - 0 + 0.00 {$spreadData['pay_amount']} - 0 - {$spreadData['sum']}0 + 0.00 + {$spreadData['sum']}0.00 订单查看 @@ -210,20 +210,20 @@ 汇总 - {$sumData['pay_amount']}0 - {$sumData['platform_coin']}0 + {$sumData['pay_amount']}0.00 + {$sumData['platform_coin']}0.00 {$sumData['test_coin']} - {$sumData['sum']}0 + {$sumData['sum']}0.00 ------ 测试环境内外网平台 - {$sum_pay_amount['sum_order_amount']}0 - 0 - 0 - {$sum_pay_amount['sum_order_amount']}0 + {$sum_pay_amount['sum_order_amount']}0.00 + 0.00 + 0.00 + {$sum_pay_amount['sum_order_amount']}0.00 订单查看 @@ -237,7 +237,7 @@ {$key}:{$payTypeData}          - 平台币直充总金额(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计){$coinSum}0 + 平台币直充总金额(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计){$coinSum}0.00