From d42b8150ca5eceaf5d5cc98fed62ffaa2a4018ec Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 24 Jul 2024 13:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0:=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=B9=B6=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=80=BB=E8=BE=91=E4=B8=AD=E7=9A=84=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cost_project/CostApprovedProjectLists.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php index 4389f2667..6f641f29c 100644 --- a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php +++ b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php @@ -63,19 +63,17 @@ use app\common\model\financial\FinancialInvoice; */ public function lists(): array { - $where=[ - ['review_status','=', 1], - ['contract_type','=',0], - ['status','=',0] - ]; + $this->searchWhere[]=['review_status','=', 1]; + $this->searchWhere[]=['contract_type','=', 0]; + $this->searchWhere[]=['status','=', 1]; $types=$this->request->get('type_value'); if($types){ $data=DictData::where('type_value',$types)->column('value'); if($data){ - $where[]=['business_nature','in',$data]; + $this->searchWhere[]=['business_nature','in',$data]; } } - return MarketingContract::where($this->searchWhere)->where($where) + return MarketingContract::where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() @@ -135,11 +133,7 @@ use app\common\model\financial\FinancialInvoice; */ public function count(): int { - return MarketingContract::where($this->searchWhere)->where([ - ['review_status','=', 1], - ['contract_type','=',0], - ['status','=',0] - ])->count(); + return MarketingContract::where($this->searchWhere)->count(); } public function setFileName(): string