From 86374c721ac6392cf2e0e7464e991d2726be6da1 Mon Sep 17 00:00:00 2001 From: weiz Date: Sat, 6 Jan 2024 14:06:10 +0800 Subject: [PATCH] update --- .../lists/bid/BidBuyBiddingDocumentLists.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php b/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php index 9ecfc6ab8..adc1adfed 100644 --- a/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php +++ b/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php @@ -60,7 +60,7 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear */ public function lists(): array { - $params = $this->request->get(['project_name','custom_name']); + $params = $this->request->get(['project_name','custom_name','custom_id']); $where = []; if(isset($params['project_name']) && $params['project_name'] != ''){ $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); @@ -71,6 +71,10 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); $where[] = ['project_id','in',$project_ids]; } + if(isset($params['custom_id']) && $params['custom_id'] != ''){ + $project_ids = Project::where('custom_id',$params['custom_id'])->column('id'); + $where[] = ['project_id','in',$project_ids]; + } return BidBuyBiddingDocument::field('id,org_id,dept_id,project_id,bid_decision_id,code,bid_document_no,invite_tenders_company_name,bid_company_name,buyer,amount,buy_date,bid_address') ->where($this->searchWhere)->where($where) ->limit($this->limitOffset, $this->limitLength) @@ -104,7 +108,7 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear */ public function count(): int { - $params = $this->request->get(['project_name','custom_name']); + $params = $this->request->get(['project_name','custom_name','custom_id']); $where = []; if(isset($params['project_name']) && $params['project_name'] != ''){ $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); @@ -115,6 +119,10 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); $where[] = ['project_id','in',$project_ids]; } + if(isset($params['custom_id']) && $params['custom_id'] != ''){ + $project_ids = Project::where('custom_id',$params['custom_id'])->column('id'); + $where[] = ['project_id','in',$project_ids]; + } return BidBuyBiddingDocument::where($this->searchWhere)->where($where)->count(); }