|  | @@ -3,7 +3,8 @@
 | 
											
												
													
														|  |      <tips />
 |  |      <tips />
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <course-model
 |  |      <course-model
 | 
											
												
													
														|  | -    v-if="mypreViewData&&mypreViewData.isShowMusicCourseForPay"
 |  | 
 | 
											
												
													
														|  | 
 |  | +      v-if="mypreViewData && mypreViewData.isShowMusicCourseForPay"
 | 
											
												
													
														|  | 
 |  | +      :isShowSalePrice="isShowSalePrice"
 | 
											
												
													
														|  |        :courseViewType="courseViewType"
 |  |        :courseViewType="courseViewType"
 | 
											
												
													
														|  |        :courseShowInfo="courseShowInfo"
 |  |        :courseShowInfo="courseShowInfo"
 | 
											
												
													
														|  |        :remissionCourseFeeStatus="remissionCourseFeeStatus"
 |  |        :remissionCourseFeeStatus="remissionCourseFeeStatus"
 | 
											
										
											
												
													
														|  | @@ -19,7 +20,13 @@
 | 
											
												
													
														|  |      />
 |  |      />
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <member
 |  |      <member
 | 
											
												
													
														|  | -      v-if="toolsPackage && toolsPackage.length > 0&&mypreViewData&&mypreViewData.isShowMemberForPay"
 |  | 
 | 
											
												
													
														|  | 
 |  | +      v-if="
 | 
											
												
													
														|  | 
 |  | +        toolsPackage &&
 | 
											
												
													
														|  | 
 |  | +          toolsPackage.length > 0 &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData.isShowMemberForPay
 | 
											
												
													
														|  | 
 |  | +      "
 | 
											
												
													
														|  | 
 |  | +      :isShowSalePrice="isShowSalePrice"
 | 
											
												
													
														|  |        :toolsPackage="toolsPackage"
 |  |        :toolsPackage="toolsPackage"
 | 
											
												
													
														|  |        :isGiveAccessories="isGiveAccessories"
 |  |        :isGiveAccessories="isGiveAccessories"
 | 
											
												
													
														|  |        :accessStatus="accessOries.length > 0"
 |  |        :accessStatus="accessOries.length > 0"
 | 
											
										
											
												
													
														|  | @@ -27,6 +34,7 @@
 | 
											
												
													
														|  |      />
 |  |      />
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <instrument-model
 |  |      <instrument-model
 | 
											
												
													
														|  | 
 |  | +      :isShowSalePrice="isShowSalePrice"
 | 
											
												
													
														|  |        :instrumentResultList="instrumentResultList"
 |  |        :instrumentResultList="instrumentResultList"
 | 
											
												
													
														|  |        :buyMaintenance="buyMaintenance"
 |  |        :buyMaintenance="buyMaintenance"
 | 
											
												
													
														|  |        :trainSmallBg="trainSmallBg"
 |  |        :trainSmallBg="trainSmallBg"
 | 
											
										
											
												
													
														|  | @@ -37,48 +45,87 @@
 | 
											
												
													
														|  |        @onQuestions="onQuestions"
 |  |        @onQuestions="onQuestions"
 | 
											
												
													
														|  |      />
 |  |      />
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    <div class="courseModel" style="margin-top: 12px;" v-if="instrumentRepair && instrumentRepair.length > 0&& mypreViewData&&mypreViewData.isShowMusicInsuranceForPay">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <div
 | 
											
												
													
														|  | 
 |  | +      class="courseModel"
 | 
											
												
													
														|  | 
 |  | +      style="margin-top: 12px;"
 | 
											
												
													
														|  | 
 |  | +      v-if="
 | 
											
												
													
														|  | 
 |  | +        instrumentRepair &&
 | 
											
												
													
														|  | 
 |  | +          instrumentRepair.length > 0 &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData.isShowMusicInsuranceForPay
 | 
											
												
													
														|  | 
 |  | +      "
 | 
											
												
													
														|  | 
 |  | +    >
 | 
											
												
													
														|  |        <h2 class="titles">
 |  |        <h2 class="titles">
 | 
											
												
													
														|  |          <img :src="trainSmallBg" />
 |  |          <img :src="trainSmallBg" />
 | 
											
												
													
														|  |          <span>乐器保养</span>
 |  |          <span>乐器保养</span>
 | 
											
												
													
														|  |        </h2>
 |  |        </h2>
 | 
											
												
													
														|  | -			<!-- 可选课程信息集合 -->
 |  | 
 | 
											
												
													
														|  | -			<div class="section">
 |  | 
 | 
											
												
													
														|  | -				<el-row class="title-row">
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="12">服务项目</el-col>
 |  | 
 | 
											
												
													
														|  | -					<!-- 原价 -->
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="5" :offset="1" style="text-align: right;">时间</el-col>
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="6" style="text-align: right;">价格</el-col>
 |  | 
 | 
											
												
													
														|  | -				</el-row>
 |  | 
 | 
											
												
													
														|  | -				<el-row class="option-row" v-for="(item, index) in instrumentRepair" :key="index" @click.native="onCheckItem(item)">
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="12">
 |  | 
 | 
											
												
													
														|  | -						<i class="check_default" :class="[item.isStatus ? 'check_active' : '', item.optionalFlag ? 'disabled' : '', item.noSelect ? 'noSelect' : '']"></i>
 |  | 
 | 
											
												
													
														|  | 
 |  | +      <!-- 可选课程信息集合 -->
 | 
											
												
													
														|  | 
 |  | +      <div class="section">
 | 
											
												
													
														|  | 
 |  | +        <el-row class="title-row">
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="isShowSalePrice ? 9 : 14">服务项目</el-col>
 | 
											
												
													
														|  | 
 |  | +          <!-- 原价 -->
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5" style="text-align: right;">时间</el-col>
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5" style="text-align: right;">原价</el-col>
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5" style="text-align: right;" v-if="isShowSalePrice"
 | 
											
												
													
														|  | 
 |  | +            >售价</el-col
 | 
											
												
													
														|  | 
 |  | +          >
 | 
											
												
													
														|  | 
 |  | +        </el-row>
 | 
											
												
													
														|  | 
 |  | +        <el-row
 | 
											
												
													
														|  | 
 |  | +          class="option-row"
 | 
											
												
													
														|  | 
 |  | +          v-for="(item, index) in instrumentRepair"
 | 
											
												
													
														|  | 
 |  | +          :key="index"
 | 
											
												
													
														|  | 
 |  | +          @click.native="onCheckItem(item)"
 | 
											
												
													
														|  | 
 |  | +        >
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="isShowSalePrice ? 9 : 14">
 | 
											
												
													
														|  | 
 |  | +            <i
 | 
											
												
													
														|  | 
 |  | +              class="check_default"
 | 
											
												
													
														|  | 
 |  | +              :class="[
 | 
											
												
													
														|  | 
 |  | +                item.isStatus ? 'check_active' : '',
 | 
											
												
													
														|  | 
 |  | +                item.optionalFlag ? 'disabled' : '',
 | 
											
												
													
														|  | 
 |  | +                item.noSelect ? 'noSelect' : ''
 | 
											
												
													
														|  | 
 |  | +              ]"
 | 
											
												
													
														|  | 
 |  | +            ></i>
 | 
											
												
													
														|  |              {{ item.name }}
 |  |              {{ item.name }}
 | 
											
												
													
														|  | -					</el-col>
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="6">
 |  | 
 | 
											
												
													
														|  | -						<span style="color: #AAA; font-size: 12px;">{{ item.num }}(年)</span>
 |  | 
 | 
											
												
													
														|  | -					</el-col>
 |  | 
 | 
											
												
													
														|  | -					<el-col :span="6">
 |  | 
 | 
											
												
													
														|  | -						<span style="color: #1A1A1A">¥{{ item.actualAmount | moneyFormat }}</span>
 |  | 
 | 
											
												
													
														|  | -					</el-col>
 |  | 
 | 
											
												
													
														|  | -				</el-row>
 |  | 
 | 
											
												
													
														|  | -			</div>
 |  | 
 | 
											
												
													
														|  | 
 |  | +          </el-col>
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5">
 | 
											
												
													
														|  | 
 |  | +            <span style="color: #AAA; font-size: 12px;"
 | 
											
												
													
														|  | 
 |  | +              >{{ item.num }}(年)</span
 | 
											
												
													
														|  | 
 |  | +            >
 | 
											
												
													
														|  | 
 |  | +          </el-col>
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5">
 | 
											
												
													
														|  | 
 |  | +            <del style="color: #AAA; font-size: 12px;"
 | 
											
												
													
														|  | 
 |  | +              >¥{{ item.originalAmount | moneyFormat }}</del
 | 
											
												
													
														|  | 
 |  | +            >
 | 
											
												
													
														|  | 
 |  | +          </el-col>
 | 
											
												
													
														|  | 
 |  | +          <el-col :span="5" v-if="isShowSalePrice">
 | 
											
												
													
														|  | 
 |  | +            <span style="color: #1A1A1A"
 | 
											
												
													
														|  | 
 |  | +              >¥{{ item.actualAmount | moneyFormat }}</span
 | 
											
												
													
														|  | 
 |  | +            >
 | 
											
												
													
														|  | 
 |  | +          </el-col>
 | 
											
												
													
														|  | 
 |  | +        </el-row>
 | 
											
												
													
														|  | 
 |  | +      </div>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -     <accessories
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <accessories
 | 
											
												
													
														|  | 
 |  | +      :isShowSalePrice="isShowSalePrice"
 | 
											
												
													
														|  |        :trainSmallBg="trainSmallBg"
 |  |        :trainSmallBg="trainSmallBg"
 | 
											
												
													
														|  |        :accessOries="accessOries"
 |  |        :accessOries="accessOries"
 | 
											
												
													
														|  |        :isGiveAccessories="giveAccessoriesStatus"
 |  |        :isGiveAccessories="giveAccessoriesStatus"
 | 
											
												
													
														|  |        @onAuxiliarie="onCheckItem"
 |  |        @onAuxiliarie="onCheckItem"
 | 
											
												
													
														|  |      />
 |  |      />
 | 
											
												
													
														|  |      <activity
 |  |      <activity
 | 
											
												
													
														|  | -      v-if="activityList && activityList.length > 0&&mypreViewData&&mypreViewData.isShowVipCourseForPay"
 |  | 
 | 
											
												
													
														|  | 
 |  | +      v-if="
 | 
											
												
													
														|  | 
 |  | +        activityList &&
 | 
											
												
													
														|  | 
 |  | +          activityList.length > 0 &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData &&
 | 
											
												
													
														|  | 
 |  | +          mypreViewData.isShowVipCourseForPay
 | 
											
												
													
														|  | 
 |  | +      "
 | 
											
												
													
														|  | 
 |  | +      :isShowSalePrice="isShowSalePrice"
 | 
											
												
													
														|  |        :trainSmallBg="trainSmallBg"
 |  |        :trainSmallBg="trainSmallBg"
 | 
											
												
													
														|  |        :activityList="activityList"
 |  |        :activityList="activityList"
 | 
											
												
													
														|  |        @onCheckItem="onCheckItem"
 |  |        @onCheckItem="onCheckItem"
 | 
											
												
													
														|  |      />
 |  |      />
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      <!-- <div class="buy">
 |  |      <!-- <div class="buy">
 | 
											
												
													
														|  |        <div class="price">
 |  |        <div class="price">
 | 
											
												
													
														|  |          <p class="oldprice">
 |  |          <p class="oldprice">
 | 
											
										
											
												
													
														|  | @@ -104,17 +151,24 @@ import dayjs from "dayjs";
 | 
											
												
													
														|  |  const paymentPatternType = {
 |  |  const paymentPatternType = {
 | 
											
												
													
														|  |    0: "按月",
 |  |    0: "按月",
 | 
											
												
													
														|  |    1: "按学期",
 |  |    1: "按学期",
 | 
											
												
													
														|  | -  2: "一次性",
 |  | 
 | 
											
												
													
														|  | 
 |  | +  2: "一次性"
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  | -import Tips from './tips'
 |  | 
 | 
											
												
													
														|  | -import courseModel from '@/views/resetTeaming/modals/courseModel'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import Tips from "./tips";
 | 
											
												
													
														|  | 
 |  | +import courseModel from "@/views/resetTeaming/modals/courseModel";
 | 
											
												
													
														|  |  import InstrumentModel from "./instrumentModel";
 |  |  import InstrumentModel from "./instrumentModel";
 | 
											
												
													
														|  | -import accessories from './accessories'
 |  | 
 | 
											
												
													
														|  | -import activity from './activity'
 |  | 
 | 
											
												
													
														|  | -import member from './member'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import accessories from "./accessories";
 | 
											
												
													
														|  | 
 |  | +import activity from "./activity";
 | 
											
												
													
														|  | 
 |  | +import member from "./member";
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
												
													
														|  |    props: ["subjectId", "calenderId", "preViewData"],
 |  |    props: ["subjectId", "calenderId", "preViewData"],
 | 
											
												
													
														|  | -  components: { Tips, courseModel, InstrumentModel, accessories, activity, member },
 |  | 
 | 
											
												
													
														|  | 
 |  | +  components: {
 | 
											
												
													
														|  | 
 |  | +    Tips,
 | 
											
												
													
														|  | 
 |  | +    courseModel,
 | 
											
												
													
														|  | 
 |  | +    InstrumentModel,
 | 
											
												
													
														|  | 
 |  | +    accessories,
 | 
											
												
													
														|  | 
 |  | +    activity,
 | 
											
												
													
														|  | 
 |  | +    member
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      const query = this.$route.query;
 |  |      const query = this.$route.query;
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
										
											
												
													
														|  | @@ -145,7 +199,7 @@ export default {
 | 
											
												
													
														|  |          accessPrice: 0, // 辅件现价
 |  |          accessPrice: 0, // 辅件现价
 | 
											
												
													
														|  |          accessMarketPrice: 0, // 辅件原价
 |  |          accessMarketPrice: 0, // 辅件原价
 | 
											
												
													
														|  |          goodsPrice: 0, // 乐器现价
 |  |          goodsPrice: 0, // 乐器现价
 | 
											
												
													
														|  | -        goodsMarketPrice: 0, // 乐器原价
 |  | 
 | 
											
												
													
														|  | 
 |  | +        goodsMarketPrice: 0 // 乐器原价
 | 
											
												
													
														|  |        }, // 金额列表,金额计算
 |  |        }, // 金额列表,金额计算
 | 
											
												
													
														|  |        toolsPackage: [], // 学习工具包
 |  |        toolsPackage: [], // 学习工具包
 | 
											
												
													
														|  |        instrumentRepair: [], // 乐保信息
 |  |        instrumentRepair: [], // 乐保信息
 | 
											
										
											
												
													
														|  | @@ -178,13 +232,14 @@ export default {
 | 
											
												
													
														|  |        remissionCourseFeeStatus: false,
 |  |        remissionCourseFeeStatus: false,
 | 
											
												
													
														|  |        isGiveAccessories: false, // 是否赠送辅件
 |  |        isGiveAccessories: false, // 是否赠送辅件
 | 
											
												
													
														|  |        giveAccessoriesStatus: false,
 |  |        giveAccessoriesStatus: false,
 | 
											
												
													
														|  | -      mypreViewData:{
 |  | 
 | 
											
												
													
														|  | -        isShowMemberForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowMusicInsuranceForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowVipCourseForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowMusicCourseForPay:true,
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +      mypreViewData: {
 | 
											
												
													
														|  | 
 |  | +        isShowMemberForPay: true,
 | 
											
												
													
														|  | 
 |  | +        isShowMusicInsuranceForPay: true,
 | 
											
												
													
														|  | 
 |  | +        isShowVipCourseForPay: true,
 | 
											
												
													
														|  | 
 |  | +        isShowMusicCourseForPay: true
 | 
											
												
													
														|  | 
 |  | +      },
 | 
											
												
													
														|  | 
 |  | +      isShowSalePrice: true // 是否显示原价
 | 
											
												
													
														|  | 
 |  | +    };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    mounted() {
 |  |    mounted() {
 | 
											
												
													
														|  |      this.__init();
 |  |      this.__init();
 | 
											
										
											
												
													
														|  | @@ -195,30 +250,37 @@ export default {
 | 
											
												
													
														|  |        let params = {
 |  |        let params = {
 | 
											
												
													
														|  |          musicGroupId: this.musicGroupId,
 |  |          musicGroupId: this.musicGroupId,
 | 
											
												
													
														|  |          subjectId: this.subjectId,
 |  |          subjectId: this.subjectId,
 | 
											
												
													
														|  | -        calenderId: this.calenderId,
 |  | 
 | 
											
												
													
														|  | 
 |  | +        calenderId: this.calenderId
 | 
											
												
													
														|  |        };
 |  |        };
 | 
											
												
													
														|  | -      await getSubjectGoodsAndInfoPreview(params).then((res) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      await getSubjectGoodsAndInfoPreview(params).then(res => {
 | 
											
												
													
														|  |          let result = res;
 |  |          let result = res;
 | 
											
												
													
														|  |          if (result.code == 200) {
 |  |          if (result.code == 200) {
 | 
											
												
													
														|  |            let tempResult = result.data;
 |  |            let tempResult = result.data;
 | 
											
												
													
														|  | -          this.__dataFormat(tempResult)
 |  | 
 | 
											
												
													
														|  | 
 |  | +          this.__dataFormat(tempResult);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          // 初始化计算金额
 |  |          // 初始化计算金额
 | 
											
												
													
														|  |          this.calcPrice();
 |  |          this.calcPrice();
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      __dataFormat(tempResult) {
 |  |      __dataFormat(tempResult) {
 | 
											
												
													
														|  | -      this.mypreViewData = this.preViewData&&this.preViewData.paymentCalender ? JSON.parse(JSON.stringify(this.preViewData)) : {
 |  | 
 | 
											
												
													
														|  | -          isShowMemberForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowMusicInsuranceForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowVipCourseForPay:true,
 |  | 
 | 
											
												
													
														|  | -          isShowMusicCourseForPay:true,
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +      // console.log(tempResult, "1212");
 | 
											
												
													
														|  | 
 |  | +      this.mypreViewData =
 | 
											
												
													
														|  | 
 |  | +        this.preViewData && this.preViewData.paymentCalender
 | 
											
												
													
														|  | 
 |  | +          ? JSON.parse(JSON.stringify(this.preViewData))
 | 
											
												
													
														|  | 
 |  | +          : {
 | 
											
												
													
														|  | 
 |  | +              isShowMemberForPay: true,
 | 
											
												
													
														|  | 
 |  | +              isShowMusicInsuranceForPay: true,
 | 
											
												
													
														|  | 
 |  | +              isShowVipCourseForPay: true,
 | 
											
												
													
														|  | 
 |  | +              isShowMusicCourseForPay: true
 | 
											
												
													
														|  | 
 |  | +            };
 | 
											
												
													
														|  | 
 |  | +      this.isShowSalePrice =
 | 
											
												
													
														|  | 
 |  | +        tempResult.paymentCalender.calender.isShowSalePrice || false;
 | 
											
												
													
														|  |        this.courseViewType = tempResult.musicGroup.courseViewType || 0;
 |  |        this.courseViewType = tempResult.musicGroup.courseViewType || 0;
 | 
											
												
													
														|  | -      this.isGiveAccessories = tempResult.musicGroup && tempResult.musicGroup.isGiveAccessories || false; // 是否赠送辅件
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.isGiveAccessories =
 | 
											
												
													
														|  | 
 |  | +        (tempResult.musicGroup && tempResult.musicGroup.isGiveAccessories) ||
 | 
											
												
													
														|  | 
 |  | +        false; // 是否赠送辅件
 | 
											
												
													
														|  |        this.organId = tempResult.musicGroup.organId;
 |  |        this.organId = tempResult.musicGroup.organId;
 | 
											
												
													
														|  | -      const musicGroupStatus = tempResult.musicGroup.status
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const musicGroupStatus = tempResult.musicGroup.status;
 | 
											
												
													
														|  |        this.cloudTeacherFee = tempResult.cloudTeacherFee || 0;
 |  |        this.cloudTeacherFee = tempResult.cloudTeacherFee || 0;
 | 
											
												
													
														|  |        this.cloudTeacherPlusFee = tempResult.cloudTeacherPlusFee || 0;
 |  |        this.cloudTeacherPlusFee = tempResult.cloudTeacherPlusFee || 0;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -226,7 +288,7 @@ export default {
 | 
											
												
													
														|  |        for (let i in memberCoursePrice) {
 |  |        for (let i in memberCoursePrice) {
 | 
											
												
													
														|  |          this.memberCoursePrice.push({
 |  |          this.memberCoursePrice.push({
 | 
											
												
													
														|  |            name: coursesType[i],
 |  |            name: coursesType[i],
 | 
											
												
													
														|  | -          price: memberCoursePrice[i],
 |  | 
 | 
											
												
													
														|  | 
 |  | +          price: memberCoursePrice[i]
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        this.memberCourseShowFlag =
 |  |        this.memberCourseShowFlag =
 | 
											
										
											
												
													
														|  | @@ -245,60 +307,71 @@ export default {
 | 
											
												
													
														|  |              tempResult.musicGroupPaymentCalender.paymentValidEndDate
 |  |              tempResult.musicGroupPaymentCalender.paymentValidEndDate
 | 
											
												
													
														|  |            ).format("YYYY/MM/DD");
 |  |            ).format("YYYY/MM/DD");
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  | -      const paymentCalender =  this.mypreViewData&&this.mypreViewData.paymentCalender ? this.mypreViewData.paymentCalender : (tempResult.paymentCalender || null)
 |  | 
 | 
											
												
													
														|  | -      console.log(paymentCalender,'paymentCalender')
 |  | 
 | 
											
												
													
														|  | -      if(paymentCalender&&paymentCalender.calender&&paymentCalender.calender.paymentItemShowState){
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        let obj = JSON.parse(paymentCalender.calender.paymentItemShowState)
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        for(let key in obj){
 |  | 
 | 
											
												
													
														|  | -          this.mypreViewData [key] = obj[key]
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const paymentCalender =
 | 
											
												
													
														|  | 
 |  | +        this.mypreViewData && this.mypreViewData.paymentCalender
 | 
											
												
													
														|  | 
 |  | +          ? this.mypreViewData.paymentCalender
 | 
											
												
													
														|  | 
 |  | +          : tempResult.paymentCalender || null;
 | 
											
												
													
														|  | 
 |  | +      console.log(paymentCalender, "paymentCalender");
 | 
											
												
													
														|  | 
 |  | +      if (
 | 
											
												
													
														|  | 
 |  | +        paymentCalender &&
 | 
											
												
													
														|  | 
 |  | +        paymentCalender.calender &&
 | 
											
												
													
														|  | 
 |  | +        paymentCalender.calender.paymentItemShowState
 | 
											
												
													
														|  | 
 |  | +      ) {
 | 
											
												
													
														|  | 
 |  | +        let obj = JSON.parse(paymentCalender.calender.paymentItemShowState);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        for (let key in obj) {
 | 
											
												
													
														|  | 
 |  | +          this.mypreViewData[key] = obj[key];
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      let tempInfo = paymentCalender && paymentCalender.course ? paymentCalender.course : [];
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let tempInfo =
 | 
											
												
													
														|  | 
 |  | +        paymentCalender && paymentCalender.course ? paymentCalender.course : [];
 | 
											
												
													
														|  |        let memberPrivilegesItemList = tempResult.memberPrivilegesItemList
 |  |        let memberPrivilegesItemList = tempResult.memberPrivilegesItemList
 | 
											
												
													
														|  |          ? tempResult.memberPrivilegesItemList
 |  |          ? tempResult.memberPrivilegesItemList
 | 
											
												
													
														|  |          : [];
 |  |          : [];
 | 
											
												
													
														|  |        let tempMember = [];
 |  |        let tempMember = [];
 | 
											
												
													
														|  | -      memberPrivilegesItemList.forEach((member) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      memberPrivilegesItemList.forEach(member => {
 | 
											
												
													
														|  |          if (
 |  |          if (
 | 
											
												
													
														|  |            member.memberPrivilegesItems &&
 |  |            member.memberPrivilegesItems &&
 | 
											
												
													
														|  |            member.memberPrivilegesItems.length > 0
 |  |            member.memberPrivilegesItems.length > 0
 | 
											
												
													
														|  |          ) {
 |  |          ) {
 | 
											
												
													
														|  | -          member.memberPrivilegesItems.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +          member.memberPrivilegesItems.forEach(item => {
 | 
											
												
													
														|  |              tempMember.push(item.name);
 |  |              tempMember.push(item.name);
 | 
											
												
													
														|  |            });
 |  |            });
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  |        // 云教练
 |  |        // 云教练
 | 
											
												
													
														|  | -      const member = paymentCalender && paymentCalender.member ? paymentCalender.member : {}
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const member =
 | 
											
												
													
														|  | 
 |  | +        paymentCalender && paymentCalender.member ? paymentCalender.member : {};
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      member.isStatus = true
 |  | 
 | 
											
												
													
														|  | 
 |  | +      member.isStatus = true;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      this.toolsPackage = (member&&!member.memberRankSettingId)? [] : [member]
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.toolsPackage = member && !member.memberRankSettingId ? [] : [member];
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 乐器保养
 |  |        // 乐器保养
 | 
											
												
													
														|  | -      const repair = paymentCalender && paymentCalender.repair ? paymentCalender.repair : {}
 |  | 
 | 
											
												
													
														|  | -      repair.name = '乐器保养'
 |  | 
 | 
											
												
													
														|  | -      repair.isStatus = true // 默认不选择乐器保养
 |  | 
 | 
											
												
													
														|  | -      this.instrumentRepair = repair.actualAmount+'' ? [] : [repair]
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const repair =
 | 
											
												
													
														|  | 
 |  | +        paymentCalender && paymentCalender.repair ? paymentCalender.repair : {};
 | 
											
												
													
														|  | 
 |  | +      repair.name = "乐器保养";
 | 
											
												
													
														|  | 
 |  | +      repair.isStatus = true; // 默认不选择乐器保养
 | 
											
												
													
														|  | 
 |  | +      this.instrumentRepair = repair.actualAmount + "" ? [repair] : [];
 | 
											
												
													
														|  |        // 小班课
 |  |        // 小班课
 | 
											
												
													
														|  | -      const activity = paymentCalender && paymentCalender.activity ? paymentCalender.activity : []
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const activity =
 | 
											
												
													
														|  | 
 |  | +        paymentCalender && paymentCalender.activity
 | 
											
												
													
														|  | 
 |  | +          ? paymentCalender.activity
 | 
											
												
													
														|  | 
 |  | +          : [];
 | 
											
												
													
														|  |        activity.map(i => {
 |  |        activity.map(i => {
 | 
											
												
													
														|  | -        i.isStatus = true
 |  | 
 | 
											
												
													
														|  | -      })
 |  | 
 | 
											
												
													
														|  | -      this.activityList = [...activity]
 |  | 
 | 
											
												
													
														|  | 
 |  | +        i.isStatus = true;
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      this.activityList = [...activity];
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 判断是否有课程
 |  |        // 判断是否有课程
 | 
											
												
													
														|  |        if (tempInfo && tempInfo.length > 0) {
 |  |        if (tempInfo && tempInfo.length > 0) {
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          // 默认课程都选中
 |  |          // 默认课程都选中
 | 
											
												
													
														|  | -        tempInfo.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        tempInfo.forEach(item => {
 | 
											
												
													
														|  |            // if (item && item.isStudentOptional) {
 |  |            // if (item && item.isStudentOptional) {
 | 
											
												
													
														|  | -            // item.isStatus = false;
 |  | 
 | 
											
												
													
														|  | 
 |  | +          // item.isStatus = false;
 | 
											
												
													
														|  |            // } else {
 |  |            // } else {
 | 
											
												
													
														|  | -            item.isStatus = true;
 |  | 
 | 
											
												
													
														|  | 
 |  | +          item.isStatus = true;
 | 
											
												
													
														|  |            // }
 |  |            // }
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |          this.courseInfo = tempInfo;
 |  |          this.courseInfo = tempInfo;
 | 
											
										
											
												
													
														|  | @@ -307,8 +380,12 @@ export default {
 | 
											
												
													
														|  |        this.musicGroupSubject = tempResult.musicGroupSubjectPlan || [];
 |  |        this.musicGroupSubject = tempResult.musicGroupSubjectPlan || [];
 | 
											
												
													
														|  |        let instrumentInfo = {};
 |  |        let instrumentInfo = {};
 | 
											
												
													
														|  |        let tempInstrument = [];
 |  |        let tempInstrument = [];
 | 
											
												
													
														|  | -      let musicGroupSubjectGoodsGroupList = this.preViewData?.payUserType == "SCHOOL" || musicGroupStatus == 'PROGRESS' ? [] : tempResult.musicGroupSubjectGoodsGroupList
 |  | 
 | 
											
												
													
														|  | -      musicGroupSubjectGoodsGroupList?.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let musicGroupSubjectGoodsGroupList =
 | 
											
												
													
														|  | 
 |  | +        this.preViewData?.payUserType == "SCHOOL" ||
 | 
											
												
													
														|  | 
 |  | +        musicGroupStatus == "PROGRESS"
 | 
											
												
													
														|  | 
 |  | +          ? []
 | 
											
												
													
														|  | 
 |  | +          : tempResult.musicGroupSubjectGoodsGroupList;
 | 
											
												
													
														|  | 
 |  | +      musicGroupSubjectGoodsGroupList?.forEach(item => {
 | 
											
												
													
														|  |          if (item.type == "INSTRUMENT") {
 |  |          if (item.type == "INSTRUMENT") {
 | 
											
												
													
														|  |            // 获取乐器所有提供方式
 |  |            // 获取乐器所有提供方式
 | 
											
												
													
														|  |            let KGPTJ = item.kitGroupPurchaseTypeJson
 |  |            let KGPTJ = item.kitGroupPurchaseTypeJson
 | 
											
										
											
												
													
														|  | @@ -319,7 +396,7 @@ export default {
 | 
											
												
													
														|  |              tempItem.marketPrice = tempItem.goodsList[0].marketPrice;
 |  |              tempItem.marketPrice = tempItem.goodsList[0].marketPrice;
 | 
											
												
													
														|  |              tempItem.kitType = single; // 优惠模式
 |  |              tempItem.kitType = single; // 优惠模式
 | 
											
												
													
														|  |              tempItem.coupon = KGPTJ[single]; // 优惠金额
 |  |              tempItem.coupon = KGPTJ[single]; // 优惠金额
 | 
											
												
													
														|  | -            tempItem.discountPrice = tempItem.goodsList[0].discountPrice
 |  | 
 | 
											
												
													
														|  | 
 |  | +            tempItem.discountPrice = tempItem.goodsList[0].discountPrice;
 | 
											
												
													
														|  |              if (instrumentInfo.id) {
 |  |              if (instrumentInfo.id) {
 | 
											
												
													
														|  |                tempItem.isStatus = false;
 |  |                tempItem.isStatus = false;
 | 
											
												
													
														|  |                if (single == "GROUP") {
 |  |                if (single == "GROUP") {
 | 
											
										
											
												
													
														|  | @@ -330,7 +407,7 @@ export default {
 | 
											
												
													
														|  |                    instrumentInfo.kitType == "LEASE" ||
 |  |                    instrumentInfo.kitType == "LEASE" ||
 | 
											
												
													
														|  |                    instrumentInfo.kitType == "FREE"
 |  |                    instrumentInfo.kitType == "FREE"
 | 
											
												
													
														|  |                  ) {
 |  |                  ) {
 | 
											
												
													
														|  | -                  this.instrumentResult.forEach((instrRes) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  this.instrumentResult.forEach(instrRes => {
 | 
											
												
													
														|  |                      instrRes.isStatus = false;
 |  |                      instrRes.isStatus = false;
 | 
											
												
													
														|  |                    });
 |  |                    });
 | 
											
												
													
														|  |                    tempItem.isStatus = true;
 |  |                    tempItem.isStatus = true;
 | 
											
										
											
												
													
														|  | @@ -347,7 +424,7 @@ export default {
 | 
											
												
													
														|  |                    instrumentInfo.kitType == "LEASE" &&
 |  |                    instrumentInfo.kitType == "LEASE" &&
 | 
											
												
													
														|  |                    instrumentInfo.price < tempItem.price
 |  |                    instrumentInfo.price < tempItem.price
 | 
											
												
													
														|  |                  ) {
 |  |                  ) {
 | 
											
												
													
														|  | -                  this.instrumentResult.forEach((instrRes) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  this.instrumentResult.forEach(instrRes => {
 | 
											
												
													
														|  |                      instrRes.isStatus = false;
 |  |                      instrRes.isStatus = false;
 | 
											
												
													
														|  |                    });
 |  |                    });
 | 
											
												
													
														|  |                    tempItem.isStatus = true;
 |  |                    tempItem.isStatus = true;
 | 
											
										
											
												
													
														|  | @@ -364,7 +441,7 @@ export default {
 | 
											
												
													
														|  |                    instrumentInfo.kitType == "FREE" &&
 |  |                    instrumentInfo.kitType == "FREE" &&
 | 
											
												
													
														|  |                    instrumentInfo.price < tempItem.price
 |  |                    instrumentInfo.price < tempItem.price
 | 
											
												
													
														|  |                  ) {
 |  |                  ) {
 | 
											
												
													
														|  | -                  this.instrumentResult.forEach((instrRes) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  this.instrumentResult.forEach(instrRes => {
 | 
											
												
													
														|  |                      instrRes.isStatus = false;
 |  |                      instrRes.isStatus = false;
 | 
											
												
													
														|  |                    });
 |  |                    });
 | 
											
												
													
														|  |                    tempItem.isStatus = true;
 |  |                    tempItem.isStatus = true;
 | 
											
										
											
												
													
														|  | @@ -386,11 +463,8 @@ export default {
 | 
											
												
													
														|  |                };
 |  |                };
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              let childGoodsNameList = [];
 |  |              let childGoodsNameList = [];
 | 
											
												
													
														|  | -            if (
 |  | 
 | 
											
												
													
														|  | -              tempItem.childGoodsList &&
 |  | 
 | 
											
												
													
														|  | -              tempItem.childGoodsList.length > 0
 |  | 
 | 
											
												
													
														|  | -            ) {
 |  | 
 | 
											
												
													
														|  | -              tempItem.childGoodsList.forEach((child) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if (tempItem.childGoodsList && tempItem.childGoodsList.length > 0) {
 | 
											
												
													
														|  | 
 |  | +              tempItem.childGoodsList.forEach(child => {
 | 
											
												
													
														|  |                  if (child.type != "INSTRUMENT" && child.type != "OTHER") {
 |  |                  if (child.type != "INSTRUMENT" && child.type != "OTHER") {
 | 
											
												
													
														|  |                    childGoodsNameList.push(child.name);
 |  |                    childGoodsNameList.push(child.name);
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
										
											
												
													
														|  | @@ -408,29 +482,29 @@ export default {
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  |        // 添加自备选项
 |  |        // 添加自备选项
 | 
											
												
													
														|  |        if (this.instrumentResult.length > 0) {
 |  |        if (this.instrumentResult.length > 0) {
 | 
											
												
													
														|  | -        let sorted = this.groupBy(tempInstrument, (item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        let sorted = this.groupBy(tempInstrument, item => {
 | 
											
												
													
														|  |            return [item.kitType];
 |  |            return [item.kitType];
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |          this.instrumentResultList = sorted;
 |  |          this.instrumentResultList = sorted;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          // 设置是否有减免金额
 |  |          // 设置是否有减免金额
 | 
											
												
													
														|  | -        this.instrumentGetStatus()
 |  | 
 | 
											
												
													
														|  | -        this.setLeBaoStatus()
 |  | 
 | 
											
												
													
														|  | 
 |  | +        this.instrumentGetStatus();
 | 
											
												
													
														|  | 
 |  | +        this.setLeBaoStatus();
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        // 如果选择的是乐保,则把所有辅件价格设置为0
 |  |        // 如果选择的是乐保,则把所有辅件价格设置为0
 | 
											
												
													
														|  | -      this.giveAccessoriesSetStatus()
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.giveAccessoriesSetStatus();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 初始化计算金额
 |  |        // 初始化计算金额
 | 
											
												
													
														|  |        this.calcPrice();
 |  |        this.calcPrice();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      groupBy(array, f) {
 |  |      groupBy(array, f) {
 | 
											
												
													
														|  |        var groups = {};
 |  |        var groups = {};
 | 
											
												
													
														|  | -      array.forEach(function (o) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      array.forEach(function(o) {
 | 
											
												
													
														|  |          var group = JSON.stringify(f(o));
 |  |          var group = JSON.stringify(f(o));
 | 
											
												
													
														|  |          groups[group] = groups[group] || [];
 |  |          groups[group] = groups[group] || [];
 | 
											
												
													
														|  |          groups[group].push(o);
 |  |          groups[group].push(o);
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  | -      return Object.keys(groups).map(function (group) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      return Object.keys(groups).map(function(group) {
 | 
											
												
													
														|  |          return groups[group];
 |  |          return groups[group];
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
										
											
												
													
														|  | @@ -442,7 +516,7 @@ export default {
 | 
											
												
													
														|  |            {
 |  |            {
 | 
											
												
													
														|  |              confirmButtonText: "确定",
 |  |              confirmButtonText: "确定",
 | 
											
												
													
														|  |              dangerouslyUseHTMLString: true,
 |  |              dangerouslyUseHTMLString: true,
 | 
											
												
													
														|  | -            callback: (action) => {},
 |  | 
 | 
											
												
													
														|  | 
 |  | +            callback: action => {}
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          );
 |  |          );
 | 
											
												
													
														|  |        } else if (type == "instrument") {
 |  |        } else if (type == "instrument") {
 | 
											
										
											
												
													
														|  | @@ -452,40 +526,43 @@ export default {
 | 
											
												
													
														|  |            {
 |  |            {
 | 
											
												
													
														|  |              confirmButtonText: "确定",
 |  |              confirmButtonText: "确定",
 | 
											
												
													
														|  |              dangerouslyUseHTMLString: true,
 |  |              dangerouslyUseHTMLString: true,
 | 
											
												
													
														|  | -            callback: (action) => {},
 |  | 
 | 
											
												
													
														|  | 
 |  | +            callback: action => {}
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          );
 |  |          );
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | -    onCheckItem(item,type) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    onCheckItem(item, type) {
 | 
											
												
													
														|  |        // 默认选中不可改
 |  |        // 默认选中不可改
 | 
											
												
													
														|  | -      if(item.optionalFlag) return
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (item.optionalFlag) return;
 | 
											
												
													
														|  |        // 判断乐保是否可选
 |  |        // 判断乐保是否可选
 | 
											
												
													
														|  | -      if(item.noSelect) return
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (item.noSelect) return;
 | 
											
												
													
														|  |        // 如果选择的是乐器先把所有选中的取消
 |  |        // 如果选择的是乐器先把所有选中的取消
 | 
											
												
													
														|  | -      if(type == 'INSTRUMENT') {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (type == "INSTRUMENT") {
 | 
											
												
													
														|  |          this.instrumentResultList.forEach(group => {
 |  |          this.instrumentResultList.forEach(group => {
 | 
											
												
													
														|  |            group.forEach(child => {
 |  |            group.forEach(child => {
 | 
											
												
													
														|  | -            if(child.id != item.id || (child.id == item.id && child.kitType != item.kitType)) {
 |  | 
 | 
											
												
													
														|  | -              child.isStatus = false
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if (
 | 
											
												
													
														|  | 
 |  | +              child.id != item.id ||
 | 
											
												
													
														|  | 
 |  | +              (child.id == item.id && child.kitType != item.kitType)
 | 
											
												
													
														|  | 
 |  | +            ) {
 | 
											
												
													
														|  | 
 |  | +              child.isStatus = false;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | -          })
 |  | 
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | 
 |  | +          });
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        item.isStatus = !item.isStatus;
 |  |        item.isStatus = !item.isStatus;
 | 
											
												
													
														|  | -      if(type == 'train') {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (type == "train") {
 | 
											
												
													
														|  |          // 如果选择的是乐保,则把所有辅件价格设置为0
 |  |          // 如果选择的是乐保,则把所有辅件价格设置为0
 | 
											
												
													
														|  | -        this.giveAccessoriesSetStatus()
 |  | 
 | 
											
												
													
														|  | 
 |  | +        this.giveAccessoriesSetStatus();
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        // 设置是否有减免金额
 |  |        // 设置是否有减免金额
 | 
											
												
													
														|  | -      this.instrumentGetStatus()
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.instrumentGetStatus();
 | 
											
												
													
														|  |        // 重新设置乐保状态
 |  |        // 重新设置乐保状态
 | 
											
												
													
														|  | -      this.setLeBaoStatus()
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.setLeBaoStatus();
 | 
											
												
													
														|  |        // 重新计算金额
 |  |        // 重新计算金额
 | 
											
												
													
														|  |        this.calcPrice();
 |  |        this.calcPrice();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      giveAccessoriesSetStatus() {
 |  |      giveAccessoriesSetStatus() {
 | 
											
												
													
														|  | -      let status = false // 是否有选中云教练
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let status = false; // 是否有选中云教练
 | 
											
												
													
														|  |        this.toolsPackage.forEach(item => {
 |  |        this.toolsPackage.forEach(item => {
 | 
											
												
													
														|  |          if (item.isStatus) {
 |  |          if (item.isStatus) {
 | 
											
												
													
														|  |            status = true;
 |  |            status = true;
 | 
											
										
											
												
													
														|  | @@ -496,36 +573,42 @@ export default {
 | 
											
												
													
														|  |        this.giveAccessoriesStatus = this.isGiveAccessories && status;
 |  |        this.giveAccessoriesStatus = this.isGiveAccessories && status;
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      instrumentGetStatus() {
 |  |      instrumentGetStatus() {
 | 
											
												
													
														|  | -      let childItem = {}
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let childItem = {};
 | 
											
												
													
														|  |        this.instrumentResultList.forEach(group => {
 |  |        this.instrumentResultList.forEach(group => {
 | 
											
												
													
														|  |          group.forEach(child => {
 |  |          group.forEach(child => {
 | 
											
												
													
														|  | -          if(child.isStatus) {
 |  | 
 | 
											
												
													
														|  | -            childItem = child
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (child.isStatus) {
 | 
											
												
													
														|  | 
 |  | +            childItem = child;
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | -      })
 |  | 
 | 
											
												
													
														|  | -      this.remissionCourseFeeStatus = childItem.kitType == 'GROUP' && childItem.groupRemissionCourseFee == 1 ? true : false
 |  | 
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      this.remissionCourseFeeStatus =
 | 
											
												
													
														|  | 
 |  | +        childItem.kitType == "GROUP" && childItem.groupRemissionCourseFee == 1
 | 
											
												
													
														|  | 
 |  | +          ? true
 | 
											
												
													
														|  | 
 |  | +          : false;
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | -    setLeBaoStatus() { // 设置乐保状态
 |  | 
 | 
											
												
													
														|  | -      let status = false // 是否有选中乐器
 |  | 
 | 
											
												
													
														|  | 
 |  | +    setLeBaoStatus() {
 | 
											
												
													
														|  | 
 |  | +      // 设置乐保状态
 | 
											
												
													
														|  | 
 |  | +      let status = false; // 是否有选中乐器
 | 
											
												
													
														|  |        this.instrumentResultList.forEach(group => {
 |  |        this.instrumentResultList.forEach(group => {
 | 
											
												
													
														|  |          group.forEach(item => {
 |  |          group.forEach(item => {
 | 
											
												
													
														|  | -          if(item.isStatus) {
 |  | 
 | 
											
												
													
														|  | -            status = true
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (item.isStatus) {
 | 
											
												
													
														|  | 
 |  | +            status = true;
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | -      })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |        this.instrumentRepair.forEach(repair => {
 |  |        this.instrumentRepair.forEach(repair => {
 | 
											
												
													
														|  | -        if(status) {
 |  | 
 | 
											
												
													
														|  | -          repair.noSelect = false
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (status) {
 | 
											
												
													
														|  | 
 |  | +          repair.noSelect = false;
 | 
											
												
													
														|  |          } else {
 |  |          } else {
 | 
											
												
													
														|  | -          repair.noSelect = true
 |  | 
 | 
											
												
													
														|  | -          repair.isStatus = false
 |  | 
 | 
											
												
													
														|  | 
 |  | +          repair.noSelect = true;
 | 
											
												
													
														|  | 
 |  | +          repair.isStatus = false;
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -      })
 |  | 
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      this.$forceUpdate();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      calcPrice() {
 |  |      calcPrice() {
 | 
											
												
													
														|  | -      let ids = []
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let ids = [];
 | 
											
												
													
														|  |        let amount = 0,
 |  |        let amount = 0,
 | 
											
												
													
														|  |          marketPrice = 0,
 |  |          marketPrice = 0,
 | 
											
												
													
														|  |          goodsPrice = 0, // 乐器两现价
 |  |          goodsPrice = 0, // 乐器两现价
 | 
											
										
											
												
													
														|  | @@ -546,7 +629,7 @@ export default {
 | 
											
												
													
														|  |        let csi = this.courseInfo;
 |  |        let csi = this.courseInfo;
 | 
											
												
													
														|  |        // 加上判断是否有课程信息
 |  |        // 加上判断是否有课程信息
 | 
											
												
													
														|  |        if (mgs) {
 |  |        if (mgs) {
 | 
											
												
													
														|  | -        csi.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        csi.forEach(item => {
 | 
											
												
													
														|  |            if (item.isStatus) {
 |  |            if (item.isStatus) {
 | 
											
												
													
														|  |              musicClassFee += parseFloat(item.courseCurrentPrice);
 |  |              musicClassFee += parseFloat(item.courseCurrentPrice);
 | 
											
												
													
														|  |              // if (this.courseViewType != 2) {
 |  |              // if (this.courseViewType != 2) {
 | 
											
										
											
												
													
														|  | @@ -560,7 +643,7 @@ export default {
 | 
											
												
													
														|  |                  item.courseCurrentPrice
 |  |                  item.courseCurrentPrice
 | 
											
												
													
														|  |                );
 |  |                );
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | -            marketPrice += parseFloat(item.courseOriginalPrice)
 |  | 
 | 
											
												
													
														|  | 
 |  | +            marketPrice += parseFloat(item.courseOriginalPrice);
 | 
											
												
													
														|  |              //  else {
 |  |              //  else {
 | 
											
												
													
														|  |              //   marketPrice += parseFloat(item.courseCurrentPrice);
 |  |              //   marketPrice += parseFloat(item.courseCurrentPrice);
 | 
											
												
													
														|  |              // }
 |  |              // }
 | 
											
										
											
												
													
														|  | @@ -572,23 +655,23 @@ export default {
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 云教练
 |  |        // 云教练
 | 
											
												
													
														|  | -      const toolsPackage = this.toolsPackage
 |  | 
 | 
											
												
													
														|  | -      if(toolsPackage.length > 0) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const toolsPackage = this.toolsPackage;
 | 
											
												
													
														|  | 
 |  | +      if (toolsPackage.length > 0) {
 | 
											
												
													
														|  |          toolsPackage.forEach(item => {
 |  |          toolsPackage.forEach(item => {
 | 
											
												
													
														|  | -          if(item.isStatus) {
 |  | 
 | 
											
												
													
														|  | -            this.buyCloudTeacher = true  // 临时处理,原因一条数据事要使用,如果多条数据会有问题
 |  | 
 | 
											
												
													
														|  | -            marketPrice += parseFloat(item.originalAmount)
 |  | 
 | 
											
												
													
														|  | -            amount += parseFloat(item.actualAmount)
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (item.isStatus) {
 | 
											
												
													
														|  | 
 |  | +            this.buyCloudTeacher = true; // 临时处理,原因一条数据事要使用,如果多条数据会有问题
 | 
											
												
													
														|  | 
 |  | +            marketPrice += parseFloat(item.originalAmount);
 | 
											
												
													
														|  | 
 |  | +            amount += parseFloat(item.actualAmount);
 | 
											
												
													
														|  |            } else {
 |  |            } else {
 | 
											
												
													
														|  | -            this.buyCloudTeacher = false
 |  | 
 | 
											
												
													
														|  | 
 |  | +            this.buyCloudTeacher = false;
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 乐器
 |  |        // 乐器
 | 
											
												
													
														|  |        let ir = this.instrumentResult;
 |  |        let ir = this.instrumentResult;
 | 
											
												
													
														|  |        if (ir.length > 0) {
 |  |        if (ir.length > 0) {
 | 
											
												
													
														|  | -        ir.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        ir.forEach(item => {
 | 
											
												
													
														|  |            if (item.isStatus) {
 |  |            if (item.isStatus) {
 | 
											
												
													
														|  |              if (item.name != "自备乐器") {
 |  |              if (item.name != "自备乐器") {
 | 
											
												
													
														|  |                contractGoodsIds += item.goodsIdList;
 |  |                contractGoodsIds += item.goodsIdList;
 | 
											
										
											
												
													
														|  | @@ -596,7 +679,6 @@ export default {
 | 
											
												
													
														|  |              if (item.kitType == "FREE") {
 |  |              if (item.kitType == "FREE") {
 | 
											
												
													
														|  |                amount += 0;
 |  |                amount += 0;
 | 
											
												
													
														|  |                couponPrice = 0; // 优惠金额
 |  |                couponPrice = 0; // 优惠金额
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |              } else if (item.kitType == "LEASE") {
 |  |              } else if (item.kitType == "LEASE") {
 | 
											
												
													
														|  |                couponPrice = item.coupon; // 优惠金额
 |  |                couponPrice = item.coupon; // 优惠金额
 | 
											
												
													
														|  |                if (item.name != "自备乐器") {
 |  |                if (item.name != "自备乐器") {
 | 
											
										
											
												
													
														|  | @@ -605,7 +687,6 @@ export default {
 | 
											
												
													
														|  |                } else {
 |  |                } else {
 | 
											
												
													
														|  |                  amount += 0;
 |  |                  amount += 0;
 | 
											
												
													
														|  |                }
 |  |                }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |              } else if (item.kitType == "GROUP") {
 |  |              } else if (item.kitType == "GROUP") {
 | 
											
												
													
														|  |                // 团购
 |  |                // 团购
 | 
											
												
													
														|  |                if (
 |  |                if (
 | 
											
										
											
												
													
														|  | @@ -647,51 +728,51 @@ export default {
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 乐器保养
 |  |        // 乐器保养
 | 
											
												
													
														|  | -      const instrumentRepair = this.instrumentRepair
 |  | 
 | 
											
												
													
														|  | -      if(instrumentRepair.length > 0) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const instrumentRepair = this.instrumentRepair;
 | 
											
												
													
														|  | 
 |  | +      if (instrumentRepair.length > 0) {
 | 
											
												
													
														|  |          instrumentRepair.forEach(item => {
 |  |          instrumentRepair.forEach(item => {
 | 
											
												
													
														|  | -          if(item.isStatus) {
 |  | 
 | 
											
												
													
														|  | -            this.buyMaintenance = true
 |  | 
 | 
											
												
													
														|  | -            marketPrice += item.originalAmount
 |  | 
 | 
											
												
													
														|  | -            amount += parseFloat(item.actualAmount)
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (item.isStatus) {
 | 
											
												
													
														|  | 
 |  | +            this.buyMaintenance = true;
 | 
											
												
													
														|  | 
 |  | +            marketPrice += item.originalAmount;
 | 
											
												
													
														|  | 
 |  | +            amount += parseFloat(item.actualAmount);
 | 
											
												
													
														|  |            } else {
 |  |            } else {
 | 
											
												
													
														|  | -            this.buyMaintenance = false
 |  | 
 | 
											
												
													
														|  | 
 |  | +            this.buyMaintenance = false;
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        amount += parseFloat(tempCourseFee + musicClassFee);
 |  |        amount += parseFloat(tempCourseFee + musicClassFee);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 辅件
 |  |        // 辅件
 | 
											
												
													
														|  | -      if (
 |  | 
 | 
											
												
													
														|  | -        this.accessOries.length > 0) {
 |  | 
 | 
											
												
													
														|  | -        this.accessOries.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (this.accessOries.length > 0) {
 | 
											
												
													
														|  | 
 |  | +        this.accessOries.forEach(item => {
 | 
											
												
													
														|  |            //  && this.accessIsShowStatus
 |  |            //  && this.accessIsShowStatus
 | 
											
												
													
														|  |            if (item.isStatus) {
 |  |            if (item.isStatus) {
 | 
											
												
													
														|  | -            tempAccessPrice += this.giveAccessoriesStatus ? 0 : parseFloat(item.price);
 |  | 
 | 
											
												
													
														|  | 
 |  | +            tempAccessPrice += this.giveAccessoriesStatus
 | 
											
												
													
														|  | 
 |  | +              ? 0
 | 
											
												
													
														|  | 
 |  | +              : parseFloat(item.price);
 | 
											
												
													
														|  |              amount += this.giveAccessoriesStatus ? 0 : parseFloat(item.price);
 |  |              amount += this.giveAccessoriesStatus ? 0 : parseFloat(item.price);
 | 
											
												
													
														|  |              if (item.goodsList && item.goodsList.length > 0) {
 |  |              if (item.goodsList && item.goodsList.length > 0) {
 | 
											
												
													
														|  | -              item.goodsList.forEach((childGoods) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +              item.goodsList.forEach(childGoods => {
 | 
											
												
													
														|  |                  tempAccessMarketPrice += parseFloat(childGoods.marketPrice);
 |  |                  tempAccessMarketPrice += parseFloat(childGoods.marketPrice);
 | 
											
												
													
														|  |                  marketPrice += parseFloat(childGoods.marketPrice);
 |  |                  marketPrice += parseFloat(childGoods.marketPrice);
 | 
											
												
													
														|  |                });
 |  |                });
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              goodsGroupIds[item.id] = "ACCESSORIES";
 |  |              goodsGroupIds[item.id] = "ACCESSORIES";
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // 小班课
 |  |        // 小班课
 | 
											
												
													
														|  | -      const activityList = this.activityList
 |  | 
 | 
											
												
													
														|  | -      if(activityList.length > 0) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      const activityList = this.activityList;
 | 
											
												
													
														|  | 
 |  | +      if (activityList.length > 0) {
 | 
											
												
													
														|  |          activityList.forEach(item => {
 |  |          activityList.forEach(item => {
 | 
											
												
													
														|  | -          if(item.isStatus) {
 |  | 
 | 
											
												
													
														|  | -            buyCalenderActivityId.push(item.id)
 |  | 
 | 
											
												
													
														|  | -            marketPrice += item.originalAmount
 |  | 
 | 
											
												
													
														|  | -            amount += parseFloat(item.actualAmount)
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (item.isStatus) {
 | 
											
												
													
														|  | 
 |  | +            buyCalenderActivityId.push(item.id);
 | 
											
												
													
														|  | 
 |  | +            marketPrice += item.originalAmount;
 | 
											
												
													
														|  | 
 |  | +            amount += parseFloat(item.actualAmount);
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        let tempGroupPurchasePrice = amount;
 |  |        let tempGroupPurchasePrice = amount;
 | 
											
										
											
												
													
														|  | @@ -714,13 +795,13 @@ export default {
 | 
											
												
													
														|  |          accessMarketPrice: tempAccessMarketPrice,
 |  |          accessMarketPrice: tempAccessMarketPrice,
 | 
											
												
													
														|  |          accessPrice: tempAccessPrice,
 |  |          accessPrice: tempAccessPrice,
 | 
											
												
													
														|  |          goodsPrice: goodsPrice,
 |  |          goodsPrice: goodsPrice,
 | 
											
												
													
														|  | -        goodsMarketPrice: goodsMarketPrice,
 |  | 
 | 
											
												
													
														|  | 
 |  | +        goodsMarketPrice: goodsMarketPrice
 | 
											
												
													
														|  |        };
 |  |        };
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      permission(str) {
 |  |      permission(str) {
 | 
											
												
													
														|  |        return permission(str);
 |  |        return permission(str);
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -  },
 |  | 
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +  }
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 | 
											
												
													
														|  |  <style lang="less" scoped>
 |  |  <style lang="less" scoped>
 |