From 1aa47576c53b6705598d58fc07e23340171b3c69 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 19 Mar 2024 17:12:54 +0800 Subject: [PATCH] update --- app/adminapi/lists/quotation/QuotationLists.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/adminapi/lists/quotation/QuotationLists.php b/app/adminapi/lists/quotation/QuotationLists.php index be7f5ccdc..65fa901e6 100644 --- a/app/adminapi/lists/quotation/QuotationLists.php +++ b/app/adminapi/lists/quotation/QuotationLists.php @@ -57,14 +57,8 @@ class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface, */ public function lists(): array { - $params = $this->request->get(['custom_name']); - $where = []; - if(isset($params['custom_name']) && $params['custom_name'] != ''){ - $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); - $where[] = ['custom_id','in',$custom_ids]; - } return Quotation::field('id,custom_id,code,quotation_date,create_user,invoice_type,freight,other_fee,customer_require,remark') - ->where($this->searchWhere)->where($where)->limit($this->limitOffset, $this->limitLength) + ->where($this->searchWhere)->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($item){ $custom = Custom::field('name,master_name,master_phone')->where('id',$item['custom_id'])->findOrEmpty(); @@ -88,13 +82,7 @@ class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface, */ public function count(): int { - $params = $this->request->get(['custom_name']); - $where = []; - if(isset($params['custom_name']) && $params['custom_name'] != ''){ - $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); - $where[] = ['custom_id','in',$custom_ids]; - } - return Quotation::where($this->searchWhere)->where($where)->count(); + return Quotation::where($this->searchWhere)->count(); } public function setFileName(): string