From 597554b854bf90706a3832094c01d7a0f026475b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 14 Nov 2024 17:57:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E9=87=87=E8=B4=AD=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E6=8A=A5=E4=BB=B7=E5=8D=95=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=A2=E5=8D=95=E7=BC=96=E5=8F=B7=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 PurchaseProductOfferLists 类中添加订单编号模糊搜索逻辑 - 通过获取请求参数 order_sn,查询匹配的订单 ID 列表 - 将匹配的订单 ID 添加到搜索条件中,实现模糊搜索功能 --- .../purchase_product_offer/PurchaseProductOfferLists.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php b/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php index 1844286e2..5d72a652f 100644 --- a/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php +++ b/app/admin/lists/purchase_product_offer/PurchaseProductOfferLists.php @@ -59,6 +59,12 @@ class PurchaseProductOfferLists extends BaseAdminDataLists implements ListsSearc } } $job_ids=$this->adminInfo['job_ids']??[]; + if($this->request->get('order_sn')){ + $ids=BeforehandOrder::where('order_id','like','%'.$this->request->get('order_sn'))->column('id'); + if($ids){ + $this->searchWhere[]=['order_id','in',$ids]; + } + } return PurchaseProductOffer::where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc'])