From 96e09786f184b6c2ef91c968298ba32bac67d5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=A1=E9=92=B1?= Date: Tue, 11 Mar 2025 17:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E4=BD=93?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/product/product/index.ts | 6 + .../product/productpropertiesmap/index.ts | 43 ++++ .../ProductCategoryPropertiesForm.vue | 4 +- .../productcategoryproperties/index.vue | 6 +- ...oductCategoryPropertiesCategoryMapForm.vue | 4 +- .../category/propertiescategorymap/index.vue | 21 +- .../product/product/ProductPropertiesForm.vue | 108 +++++++++ src/views/erp/product/product/index.vue | 21 +- .../ProductPropertiesMapForm.vue | 166 +++++++++++++ .../product/productpropertiesmap/index.vue | 218 ++++++++++++++++++ 10 files changed, 582 insertions(+), 15 deletions(-) create mode 100644 src/api/erp/product/product/productpropertiesmap/index.ts create mode 100644 src/views/erp/product/product/ProductPropertiesForm.vue create mode 100644 src/views/erp/product/product/productpropertiesmap/ProductPropertiesMapForm.vue create mode 100644 src/views/erp/product/product/productpropertiesmap/index.vue diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts index 1136282f2..f550aa960 100644 --- a/src/api/erp/product/product/index.ts +++ b/src/api/erp/product/product/index.ts @@ -53,5 +53,11 @@ export const ProductApi = { // 导出产品 Excel exportProduct: async (params) => { return await request.download({ url: `/erp/product/export-excel`, params }) + }, + + //通过产品分类id查询产品list + getProductListByCategoryIds: async (productCategoryIds: number[]) => { + return await request.get({ url: `/erp/product/simple-list-by-category-ids`, params: { productCategoryIds } }) + } } diff --git a/src/api/erp/product/product/productpropertiesmap/index.ts b/src/api/erp/product/product/productpropertiesmap/index.ts new file mode 100644 index 000000000..0629008f1 --- /dev/null +++ b/src/api/erp/product/product/productpropertiesmap/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +// ERP 产品属性映射 VO +export interface ProductPropertiesMapVO { + id: number // 编号 + productId: number // 产品id + productCategoryPropertiesId: number // 产品类别属性id + productPropertiesProductId: number // 产品属性产品id + productCategoryPropertiesValue: string // 产品类别属性值 +} + +// ERP 产品属性映射 API +export const ProductPropertiesMapApi = { + // 查询ERP 产品属性映射分页 + getProductPropertiesMapPage: async (params: any) => { + return await request.get({ url: `/erp/product-properties-map/page`, params }) + }, + + // 查询ERP 产品属性映射详情 + getProductPropertiesMap: async (id: number) => { + return await request.get({ url: `/erp/product-properties-map/get?id=` + id }) + }, + + // 新增ERP 产品属性映射 + createProductPropertiesMap: async (data: ProductPropertiesMapVO) => { + return await request.post({ url: `/erp/product-properties-map/create`, data }) + }, + + // 修改ERP 产品属性映射 + updateProductPropertiesMap: async (data: ProductPropertiesMapVO) => { + return await request.put({ url: `/erp/product-properties-map/update`, data }) + }, + + // 删除ERP 产品属性映射 + deleteProductPropertiesMap: async (id: number) => { + return await request.delete({ url: `/erp/product-properties-map/delete?id=` + id }) + }, + + // 导出ERP 产品属性映射 Excel + exportProductPropertiesMap: async (params) => { + return await request.download({ url: `/erp/product-properties-map/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/views/erp/product/category/productcategoryproperties/ProductCategoryPropertiesForm.vue b/src/views/erp/product/category/productcategoryproperties/ProductCategoryPropertiesForm.vue index d317e7f37..9a5002c74 100644 --- a/src/views/erp/product/category/productcategoryproperties/ProductCategoryPropertiesForm.vue +++ b/src/views/erp/product/category/productcategoryproperties/ProductCategoryPropertiesForm.vue @@ -136,7 +136,7 @@ const formData = ref({ productPropertiesCn: undefined, ifRequired: undefined, productPropertiesCategory: undefined, - ifSn: undefined + ifSn: false }) const formRules = reactive({ productCategoryId: [{ required: true, message: '类别属性不能为空', trigger: 'change' }], @@ -204,7 +204,7 @@ const resetForm = () => { productPropertiesCn: undefined, ifRequired: undefined, productPropertiesCategory: undefined, - ifSn: undefined + ifSn: false } formRef.value?.resetFields() } diff --git a/src/views/erp/product/category/productcategoryproperties/index.vue b/src/views/erp/product/category/productcategoryproperties/index.vue index 288df31f8..de2e1cf7b 100644 --- a/src/views/erp/product/category/productcategoryproperties/index.vue +++ b/src/views/erp/product/category/productcategoryproperties/index.vue @@ -168,7 +168,7 @@ \ No newline at end of file diff --git a/src/views/erp/product/product/index.vue b/src/views/erp/product/product/index.vue index 16b0bfee7..bb713101a 100644 --- a/src/views/erp/product/product/index.vue +++ b/src/views/erp/product/product/index.vue @@ -98,8 +98,16 @@ :formatter="dateFormatter" width="180px" /> - + \ No newline at end of file diff --git a/src/views/erp/product/product/productpropertiesmap/index.vue b/src/views/erp/product/product/productpropertiesmap/index.vue new file mode 100644 index 000000000..40f534694 --- /dev/null +++ b/src/views/erp/product/product/productpropertiesmap/index.vue @@ -0,0 +1,218 @@ + + + \ No newline at end of file