参数为空校验

master
pikachu 2021-05-20 19:14:38 +08:00
parent f625a7e056
commit 3c0555c815
1 changed files with 4 additions and 2 deletions

View File

@ -1827,13 +1827,15 @@ export default {
return;
}
let flag = false;
let paramValue = "";
this.baseInfoForm.goodsParamsList.forEach((e)=> {
if(e.required === 1 && e.paramValue === null){
if(e.required === 1 && e.paramValue === null || e.paramValue === undefined){
flag = true
paramValue = e.paramName
}
});
if(flag){
this.$Message.error("请填写参数信息 参数不能为空");
this.$Message.error(paramValue +" 参数不能为空");
this.submitLoading = false;
return;
}