From 9a589d531a76943f2739081dab1e5ab8629d84d0 Mon Sep 17 00:00:00 2001 From: ck-chenkang Date: Mon, 22 Jun 2026 17:30:26 +0800 Subject: [PATCH] fix: simplify bit sample product form --- src/views/erp/bitwms/sample/index.vue | 8 +- src/views/erp/product/product/ProductForm.vue | 105 ++++++++++++++---- 2 files changed, 86 insertions(+), 27 deletions(-) diff --git a/src/views/erp/bitwms/sample/index.vue b/src/views/erp/bitwms/sample/index.vue index 57fa9fa2..cc380f78 100644 --- a/src/views/erp/bitwms/sample/index.vue +++ b/src/views/erp/bitwms/sample/index.vue @@ -129,13 +129,15 @@ const loadSampleLabel = async (id: number) => await BitWmsApi.getSampleLabel(id) const openProductForm = async (type: 'create' | 'update' | 'detail', id?: number) => { formVisible.value = true await nextTick() - const defaultData = - type === 'create' + const defaultData = { + sampleMode: true, + ...(type === 'create' ? { isSample: true, bizUnit: 'BIT' } - : undefined + : {}) + } formRef.value.open(type, id, defaultData) } const openProductCreate = () => openProductForm('create') diff --git a/src/views/erp/product/product/ProductForm.vue b/src/views/erp/product/product/ProductForm.vue index 4d66fb59..279f8759 100644 --- a/src/views/erp/product/product/ProductForm.vue +++ b/src/views/erp/product/product/ProductForm.vue @@ -31,7 +31,7 @@ - + - + - + - + - + - + - + - + - + - + - + {{ t('common.yes') }} @@ -167,17 +167,17 @@ - + - + - +
{{ purchaseUnitConvertTipText }}
@@ -196,13 +196,13 @@
- +