From f625a7e056114adc185dd88ee64d2c7b722af492 Mon Sep 17 00:00:00 2001 From: pikachu <1321288662@qq.com> Date: Thu, 20 May 2021 19:09:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=BA=E7=A9=BA=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperation.vue | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index 948b3ae6..dd865821 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -1826,14 +1826,17 @@ export default { this.$Message.error("请上传商品图片"); return; } - // if ( - // !this.baseInfoForm.storeCategoryPath || - // !this.baseInfoForm.storeCategoryPath.length - // ) { - // this.submitLoading = false; - // this.$Message.error("请选择店内分类"); - // return; - // } + let flag = false; + this.baseInfoForm.goodsParamsList.forEach((e)=> { + if(e.required === 1 && e.paramValue === null){ + flag = true + } + }); + if(flag){ + this.$Message.error("请填写参数信息 参数不能为空"); + this.submitLoading = false; + return; + } //如果选择的是卖家承担运费 则运费模板重置为0 if (this.baseInfoForm.freightPayer !== "BUYER") { this.baseInfoForm.templateId = 0; @@ -1852,6 +1855,12 @@ export default { (i) => i.url ); } + /** 参数校验 **/ + /* Object.keys(this.baseInfoForm.goodsParamsList).forEach((item) => { + console.warn(item.paramName) + });*/ + + if (this.goodsId) { API_GOODS.editGoods(this.goodsId, this.baseInfoForm).then((res) => {