@ -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();
}
@ -238,6 +238,17 @@
</volist>
</td>
</tr>
<tr>
<td><span>支付渠道占比</span></td>
<td colspan="5">
<volist name="channelData2" id="channel">
{$channel.pay_way}:
<php>
echo round($channel['pay_amount']*100/ $moneyAllCount,2) ."%        ";
</php>
</tbody>
</table>
</div>