参数为空校验

master
pikachu 2021-05-20 19:09:21 +08:00
parent 63c559c8be
commit f625a7e056
1 changed files with 17 additions and 8 deletions

View File

@ -1826,14 +1826,17 @@ export default {
this.$Message.error("请上传商品图片"); this.$Message.error("请上传商品图片");
return; return;
} }
// if ( let flag = false;
// !this.baseInfoForm.storeCategoryPath || this.baseInfoForm.goodsParamsList.forEach((e)=> {
// !this.baseInfoForm.storeCategoryPath.length if(e.required === 1 && e.paramValue === null){
// ) { flag = true
// this.submitLoading = false; }
// this.$Message.error(""); });
// return; if(flag){
// } this.$Message.error("请填写参数信息 参数不能为空");
this.submitLoading = false;
return;
}
// 0 // 0
if (this.baseInfoForm.freightPayer !== "BUYER") { if (this.baseInfoForm.freightPayer !== "BUYER") {
this.baseInfoForm.templateId = 0; this.baseInfoForm.templateId = 0;
@ -1852,6 +1855,12 @@ export default {
(i) => i.url (i) => i.url
); );
} }
/** 参数校验 **/
/* Object.keys(this.baseInfoForm.goodsParamsList).forEach((item) => {
console.warn(item.paramName)
});*/
if (this.goodsId) { if (this.goodsId) {
API_GOODS.editGoods(this.goodsId, this.baseInfoForm).then((res) => { API_GOODS.editGoods(this.goodsId, this.baseInfoForm).then((res) => {