From 04993bdf335f09fdfd570a4e30882329b3ec5c1f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 9 Jul 2024 11:23:43 +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=BB=9F?= =?UTF-8?q?=E8=AE=A1=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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php index c995516b6..4389f2667 100644 --- a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php +++ b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php @@ -20,7 +20,8 @@ use app\common\lists\ListsSearchInterface; use app\common\model\auth\Admin; use app\common\model\dept\Dept; - use app\common\model\financial\FinancialInvoice; +use app\common\model\dict\DictData; +use app\common\model\financial\FinancialInvoice; use app\common\model\financial\FinancialRefund; use app\common\model\financial\FinancialSettlement; use app\common\model\marketing\MarketingContract; @@ -62,11 +63,19 @@ */ public function lists(): array { - return MarketingContract::where($this->searchWhere)->where([ + $where=[ ['review_status','=', 1], ['contract_type','=',0], ['status','=',0] - ]) + ]; + $types=$this->request->get('type_value'); + if($types){ + $data=DictData::where('type_value',$types)->column('value'); + if($data){ + $where[]=['business_nature','in',$data]; + } + } + return MarketingContract::where($this->searchWhere)->where($where) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()