|  | @@ -1,30 +1,31 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  |      <div class="btnWrap">
 | 
	
		
			
				|  |  | -      <el-button
 | 
	
		
			
				|  |  | -        v-permission="'vipGroupManage/addVipGroupStudents'"
 | 
	
		
			
				|  |  | -        @click="addStudentList"
 | 
	
		
			
				|  |  | -        type="primary"
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | -        新增学员
 | 
	
		
			
				|  |  | -      </el-button>
 | 
	
		
			
				|  |  | -      <el-button
 | 
	
		
			
				|  |  | -      style="margin-right:15px"
 | 
	
		
			
				|  |  | -        v-permission="'vipGroupManage/update'"
 | 
	
		
			
				|  |  | -        @click="expireVisible = true"
 | 
	
		
			
				|  |  | -        type="primary"
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | -        有效期调整
 | 
	
		
			
				|  |  | -      </el-button>
 | 
	
		
			
				|  |  | -                <el-popover placement="right" width="500" trigger="click">
 | 
	
		
			
				|  |  | -          <div class="popoverWrap">
 | 
	
		
			
				|  |  | -            <p>VIP退费规则:</p>
 | 
	
		
			
				|  |  | -            <p>预计课程单价*课时数-课程标准单价*已完成课时数)*0.8</p>
 | 
	
		
			
				|  |  | -          </div>
 | 
	
		
			
				|  |  | -            <el-button  type="primary" slot="reference">退学说明</el-button>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        </el-popover>
 | 
	
		
			
				|  |  | +      <div>
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          v-permission="'vipGroupManage/addVipGroupStudents'"
 | 
	
		
			
				|  |  | +          @click="addStudentList"
 | 
	
		
			
				|  |  | +          type="primary"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          新增学员
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          style="margin-right: 15px"
 | 
	
		
			
				|  |  | +          v-permission="'vipGroupManage/update'"
 | 
	
		
			
				|  |  | +          @click="expireVisible = true"
 | 
	
		
			
				|  |  | +          type="primary"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          有效期调整
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +      <el-popover placement="left" width="500" trigger="click">
 | 
	
		
			
				|  |  | +        <div class="popoverWrap">
 | 
	
		
			
				|  |  | +          <p>VIP退费规则:</p>
 | 
	
		
			
				|  |  | +          <p>预计课程单价*课时数-课程标准单价*已完成课时数)*0.8</p>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <el-button type="text" style="color: red"  icon="el-icon-question" slot="reference">退学说明</el-button>
 | 
	
		
			
				|  |  | +      </el-popover>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <div class="tableWrap">
 | 
	
	
		
			
				|  | @@ -163,7 +164,7 @@
 | 
	
		
			
				|  |  |                style="width: 90% !important"
 | 
	
		
			
				|  |  |                class="number-input"
 | 
	
		
			
				|  |  |                v-model="scope.row.onlineClassesUnitPrice"
 | 
	
		
			
				|  |  | -              :disabled='!vipDetail.musicTheory'
 | 
	
		
			
				|  |  | +              :disabled="!vipDetail.musicTheory"
 | 
	
		
			
				|  |  |                :controls="false"
 | 
	
		
			
				|  |  |                :min="0"
 | 
	
		
			
				|  |  |                placeholder="线上课单价"
 | 
	
	
		
			
				|  | @@ -178,7 +179,7 @@
 | 
	
		
			
				|  |  |                style="width: 90% !important"
 | 
	
		
			
				|  |  |                class="number-input"
 | 
	
		
			
				|  |  |                v-model="scope.row.offlineClassesUnitPrice"
 | 
	
		
			
				|  |  | -              :disabled='!vipDetail.musicTheory'
 | 
	
		
			
				|  |  | +              :disabled="!vipDetail.musicTheory"
 | 
	
		
			
				|  |  |                :controls="false"
 | 
	
		
			
				|  |  |                :min="0"
 | 
	
		
			
				|  |  |                placeholder="线下课单价"
 | 
	
	
		
			
				|  | @@ -364,7 +365,7 @@ import {
 | 
	
		
			
				|  |  |    recoverForStudent,
 | 
	
		
			
				|  |  |    findTeacherWithVipGroupOrganAndSubject,
 | 
	
		
			
				|  |  |    vipGroupManageUpdate,
 | 
	
		
			
				|  |  | -  getVipGroupDetail
 | 
	
		
			
				|  |  | +  getVipGroupDetail,
 | 
	
		
			
				|  |  |  } from "@/api/vipSeting";
 | 
	
		
			
				|  |  |  import { permission } from "@/utils/directivePage";
 | 
	
		
			
				|  |  |  export default {
 | 
	
	
		
			
				|  | @@ -440,7 +441,7 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        teacherList: [],
 | 
	
		
			
				|  |  | -      vipDetail:{}
 | 
	
		
			
				|  |  | +      vipDetail: {},
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
	
		
			
				|  | @@ -466,11 +467,11 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        );
 | 
	
		
			
				|  |  | -        getVipGroupDetail({ vipGroupId: id }).then((res) => {
 | 
	
		
			
				|  |  | -          if (res.code == 200) {
 | 
	
		
			
				|  |  | -            this.vipDetail = res.data
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +      getVipGroupDetail({ vipGroupId: id }).then((res) => {
 | 
	
		
			
				|  |  | +        if (res.code == 200) {
 | 
	
		
			
				|  |  | +          this.vipDetail = res.data;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      search() {
 | 
	
		
			
				|  |  |        this.rules.page = 1;
 | 
	
	
		
			
				|  | @@ -566,10 +567,10 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getList() {
 | 
	
		
			
				|  |  | -      console.log(this.id)
 | 
	
		
			
				|  |  | +      console.log(this.id);
 | 
	
		
			
				|  |  |        let search = this.maskForm.search || null;
 | 
	
		
			
				|  |  |        getHaveCourseBalanceStudents({
 | 
	
		
			
				|  |  | -        vipGroupId:this.id,
 | 
	
		
			
				|  |  | +        vipGroupId: this.id,
 | 
	
		
			
				|  |  |          organId: null,
 | 
	
		
			
				|  |  |          page: this.rules.page,
 | 
	
		
			
				|  |  |          rows: this.rules.limit,
 | 
	
	
		
			
				|  | @@ -578,10 +579,14 @@ export default {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  |            this.rules.total = res.data.total;
 | 
	
		
			
				|  |  |            this.maskStudentList = res.data.rows;
 | 
	
		
			
				|  |  | -          this.maskStudentList.forEach(stu=>{
 | 
	
		
			
				|  |  | -            stu.offlineClassesUnitPrice?stu.offlineClassesUnitPrice:stu.offlineClassesUnitPrice = this.vipDetail?.offlineClassesUnitPrice
 | 
	
		
			
				|  |  | -            stu.onlineClassesUnitPrice?stu.onlineClassesUnitPrice:stu.onlineClassesUnitPrice =this.vipDetail?.onlineClassesUnitPrice
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | +          this.maskStudentList.forEach((stu) => {
 | 
	
		
			
				|  |  | +            stu.offlineClassesUnitPrice
 | 
	
		
			
				|  |  | +              ? stu.offlineClassesUnitPrice
 | 
	
		
			
				|  |  | +              : (stu.offlineClassesUnitPrice = this.vipDetail?.offlineClassesUnitPrice);
 | 
	
		
			
				|  |  | +            stu.onlineClassesUnitPrice
 | 
	
		
			
				|  |  | +              ? stu.onlineClassesUnitPrice
 | 
	
		
			
				|  |  | +              : (stu.onlineClassesUnitPrice = this.vipDetail?.onlineClassesUnitPrice);
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |            this.maskVisible = true;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
	
		
			
				|  | @@ -594,23 +599,25 @@ export default {
 | 
	
		
			
				|  |  |          this.$message.error("请选择一名学生");
 | 
	
		
			
				|  |  |          return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      let offlineClassesUnitPrice,onlineClassesUnitPrice;
 | 
	
		
			
				|  |  | -      this.maskStudentList.forEach(stu=>{
 | 
	
		
			
				|  |  | -        if(stu.id == this.activeStudent){
 | 
	
		
			
				|  |  | -          offlineClassesUnitPrice = stu.offlineClassesUnitPrice
 | 
	
		
			
				|  |  | -          onlineClassesUnitPrice = stu.onlineClassesUnitPrice
 | 
	
		
			
				|  |  | +      let offlineClassesUnitPrice, onlineClassesUnitPrice;
 | 
	
		
			
				|  |  | +      this.maskStudentList.forEach((stu) => {
 | 
	
		
			
				|  |  | +        if (stu.id == this.activeStudent) {
 | 
	
		
			
				|  |  | +          offlineClassesUnitPrice = stu.offlineClassesUnitPrice;
 | 
	
		
			
				|  |  | +          onlineClassesUnitPrice = stu.onlineClassesUnitPrice;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |        // if(!offlineClassesUnitPrice || !onlineClassesUnitPrice){
 | 
	
		
			
				|  |  |        //     this.$message.error("请填写线上课单价或线下课单价");
 | 
	
		
			
				|  |  |        //   return
 | 
	
		
			
				|  |  |        // }
 | 
	
		
			
				|  |  | -      addVipGroupStudents([{
 | 
	
		
			
				|  |  | -        vipGroupId: this.id,
 | 
	
		
			
				|  |  | -        studentId: this.activeStudent,
 | 
	
		
			
				|  |  | -        onlineClassesUnitPrice,
 | 
	
		
			
				|  |  | -        offlineClassesUnitPrice
 | 
	
		
			
				|  |  | -      }]).then((res) => {
 | 
	
		
			
				|  |  | +      addVipGroupStudents([
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          vipGroupId: this.id,
 | 
	
		
			
				|  |  | +          studentId: this.activeStudent,
 | 
	
		
			
				|  |  | +          onlineClassesUnitPrice,
 | 
	
		
			
				|  |  | +          offlineClassesUnitPrice,
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +      ]).then((res) => {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  |            this.$message.success("添加成功");
 | 
	
		
			
				|  |  |            this.getStudents();
 | 
	
	
		
			
				|  | @@ -771,7 +778,7 @@ export default {
 | 
	
		
			
				|  |  |  .btnWrap {
 | 
	
		
			
				|  |  |    display: flex;
 | 
	
		
			
				|  |  |    flex-direction: row;
 | 
	
		
			
				|  |  | -  justify-content: flex-start;
 | 
	
		
			
				|  |  | +  justify-content: space-between;
 | 
	
		
			
				|  |  |    margin-bottom: 15px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </style>
 |