From 309300299d533888d140610e22933e71d4c56c73 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 15:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=BE=E7=A4=BA=E5=85=A8?= =?UTF-8?q?=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 38 +++++++++++++++++++ .../ExcelPaymentController.class.php | 13 ++++--- .../Payment/View/ExcelPayment/add.html | 2 +- .../Payment/View/ExcelPayment/lists.html | 11 +++++- 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index d2f03c8d2..0c70a79d8 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -411,6 +411,44 @@ function set_pagination($count, $row,$request='') { } } +function set_pagination_all($count, $row,$request='') { + + $aside = ''; + }else{ + $aside .= ''; + } + $count=$count?$count:0; + $row=$row?$row:10; + if ($count > $row) { + $page = new \Think\Page($count, $row,$request); + $page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'); + + $html = $page->show(); + + return str_replace('
','
' .$aside,$html); + } else { + return '
' .$aside. '共 '.$count.' 条记录
'; + } +} + + function get_source_from_game($id=0) { if (!is_numeric($id) || $id<1) {return '全部';} diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 743bc6521..1ddb5b196 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -72,7 +72,7 @@ class ExcelPaymentController extends BaseController $map['i.pay_status'] = $_REQUEST['pay_status']; } if(isset($_REQUEST['batch_num'])){ - $map['i.batch_num'] = $_REQUEST['batch_num']; + $map['i.batch_num'] = ["LIKE","%{$_REQUEST['batch_num']}%"]; } $CompanyInfo = M("excel_statement_info","tab_") @@ -101,14 +101,17 @@ class ExcelPaymentController extends BaseController } //统计待打款金额 - $countmap = $map; - $countmap['pay_status']=["neq",1]; - $money = M("excel_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find(); + $field = "IFNULL(SUM(CASE WHEN pay_status = 1 THEN statement_money ELSE 0 END),0) as success_money, + IFNULL(SUM(CASE WHEN pay_status = 0 THEN statement_money ELSE 0 END),0) as statement_money, + IFNULL(SUM(CASE WHEN pay_status = -1 THEN statement_money ELSE 0 END),0) as error_money"; + $money = M("excel_statement_info","tab_")->alias('i')->field( $field)->where($map)->find(); + $count = M("excel_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find(); - $page = set_pagination($count['count'], $row); + $page = set_pagination_all($count['count'], $row); if ($page) { $this->assign('_page', $page); } + // echo($page);die(); $this->meta_title = 'EXCEL打款'; $this->assign("data",$CompanyInfo); $this->assign("money",$money); diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index aacf2ad1d..bbda65fb3 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -240,7 +240,7 @@ COMPARE.checkData(function(){ COMPARE.loopCheck(1,function(){ setTimeout(function(){ - window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}"; + window.location.href="{:U('lists',['row'=>999999,'page'=>1,'batch_num'=>$batch])}"; },1500); }) }); diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index ae9468b54..19f84250e 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -93,6 +93,10 @@ display: block; } + .page .sch-btn:before{ + content: ''; + padding: 0; + }