diff --git a/src/views/bl/massage/massagePackage.vue b/src/views/bl/massage/massagePackage.vue index 25867de..124aad6 100644 --- a/src/views/bl/massage/massagePackage.vue +++ b/src/views/bl/massage/massagePackage.vue @@ -2052,38 +2052,40 @@ export default { }, handleAddMassage(){ - var list = this.detailTableData.list; - var fwxmtype = this.fwxmtype; - if(fwxmtype==104){ - this.title = ""; - this.status = 1; - this.sales = "0"; - this.price = ""; - this.oldPrice = ""; - this.massageTypeId = ""; - this.massageImg = ""; - this.isSex = 0; - this.duration = ""; - this.applyPeople = ""; - this.contentImg = []; - this.content = ""; - this.city = ""; - this.labelsArr = []; - this.storeAddre = "请选择城市"; - this.type = ""; - this.jianjie = ""; - this.serviceCount = 1; - this.intervalDays = 0; - this.dialogFormVisibleAddMassage = true; - }else{ - this.$notify({ - title: "提示", - duration: 1800, - message: "只有【服务套餐】可以配置多条服务项目!", - type: "warning", - }); + if (list.length > 0) { + var fwxmtype = this.fwxmtype; + if(fwxmtype==104){ + }else{ + this.$notify({ + title: "提示", + duration: 1800, + message: "只有【服务套餐】可以配置多条服务项目!", + type: "warning", + }); + return ; + } } + this.title = ""; + this.status = 1; + this.sales = "0"; + this.price = ""; + this.oldPrice = ""; + this.massageTypeId = ""; + this.massageImg = ""; + this.isSex = 0; + this.duration = ""; + this.applyPeople = ""; + this.contentImg = []; + this.content = ""; + this.city = ""; + this.labelsArr = []; + this.storeAddre = "请选择城市"; + this.type = ""; + this.jianjie = ""; + this.serviceCount = 1; + this.intervalDays = 0; + this.dialogFormVisibleAddMassage = true; }, //提交新增服务项目 @@ -2253,22 +2255,24 @@ export default { }, showMassageView(){ - var list = this.detailTableData.list; var fwxmtype = this.fwxmtype; - if(fwxmtype==104){ - this.serviceCount = 1; - this.intervalDays = 0; - this.handleSelectMassage(); - this.dialogFormVisibleMassageList = true; - }else{ - this.$notify({ - title: "提示", - duration: 1800, - message: "只有【服务套餐】可以配置多条服务项目!", - type: "warning", - }); + if(list.length>0){ + if(fwxmtype==104){ + }else{ + this.$notify({ + title: "提示", + duration: 1800, + message: "只有【服务套餐】可以配置多条服务项目!", + type: "warning", + }); + return; + } } + this.serviceCount = 1; + this.intervalDays = 0; + this.handleSelectMassage(); + this.dialogFormVisibleMassageList = true; }, handleSelectMassage(){