From f4027b75b3a32f5ad39f4250a1efd628f16b296e Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 28 Dec 2020 15:10:30 +0800 Subject: [PATCH] =?UTF-8?q?12.28=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payment/Controller/PaymentController.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index ba8042410..655b2b400 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -266,6 +266,7 @@ class PaymentController extends BaseController } $title = [ + 'num'=>'序号', 'company_name' => '公司名称', 'statement_time' => '结算时间', 'statement_money' => '结算金额', @@ -289,14 +290,18 @@ class PaymentController extends BaseController // ->where(['statement_info_id'=>['in',$id]]) // ->find(); - $money = M("company_statement_info","tab_")->alias('s')->field("sum(statement_money) statement_money")->where(['s.id'=>['in',$id]])->find(); - $sumData = [ 'company_name'=>'合计', 'statement_time' => "待打款金额: {$sum['unpay_amount']} 打款成功: {$sum['pay_amount']} 打款失败: {$sum['faild_pay_amount']}", ]; $data = array_merge($data,[$sumData]); + + foreach($data as $key => $value) { + + $data[$key]['num'] = $key + 1; + + } // dump($data);die(); data2csv($data,'线上打款',$title); // $this->ajaxReturn(['stauts'=>1,'msg'=>'导出成功']);