src/views/productManage/product/components/UnitMoreDialog.vue
@@ -216,13 +216,28 @@ handleConfirmSave() { this.$refs.form.validate((valid) => { if (valid) { this.shutdown() let iscontinue=false; for(let i in this.form.formList){ if(this.form.formList[i].unit){ iscontinue=true; break; } } if(!iscontinue){ this.$message.error('请至少填写一项!') return true } this.$emit('saveUnitMore',this.form.formList) this.editDialogVisible = false; } }) }, shutdown() { if(this.editDialogVisible){ this.$emit('cancelUnitMore') } this.editDialogVisible = false; }, }, };