|
@@ -1129,7 +1129,7 @@ export default {
|
|
|
this.resetFormData();
|
|
|
this.rulesThis = this.rules;
|
|
|
await this.resetForm();
|
|
|
-
|
|
|
+ this.good_type_change();
|
|
|
this.loading = false;
|
|
|
},
|
|
|
number_change(e, key) {
|
|
@@ -1153,6 +1153,8 @@ export default {
|
|
|
this.ladder_tableData.splice(index, 1);
|
|
|
},
|
|
|
async submitForm() {
|
|
|
+ this.sch_is_noble();
|
|
|
+ this.good_type_change();
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
@@ -1242,6 +1244,7 @@ export default {
|
|
|
this.$emit("refresh", { spuCode: spuCode });
|
|
|
}
|
|
|
} else {
|
|
|
+ console.log(valid);
|
|
|
console.log("error submit!!");
|
|
|
return false;
|
|
|
}
|
|
@@ -1557,11 +1560,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- let exclusiveList=[]
|
|
|
- if(exclusive&&exclusive.length>0){
|
|
|
- exclusive.forEach((a,ai)=>{
|
|
|
- exclusiveList.push(a.id)
|
|
|
- })
|
|
|
+ let exclusiveList = [];
|
|
|
+ if (exclusive && exclusive.length > 0) {
|
|
|
+ exclusive.forEach((a, ai) => {
|
|
|
+ exclusiveList.push(a.id);
|
|
|
+ });
|
|
|
}
|
|
|
this.is_noble = isok;
|
|
|
this.sch_is_noble();
|
|
@@ -1656,7 +1659,6 @@ export default {
|
|
|
config: config ? config.split(",") : [],
|
|
|
other_config: other_config || "",
|
|
|
};
|
|
|
- this.good_type_change();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -1670,7 +1672,9 @@ export default {
|
|
|
"other_config",
|
|
|
];
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
- this.rulesThis[list[i]].required = this.is_noble;
|
|
|
+ this.rulesThis[list[i]][0].required = this.is_noble;
|
|
|
+ console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
|
|
|
+ this.$refs.ruleForm.validateField(list[i]);
|
|
|
}
|
|
|
},
|
|
|
setModel(model, type) {
|
|
@@ -1847,7 +1851,9 @@ export default {
|
|
|
good_type_change() {
|
|
|
let list = ["moq", "customized"];
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
- this.rulesThis[list[i]].required = this.ruleForm.good_type === "1";
|
|
|
+ this.rulesThis[list[i]][0].required = this.ruleForm.good_type === "1";
|
|
|
+ console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
|
|
|
+ this.$refs.ruleForm.validateField(list[i]);
|
|
|
}
|
|
|
},
|
|
|
//图片上传失败
|