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 1/2] =?UTF-8?q?=E5=9C=A8=E9=A2=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E4=BF=A1=E6=81=AF=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=A2=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, From c05b791dd685d18fcacb6d4b11f4b05b7dbde335 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 15 Oct 2024 13:10:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=84=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=9B=E5=BB=BA=E6=97=B6=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E9=97=A8=E5=BA=97ID=E5=AF=BC=E8=87=B4=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在创建预售订单的逻辑中,添加了门店ID(store_id)作为新订单的属性。此修改解决了在生成新订单时由于缺少门店ID而导致的错误。 --- app/admin/logic/beforehand_order/BeforehandOrderLogic.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index cd3bd8c7e..d5adddd36 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -377,6 +377,7 @@ class BeforehandOrderLogic extends BaseLogic $order = BeforehandOrder::create([ 'order_id' => getNewOrderId('YG'), 'order_sn' => $order['order_id'], + 'store_id' => $order['store_id'], 'admin_id' => $params['admin_id'] ?? 0, 'uid' => $uid, 'total_num' => $total_num,