From 836eccfa782c5ef1221055eeecebe8fd7af8fb5c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 2 Jan 2020 14:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PayChannelController.class.php | 5 ++++- Application/Admin/View/PayChannel/index.html | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 5137e6ebe..b9939f2aa 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -316,7 +316,10 @@ class PayChannelController extends ThinkController $this->assign('sumData',$sumData); $this->assign('channelData',$channelData); $this->assign('listdata',$data); - + //统计总额和比例 + $this->assign('channelData2',$channelData); + $moneyAllCount = array_sum(array_column($channelData, 'pay_amount')); + $this->assign('moneyAllCount',$moneyAllCount); $this->display(); } diff --git a/Application/Admin/View/PayChannel/index.html b/Application/Admin/View/PayChannel/index.html index 983f44e80..57bd324d6 100644 --- a/Application/Admin/View/PayChannel/index.html +++ b/Application/Admin/View/PayChannel/index.html @@ -238,6 +238,17 @@ + + 支付渠道占比 + + + {$channel.pay_way}: + + echo round($channel['pay_amount']*100/ $moneyAllCount,2) ."%        "; + + + +