参数为空校验
parent
63c559c8be
commit
f625a7e056
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue