From 5ba8e9fd35948ad8b50aec6ec019bdfed3295bb8 Mon Sep 17 00:00:00 2001 From: dy-hu Date: Tue, 25 Jun 2024 15:20:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=96=B0=E5=A2=9E=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=A7=84=E6=A0=BC=E5=BF=85=E5=A1=AB=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/commodity/commoditySystem/addCommodity.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/commodity/commoditySystem/addCommodity.vue b/src/views/commodity/commoditySystem/addCommodity.vue index a35cea9..13fb226 100644 --- a/src/views/commodity/commoditySystem/addCommodity.vue +++ b/src/views/commodity/commoditySystem/addCommodity.vue @@ -636,6 +636,15 @@ export default { return objClone }, async doSave() { + if (this.form.skus.length === 1) { + if (this.form.skus[0].skuAttrCodeDTOList.length === 0) { + this.$message({ + message: '请编辑规格', + type: 'warning' + }) + return false + } + } this.form.skus.forEach(element => { //设置单多款式--默认多款式 element.style = this.form.attrStyle @@ -645,6 +654,13 @@ export default { }) for (let i = 0; i < this.form.skus.length; i++) { let skuItem = this.form.skus[i]; + if (skuItem.skuAttrCodeDTOList[0].code === '') { + this.$message({ + message: '请编辑规格', + type: 'warning' + }) + return false + } if (skuItem.rate === '' || skuItem.rate === null || skuItem.rate === undefined) { this.$message({ message: '税率不能为空',