浏览代码

修改设置排课数为空时

lex-xin 4 年之前
父节点
当前提交
960a8ea8c8
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/views/buildVip/index.vue

+ 4 - 3
src/views/buildVip/index.vue

@@ -817,7 +817,7 @@ export default {
         this.giveNum = giveNum || 0;
 
         return parseInt(offline) + parseInt(online) + "+" + giveNum || "";
-      } else if(this.hotType == 'DISCOUNT') {
+      } else if(this.hotType == 'DISCOUNT' && this.attribute3) {
         return parseInt(this.attribute3)
       }
       return parseInt(offline) + parseInt(online) || "";
@@ -870,7 +870,8 @@ export default {
     },
     onCourseNumChange(type) {
       let centerForm = this.centerForm
-      if(this.hotType == 'DISCOUNT') {
+      // 折扣类型,并且设置的排课数有值
+      if(this.hotType == 'DISCOUNT' && this.attribute3) {
         // 判断线上或线下总和等于排课次数
         console.log((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)), this.attribute3)
         if((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)) > this.attribute3) {
@@ -1657,7 +1658,7 @@ export default {
         if (vali) {
 
           let centerForm = this.centerForm
-          if(this.hotType == 'DISCOUNT') {
+          if(this.hotType == 'DISCOUNT' && this.attribute3) {
             // 判断线上或线下总和大于排课次数
             if((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)) != this.attribute3) {
               this.$message.error('线上课数加线下课数必须等于待排课数')