From f9759dbed9a131b6af2ed3bf8dc4fcb7b4920422 Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 26 Feb 2026 15:20:16 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E6=A8=A1=E5=85=B7=E5=87=BA?= =?UTF-8?q?=E5=BA=93-=E4=BB=93=E5=BA=93=E5=AD=97=E6=AE=B5=E5=9B=9E?= =?UTF-8?q?=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/moldget/MoldGetForm.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/mes/moldget/MoldGetForm.vue b/src/views/mes/moldget/MoldGetForm.vue index 5f3aefda..370c14df 100644 --- a/src/views/mes/moldget/MoldGetForm.vue +++ b/src/views/mes/moldget/MoldGetForm.vue @@ -150,6 +150,9 @@ const formRules = reactive({ ], outType: [ { required: true, message: t('MoldManagement.MoldGet.validatorOutTypeRequired'), trigger: 'blur' } + ], + warehouseId: [ + { required: true, message: t('MoldManagement.MoldGet.validatorItemWarehouseRequired'), trigger: 'change' } ] }) const disabled = computed(() => formType.value === 'detail') @@ -175,7 +178,12 @@ const open = async (type: string, id?: number) => { if (id) { formLoading.value = true try { - formData.value = await StockOutApi.getStockOut(id) + const data = await StockOutApi.getStockOut(id) + const itemWarehouseId = (data as any)?.items?.[0]?.warehouseId + formData.value = { + ...(data as any), + warehouseId: itemWarehouseId ?? (data as any)?.warehouseId + } } finally { formLoading.value = false }