重置
- 提交
+ 提交
-
+
@@ -35,6 +35,15 @@
+
+
+
@@ -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;
}