From 9e4a84822a28e1acbc2780dabd2a30e2e13faf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=A1=E9=92=B1?= Date: Fri, 7 Mar 2025 14:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=B1=9E=E6=80=A7=EF=BC=8C=E6=95=85?= =?UTF-8?q?=E9=9A=9C=EF=BC=8C=E9=83=A8=E4=BD=8D=E9=9B=86=E6=88=90=E5=88=B0?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E7=B1=BB=E9=87=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductCategoryFaultForm.vue | 12 ++++++++---- .../category/erpproductcategoryfault/index.vue | 14 ++++++++++++-- src/views/erp/product/category/index.vue | 15 +++++++++++++-- .../ProductCategoryPartForm.vue | 13 ++++++++----- .../category/productcategorypart/index.vue | 13 +++++++++++-- .../ProductCategoryPropertiesForm.vue | 2 +- .../category/productcategoryproperties/index.vue | 8 +++++--- 7 files changed, 58 insertions(+), 19 deletions(-) diff --git a/src/views/erp/product/category/erpproductcategoryfault/ProductCategoryFaultForm.vue b/src/views/erp/product/category/erpproductcategoryfault/ProductCategoryFaultForm.vue index 061350c2d..181597288 100644 --- a/src/views/erp/product/category/erpproductcategoryfault/ProductCategoryFaultForm.vue +++ b/src/views/erp/product/category/erpproductcategoryfault/ProductCategoryFaultForm.vue @@ -9,7 +9,7 @@ > - + @@ -73,8 +73,10 @@ import { ProductCategoryVO } from '@/api/erp/product/category' import { ProductCategoryPartApi, ProductCategoryPartVO} from '@/api/erp/product/category/productcategorypart' /** 从父组件取productCategoryList数组*/ -defineProps<{ +const props = defineProps<{ productCategoryList: ProductCategoryVO[] + productCategoryId: number + } >(); @@ -97,7 +99,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ id: undefined, - productCategoryId: undefined, + productCategoryId: null as number | null, productFaultPart: undefined, productFault: undefined, ifAffectSale: undefined, @@ -120,6 +122,8 @@ const open = async (type: string, id?: number) => { dialogTitle.value = t('action.' + type) formType.value = type resetForm() + formData.value.productCategoryId = props.productCategoryId + // 修改时,设置数据 if (id) { formLoading.value = true @@ -167,7 +171,7 @@ const submitForm = async () => { const resetForm = () => { formData.value = { id: undefined, - productCategoryId: undefined, + productCategoryId: null as number | null, productFaultPart: undefined, productFault: undefined, ifAffectSale: undefined, diff --git a/src/views/erp/product/category/erpproductcategoryfault/index.vue b/src/views/erp/product/category/erpproductcategoryfault/index.vue index 5bf7b5e87..8adb915f2 100644 --- a/src/views/erp/product/category/erpproductcategoryfault/index.vue +++ b/src/views/erp/product/category/erpproductcategoryfault/index.vue @@ -12,6 +12,7 @@ @@ -215,7 +216,7 @@ - +