From d5512ad8d38f8090508a8548062bdfb41aed006d Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Tue, 7 Jul 2026 14:37:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E9=85=8D=E4=BB=B6?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components.d.ts | 4 - src/components/rulesForm/index.vue | 18 ++ .../accessoryType/constant/edit.ts | 55 ++++ .../accessoryType/constant/index.ts | 5 + .../accessoryType/constant/rules.ts | 5 + .../accessoryType/constant/search.ts | 31 +++ .../accessoryType/constant/table.ts | 39 +++ .../productManagement/accessoryType/index.vue | 262 ++++++++++++++++++ .../compatibility/list/constant/edit.ts | 108 ++++++++ .../compatibility/list/constant/index.ts | 5 + .../compatibility/list/constant/rules.ts | 5 + .../compatibility/list/constant/search.ts | 36 +++ .../compatibility/list/constant/table.ts | 75 +++++ .../compatibility/list/index.vue | 262 ++++++++++++++++++ .../productManagement/list/constant/form.ts | 87 ++++++ .../productManagement/list/constant/index.ts | 16 +- .../list/constant/ruleForm.ts | 2 + .../productManagement/list/constant/rules.ts | 7 + src/views/productManagement/list/edit.vue | 42 ++- .../list/utils/edit/submit.ts | 18 +- 20 files changed, 1061 insertions(+), 21 deletions(-) create mode 100644 src/views/productManagement/accessoryType/constant/edit.ts create mode 100644 src/views/productManagement/accessoryType/constant/index.ts create mode 100644 src/views/productManagement/accessoryType/constant/rules.ts create mode 100644 src/views/productManagement/accessoryType/constant/search.ts create mode 100644 src/views/productManagement/accessoryType/constant/table.ts create mode 100644 src/views/productManagement/accessoryType/index.vue create mode 100644 src/views/productManagement/compatibility/list/constant/edit.ts create mode 100644 src/views/productManagement/compatibility/list/constant/index.ts create mode 100644 src/views/productManagement/compatibility/list/constant/rules.ts create mode 100644 src/views/productManagement/compatibility/list/constant/search.ts create mode 100644 src/views/productManagement/compatibility/list/constant/table.ts create mode 100644 src/views/productManagement/compatibility/list/index.vue create mode 100644 src/views/productManagement/list/constant/form.ts create mode 100644 src/views/productManagement/list/constant/ruleForm.ts create mode 100644 src/views/productManagement/list/constant/rules.ts diff --git a/src/components.d.ts b/src/components.d.ts index 207249a..5849469 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,11 +12,8 @@ declare module "vue" { ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"]; ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"]; ElButton: typeof import("element-plus/es")["ElButton"]; - ElCarousel: typeof import("element-plus/es")["ElCarousel"]; - ElCarouselItem: typeof import("element-plus/es")["ElCarouselItem"]; ElCheckbox: typeof import("element-plus/es")["ElCheckbox"]; ElCheckboxGroup: typeof import("element-plus/es")["ElCheckboxGroup"]; - ElColorPicker: typeof import("element-plus/es")["ElColorPicker"]; ElContainer: typeof import("element-plus/es")["ElContainer"]; ElDatePicker: typeof import("element-plus/es")["ElDatePicker"]; ElDialog: typeof import("element-plus/es")["ElDialog"]; @@ -38,7 +35,6 @@ declare module "vue" { ElOption: typeof import("element-plus/es")["ElOption"]; ElPagination: typeof import("element-plus/es")["ElPagination"]; ElRadio: typeof import("element-plus/es")["ElRadio"]; - ElRadioButton: typeof import("element-plus/es")["ElRadioButton"]; ElRadioGroup: typeof import("element-plus/es")["ElRadioGroup"]; ElScrollbar: typeof import("element-plus/es")["ElScrollbar"]; ElSelect: typeof import("element-plus/es")["ElSelect"]; diff --git a/src/components/rulesForm/index.vue b/src/components/rulesForm/index.vue index fa7293b..bfb52f6 100644 --- a/src/components/rulesForm/index.vue +++ b/src/components/rulesForm/index.vue @@ -149,6 +149,24 @@ /> + + + + + @@ -43,6 +52,9 @@ diff --git a/src/views/productManagement/list/utils/edit/submit.ts b/src/views/productManagement/list/utils/edit/submit.ts index ac685e7..e0367bf 100644 --- a/src/views/productManagement/list/utils/edit/submit.ts +++ b/src/views/productManagement/list/utils/edit/submit.ts @@ -5,10 +5,12 @@ const WARN: any = { name: "产品名称不能为空 !", spu: "型号不能为空 !", category_id: "产品分类不能为空 !", - sort: "产品排序不能为空 !" + sort: "产品排序不能为空 !", + tag: "关联标签不能为空 !", + className: "产品系列名不能为空 !" }; //警告 -const warnFunction = (data: any) => { +const warnFunction = (data: any, data1: any) => { if (!data.name) { useMsg("warning", WARN["name"]); return false; @@ -25,6 +27,14 @@ const warnFunction = (data: any) => { useMsg("warning", WARN["sort"]); return false; } + if (!data1.tag) { + useMsg("warning", WARN["tag"]); + return false; + } + if (data1.is_show && !data1.className) { + useMsg("warning", WARN["className"]); + return false; + } return true; }; @@ -36,8 +46,8 @@ const getProductEditUp = async (params: any) => { // montageImg(imgInfoRef); } }; -export const handleSubmit = async (infoRef: any, imgInfoRef: any, dataStore: any) => { - let is = await warnFunction(infoRef.ruleForm); +export const handleSubmit = async (infoRef: any, imgInfoRef: any, formRef: any, dataStore: any) => { + let is = await warnFunction(infoRef.ruleForm, formRef.ruleForm); if (!is) { return false; }