From 149afec11fb14d529b5b22e61c57096c10b7c6f6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 27 Jun 2024 09:30:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(StoreFinanceFlowLists):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E8=B4=A2=E5=8A=A1=E7=B1=BB=E5=9E=8B=E5=92=8C?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E6=96=B9=E5=BC=8F=E7=9A=84=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store_finance_flow/StoreFinanceFlowLists.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/admin/lists/store_finance_flow/StoreFinanceFlowLists.php b/app/admin/lists/store_finance_flow/StoreFinanceFlowLists.php index 45bb608a7..0edff508f 100644 --- a/app/admin/lists/store_finance_flow/StoreFinanceFlowLists.php +++ b/app/admin/lists/store_finance_flow/StoreFinanceFlowLists.php @@ -32,7 +32,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt public function setSearch(): array { return [ - '=' => ['store_id', 'user_id', 'create_time', 'staff_id'], + '=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id'], 'between_time' => 'create_time', '%pipe_like%' => ['keyword' => 'order_sn'], ]; @@ -53,12 +53,15 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt $field = [ 'id', 'order_id', 'order_sn', 'create_time', 'other_uid', 'user_id', 'store_id', 'staff_id', 'financial_type', 'financial_pm', 'pay_type', 'type', 'number', 'status' ]; - $this->searchWhere[] = ['financial_type', '=', 1]; - $this->searchWhere[] = ['financial_pm', '=', 1]; + if($this->request->get('order_id')){ + $order=['financial_pm'=>'desc']; + }else{ + $order=['id'=>'desc']; + } $data = StoreFinanceFlow::where($this->searchWhere) ->field($field) ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) + ->order($order) ->select()->each(function ($item) { if ($item['user_id'] <= 0) { $item['nickname'] = '游客';