From a5594083c7eadf47dc7344945c4a49e2c6b42aa5 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 15 Oct 2024 13:09:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E9=A2=84=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E4=BF=A1=E6=81=AF=E5=B9=B6=E4=BC=98=E5=8C=96=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=9B=E5=BB=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在预订单列表中增加系统仓库(system_store)信息,便于管理和查询 - 优化预订单创建逻辑,自动关联仓库信息,提高数据的准确性和完整性 --- app/admin/lists/beforehand_order/BeforehandOrderLists.php | 5 +++++ app/admin/logic/beforehand_order/BeforehandOrderLogic.php | 1 + 2 files changed, 6 insertions(+) diff --git a/app/admin/lists/beforehand_order/BeforehandOrderLists.php b/app/admin/lists/beforehand_order/BeforehandOrderLists.php index 47e7c0444..e34590092 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderLists.php @@ -8,6 +8,7 @@ use app\common\model\beforehand_order\BeforehandOrder; use app\common\lists\ListsSearchInterface; use app\common\model\auth\Admin; use app\common\model\purchase_product_offer\PurchaseProductOffer; +use app\common\model\system_store\SystemStore; /** * 预订单表列表 @@ -76,12 +77,16 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte } $item['warehousing']=''; $item['outbound']=''; + $item['system_store']=''; if($item['warehousing_id']>0){ $item->warehousing='已入库|'.$item['warehousing_id']; } if($item['outbound_id']>0){ $item->outbound='已出库|'.$item['outbound_id']; } + if($item['store_id']>0){ + $item->system_store=SystemStore::where(['id'=>$item['store_id']])->value('name'); + } }) ->toArray(); } diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 4cbb15542..cd3bd8c7e 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -68,6 +68,7 @@ class BeforehandOrderLogic extends BaseLogic $order = BeforehandOrder::create([ 'order_id' => getNewOrderId('YG'), 'admin_id' => $params['admin_id'] ?? 0, + 'store_id' => $params['store_id'] ?? 0, 'uid' => $uid, 'total_num' => $total_num, 'total_price' => $total_price,