From 0218eb3d2e9b2cf06dafb53454b10766eebf0ac9 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 10 Oct 2024 17:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=93=E5=BA=93=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=97=E8=A1=A8=E4=B8=AD=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当供应商ID为空时,确保供应商名称字段清空,避免显示错误的信息。 --- app/admin/lists/warehouse_order/WarehouseOrderLists.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/admin/lists/warehouse_order/WarehouseOrderLists.php b/app/admin/lists/warehouse_order/WarehouseOrderLists.php index df831b171..01d3774df 100644 --- a/app/admin/lists/warehouse_order/WarehouseOrderLists.php +++ b/app/admin/lists/warehouse_order/WarehouseOrderLists.php @@ -76,6 +76,8 @@ class WarehouseOrderLists extends BaseAdminDataLists implements ListsSearchInter } if ($item->supplier_id) { $item->supplier_name = Supplier::where('id', $item->supplier_id)->value('mer_name'); + }else{ + $item->supplier_name = ''; } }) ->toArray();