From 850c06df402ded15e6d79b6eec52e6b971d69915 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 7 Feb 2025 17:46:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E4=BF=AE=E5=A4=8D=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E4=BA=A7=E5=93=81=E6=90=9C=E7=B4=A2=E6=9C=AA=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E8=BD=AF=E5=88=A0=E9=99=A4=E5=95=86=E5=93=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在产品名称和条形码搜索中添加 withTrashed() 方法 - 确保软删除的商品也能在仓库产品搜索结果中显示 --- app/admin/lists/warehouse_product/WarehouseProductLists.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/lists/warehouse_product/WarehouseProductLists.php b/app/admin/lists/warehouse_product/WarehouseProductLists.php index c951120b3..ec0fe5d90 100644 --- a/app/admin/lists/warehouse_product/WarehouseProductLists.php +++ b/app/admin/lists/warehouse_product/WarehouseProductLists.php @@ -54,7 +54,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt { if ($this->request->get('product_id')) { $product_id = $this->request->get('product_id'); - $ids = StoreProduct::where('store_name', 'like', '%' . $product_id . '%')->column('id'); + $ids = StoreProduct::where('store_name', 'like', '%' . $product_id . '%')->withTrashed()->column('id'); if ($ids) { $this->searchWhere[] = ['product_id', 'in', $ids]; $this->ids = $ids; @@ -64,7 +64,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt } if ($this->request->get('bar_code')) { $bar_code = $this->request->get('bar_code'); - $ids = StoreProduct::where('bar_code', 'like', '%' . $bar_code . '%')->column('id'); + $ids = StoreProduct::where('bar_code', 'like', '%' . $bar_code . '%')->withTrashed()->column('id'); if ($ids) { $this->searchWhere[] = ['product_id', 'in', $ids]; $this->ids = $ids;