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; }