From 5211f818fc008bb6cd99b0519f53220f4ab252d6 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Tue, 25 Aug 2026 22:59:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B6=E8=B4=A7=E5=8D=95=E6=9C=AA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=B4=A7=E4=B8=BB=E6=97=B6=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=95=86=E5=93=81=E5=B9=B6=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/storage/receiving/component/Product.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/storage/receiving/component/Product.vue b/src/views/storage/receiving/component/Product.vue index 9eb76818..0e8f595f 100644 --- a/src/views/storage/receiving/component/Product.vue +++ b/src/views/storage/receiving/component/Product.vue @@ -2389,6 +2389,12 @@ const openAddDrawer = (row?: any) => { showReadOnlyTip() return } + // 收货单未设置货主时不允许创建商品 + const receivingStoreId = Number(props.row?.store_id ?? props.row?.store?.id) + if (!Number.isFinite(receivingStoreId) || receivingStoreId <= 0) { + ElMessage.warning('请先设置收货单货主') + return + } // row here is product row, but store info comes from parent receiving row (props.row) addDrawerStore.value = props.row?.store || { id: props.row?.store_id, name: props.row?.store_name } if (row) {