From 4ac069e28a37a1e745c3f07c98b1ee3b92e7a69f Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 11 Nov 2019 11:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86->=E7=BB=93=E7=AE=97=E6=98=8E?= =?UTF-8?q?=E7=BB=86--=E6=A3=80=E7=B4=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 34 ++++++++++++++++--- .../View/default/Finance/settlementDtl.html | 27 +++++++++++++++ 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 6c95bea64..700835f96 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -160,7 +160,9 @@ class FinanceController extends BaseController $page = intval(I('get.p', 1)); $page = $page ? $page : 1; //默认显示第一页数据arraypage $row = intval(I('get.row', 10)); + $gameId = intval(I('game_id', 0)); $payOrderNumber = I('pay_order_number', ''); + $status = intval(I('status', 0)); $nowTime = date('Y-m-d'); $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime'); @@ -172,13 +174,16 @@ class FinanceController extends BaseController $parameter['p'] = $page; $parameter['row'] = $row; + $parameter['game_id'] = $gameId; $parameter['pay_order_number'] = $payOrderNumber; + $parameter['status'] = $status; $parameter['begtime'] = $initBegTime; $parameter['endtime'] = $initEndTime; $data = []; $count = 0; if (intval($endTime - $begTime) / (24 * 3600) <= 31) { + $withdrawIds = []; $map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%']; $ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids[] = $this->loginPromote['id']; @@ -186,10 +191,29 @@ class FinanceController extends BaseController $map = []; $map['promote_id'] = ['in', $ids]; + $map['pay_status'] = 1; $map['pay_time'] = ['between', [$begTime, $endTime]]; + if (!empty($gameId)) { + $map['game_id'] = $gameId; + } if (!empty($payOrderNumber)) { $map['pay_order_number'] = $payOrderNumber; } + if (isset($_GET['status'])) { + if ($status == -2) { + $map['selle_status'] = 0; + } else { + $withdrawMap['promote_id'] = $this->loginPromote['id']; + $withdrawMap['status'] = $status; + $withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true); + + if (empty($withdrawIds)) { + $map = '1 = 2'; + } else { + $map['withdraw_id'] = ['in', $withdrawIds]; + } + } + } $data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id') ->where($map) @@ -199,10 +223,12 @@ class FinanceController extends BaseController $count = $model->where($map)->count(); //提现状态 - $withdrawIds = [0]; - foreach ($data as $key => $value) { - if ($value['withdraw_id'] > 0 && !in_array($value['withdraw_id'], $withdrawIds)) { - $withdrawIds[] = $value['withdraw_id']; + if (empty($withdrawIds)) { + $withdrawIds = [0]; + foreach ($data as $key => $value) { + if ($value['withdraw_id'] > 0 && !in_array($value['withdraw_id'], $withdrawIds)) { + $withdrawIds[] = $value['withdraw_id']; + } } } $withdrawStatus = M('withdraw', 'tab_') diff --git a/Application/Home/View/default/Finance/settlementDtl.html b/Application/Home/View/default/Finance/settlementDtl.html index b38ea9876..d62cd8937 100644 --- a/Application/Home/View/default/Finance/settlementDtl.html +++ b/Application/Home/View/default/Finance/settlementDtl.html @@ -85,10 +85,37 @@
+ + +
+ +
+
+ + +
+