Browse Source

Merge branch '08/24teamQuest' of http://git.dayaedu.com/yonge/dy-admin-manager into 08/24teamQuest

mo 2 years ago
parent
commit
1d946b242a

+ 82 - 80
src/views/resetTeaming/components/payInfoDetail.vue

@@ -23,7 +23,7 @@
                   v-if="$route.query.payUserType == 'SCHOOL'"
                 >
                   <el-select
-                  size="mini"
+                    size="mini"
                     v-model="form.calenderFeeType"
                     placeholder="请选择计价标准"
                   >
@@ -42,7 +42,7 @@
                   class="checkBtn"
                   :class="[
                     teamCourse ? 'active' : '',
-                    teamCourseDisabled ? 'disabled' : '',
+                    teamCourseDisabled ? 'disabled' : ''
                   ]"
                   @click.prevent="
                     () => {
@@ -77,7 +77,7 @@
                   class="checkBtn"
                   :class="[
                     member ? 'active' : '',
-                    memberDisabled ? 'disabled' : '',
+                    memberDisabled ? 'disabled' : ''
                   ]"
                   @click.prevent="
                     () => {
@@ -104,13 +104,13 @@
                 <div
                   v-if="
                     isShowLeBao &&
-                    tenantId == 1 &&
-                    $route.query.team_status != 'PROGRESS'
+                      tenantId == 1 &&
+                      $route.query.team_status != 'PROGRESS'
                   "
                   class="checkBtn"
                   :class="[
                     leBao ? 'active' : '',
-                    leBaoDisabled ? 'disabled' : '',
+                    leBaoDisabled ? 'disabled' : ''
                   ]"
                   @click.prevent="
                     () => {
@@ -138,7 +138,7 @@
                   class="checkBtn"
                   :class="[
                     teamActive ? 'active' : '',
-                    teamActiveDisabled ? 'disabled' : '',
+                    teamActiveDisabled ? 'disabled' : ''
                   ]"
                   @click.prevent="
                     () => {
@@ -212,7 +212,7 @@
               <backMoney
                 v-if="
                   $route.query.payUserType == 'SCHOOL' &&
-                  form.currentTotalAmount > 0
+                    form.currentTotalAmount > 0
                 "
                 :form="form"
               />
@@ -232,8 +232,8 @@
                       {
                         required: true,
                         message: '请选择缴费时间',
-                        trigger: 'blur',
-                      },
+                        trigger: 'blur'
+                      }
                     ]"
                     ref="paymentDate"
                   >
@@ -311,8 +311,8 @@
                       {
                         required: true,
                         message: '请输入备注',
-                        trigger: 'blur',
-                      },
+                        trigger: 'blur'
+                      }
                     ]"
                     ref="memo"
                   >
@@ -351,10 +351,10 @@
           <div
             v-if="
               !teamCourse &&
-              !member &&
-              !leBao &&
-              !teamActive &&
-              $route.query.team_status == 'PROGRESS'
+                !member &&
+                !leBao &&
+                !teamActive &&
+                $route.query.team_status == 'PROGRESS'
             "
           >
             <empty desc="暂无缴费项目配置" />
@@ -415,7 +415,7 @@ import dayjs from "dayjs";
 import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
 import {
   chargeTypeList,
-  musicGroupOrganizationCourseSettingsQueryPage,
+  musicGroupOrganizationCourseSettingsQueryPage
 } from "@/api/specialSetting";
 import { getSysTenantConfig } from "@/views/courseRulersManager/api";
 import { sysConfigList } from "@/api/generalSettings";
@@ -424,12 +424,12 @@ import {
   getAllmemberRank,
   musicGroupcreateCalender,
   musicGroupresetCalender,
-  getAutoActivationFlag,
+  getAutoActivationFlag
 } from "../api";
 import {
   getMusicGroupPaymentCalenderDetail,
   findMusicGroupSubjectInfo,
-  getAgreement,
+  getAgreement
 } from "@/api/buildTeam";
 import { vipGroupActivity } from "@/api/vipSeting";
 export default {
@@ -440,7 +440,7 @@ export default {
     payTeamActive,
     subjectPreview,
     paySchoolInfo,
-    backMoney,
+    backMoney
   },
   data() {
     return {
@@ -456,8 +456,8 @@ export default {
             actualAmount: "",
             memberRankSettingId: "",
             optionalFlag: null,
-            autoActivationFlag: false,
-          },
+            autoActivationFlag: false
+          }
         ],
         leBaoList: [{}],
         activeList: [{}],
@@ -471,12 +471,12 @@ export default {
         calenderFeeJson: {
           discountTotal: "",
           allTotal: "",
-          sutdentNumber: "",
+          sutdentNumber: ""
         },
         calenderFeeType: "STUDENT",
         musicGroupCalenderRefundPeriods: [{ refundDate: "", refundAmount: "" }],
         currentTotalAmount: 0,
-        contractUrl: "",
+        contractUrl: ""
       },
       teamCourse: false,
       member: false,
@@ -506,7 +506,7 @@ export default {
         minHalfYearFee: null,
         maxHalfYearFee: null,
         minYearFee: null,
-        maxYearFee: null,
+        maxYearFee: null
       },
       dialogSubjectVisible: false, // 预览
       dialogSubjectList: [],
@@ -515,7 +515,7 @@ export default {
       tenantId: null,
       isField: false,
       showAutoActivationFlag: false,
-      initDetail: false,
+      initDetail: false
     };
   },
   mounted() {
@@ -580,8 +580,8 @@ export default {
         // 说明是修改  查缴项目详情
         this.initDetail = true;
         await getMusicGroupPaymentCalenderDetail({
-          id: this.$route.query.calenderId,
-        }).then((res) => {
+          id: this.$route.query.calenderId
+        }).then(res => {
           if (res.code == 200) {
             if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
               this.form.leixing = "1";
@@ -590,15 +590,22 @@ export default {
             } else {
               this.form.leixing = "2";
             }
-            console.log( res.data?.calender?.startPaymentDate)
-            if(res.data?.calender?.startPaymentDate&& res.data?.calender?.deadlinePaymentDate){
+            console.log(res.data?.calender?.startPaymentDate);
+            if (
+              res.data?.calender?.startPaymentDate &&
+              res.data?.calender?.deadlinePaymentDate
+            ) {
               this.$set(this.form, "paymentDate", [
-              res.data?.calender?.startPaymentDate,
-              res.data?.calender?.deadlinePaymentDate,
-            ]);
+                res.data?.calender?.startPaymentDate,
+                res.data?.calender?.deadlinePaymentDate
+              ]);
             }
 
-            this.$set(this.form, "contractUrl", res.data?.calender?.contractUrl);
+            this.$set(
+              this.form,
+              "contractUrl",
+              res.data?.calender?.contractUrl
+            );
             this.$set(this.form, "memo", res.data?.calender?.memo);
 
             this.$set(
@@ -671,7 +678,7 @@ export default {
               this.teamActive = true;
 
               this.$set(this.form, "activeList", res.data.activity);
-              this.form.activeList.forEach((active) => {
+              this.form.activeList.forEach(active => {
                 active.vipGroupCategoryNames = active.categoryName;
               });
             }
@@ -689,8 +696,8 @@ export default {
         page: 1,
         status: "PROGRESS",
         activityChannel: 1,
-        enable: true,
-      }).then((res) => {
+        enable: true
+      }).then(res => {
         if (res.code == 200) {
           this.activeList = res.data.rows;
           if (this.activeList.length <= 0) {
@@ -712,7 +719,7 @@ export default {
       try {
         const res = await sysConfigList({ group: "DEFAULT" });
         const paramName = "cloud_price_range";
-        res.data.forEach((item) => {
+        res.data.forEach(item => {
           if (item.paramName == paramName) {
             const itemValue = item.paranValue
               ? JSON.parse(item.paranValue)
@@ -730,7 +737,7 @@ export default {
       try {
         const res = await getSysTenantConfig({ group: "MUSIC_REPAIR" });
         this.leBaoInfo = res.data;
-        res.data.forEach((element) => {
+        res.data.forEach(element => {
           if (element.id == 188) {
             this.isShowLeBao = !!element.paranValue;
           }
@@ -759,9 +766,9 @@ export default {
         const res = await musicGroupOrganizationCourseSettingsQueryPage({
           row: 9999,
           chargeTypeId,
-          organId,
+          organId
         });
-        const ids = res.data.rows.map((item) => item.id);
+        const ids = res.data.rows.map(item => item.id);
         if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
           this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
         }
@@ -787,19 +794,19 @@ export default {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query,
+          query
         });
       } else if (query.type == "look") {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query,
+          query
         });
       } else if (query.type == "teamDraft" || query.type == "feeAudit") {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query,
+          query
         });
       }
     },
@@ -809,7 +816,7 @@ export default {
       const chargeTypeId = this.musicGroup?.chargeTypeId;
       const _ = {};
       const list = (this.organizationCourseUnitPriceSettings || []).filter(
-        (item) =>
+        item =>
           organId &&
           organId == item.organId &&
           chargeTypeId &&
@@ -877,23 +884,19 @@ export default {
       this.$set(
         this.form,
         "activeList",
-        this.form.activeList.filter((item) => !!item)
+        this.form.activeList.filter(item => !!item)
       );
     },
     removeExtraClass(index) {
       this.form.eclass[index] = null;
-      this.$set(
-        this.form,
-        "eclass",
-        this.form.eclass.filter((item) => !!item)
-      );
+      this.$set(this.form, "eclass", this.form.eclass.filter(item => !!item));
       // this.form.eclass = this.form.eclass.filter((item) => !!item);
     },
     async onPreview() {
       // 开始预览
       const musicGroupId = this.$route.query.id;
       await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
-        (res) => {
+        res => {
           if (res.code == 200) {
             this.dialogSubjectList = res.data.musicGroupSubjectPlans;
             // 默认预览第一个
@@ -917,7 +920,7 @@ export default {
             this.$confirm("是否创建缴费?", "提示", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
-              type: "warning",
+              type: "warning"
             })
               .then(() => {
                 this.onSubmit();
@@ -936,12 +939,12 @@ export default {
       });
     },
     onSubmit() {
-      this.$refs.form.validate(async (isok) => {
+      this.$refs.form.validate(async isok => {
         if (isok) {
           let obj = this.fommatDate();
           if (this.form.payUserType == "SCHOOL") {
             let total = 0;
-            this.form.musicGroupCalenderRefundPeriods.forEach((item) => {
+            this.form.musicGroupCalenderRefundPeriods.forEach(item => {
               total += item.refundAmount * 1;
             });
             if (total != this.form.currentTotalAmount) {
@@ -963,7 +966,7 @@ export default {
                   res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
                   "提示",
                   {
-                    type: "warning",
+                    type: "warning"
                   }
                 );
                 obj.confirmCreate = true;
@@ -986,7 +989,7 @@ export default {
                   res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
                   "提示",
                   {
-                    type: "warning",
+                    type: "warning"
                   }
                 );
                 obj.confirmCreate = true;
@@ -1016,7 +1019,7 @@ export default {
           // 值有start,center,end,nearest,当前显示在视图区域中间
           block: "center",
           // 值有auto、instant,smooth,缓动动画(当前是慢速的)
-          behavior: "smooth",
+          behavior: "smooth"
         });
         break; // 跳出循环了
       }
@@ -1029,7 +1032,7 @@ export default {
       let tmpActiveList = form.activeList?.length > 0 ? form.activeList : [];
       let activeList = [];
       if (tmpActiveList.length > 0) {
-        tmpActiveList.forEach((active) => {
+        tmpActiveList.forEach(active => {
           if (active.activityId) {
             active.categoryName = active.vipGroupCategoryNames;
             activeList.push(active);
@@ -1040,7 +1043,7 @@ export default {
         form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
       // 获取会员名称
       if (memberObj) {
-        this.memberRankList.forEach((item) => {
+        this.memberRankList.forEach(item => {
           if (item.id == memberObj.memberRankSettingId) {
             memberObj.name = item.name;
           }
@@ -1050,7 +1053,7 @@ export default {
       let tempCourseList = form.eclass?.length > 0 ? form.eclass : [];
       let courseList = [];
       if (tempCourseList.length > 0) {
-        tempCourseList.forEach((course) => {
+        tempCourseList.forEach(course => {
           if (course.courseType) {
             course.isStudentOptional = true;
             courseList.push(course);
@@ -1070,12 +1073,12 @@ export default {
             this.isShowLeBao &&
             this.$route.query.team_status != "PROGRESS"
               ? { ...form.leBaoList[0], optionalFlag: false }
-              : null, // 乐保
+              : null // 乐保
         },
         isShowMemberForPay: form.isShowMemberForPay,
         isShowMusicInsuranceForPay: form.isShowMusicInsuranceForPay,
         isShowVipCourseForPay: form.isShowVipCourseForPay,
-        isShowMusicCourseForPay: form.isShowMusicCourseForPay,
+        isShowMusicCourseForPay: form.isShowMusicCourseForPay
       };
     },
     fommatDate() {
@@ -1105,8 +1108,8 @@ export default {
             isShowMemberForPay: this.form.isShowMemberForPay,
             isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
             isShowVipCourseForPay: this.form.isShowVipCourseForPay,
-            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
-          }),
+            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
+          })
         };
       } else {
         let calenderFeeJson = this.form.calenderFeeJson;
@@ -1139,14 +1142,14 @@ export default {
             isShowMemberForPay: this.form.isShowMemberForPay,
             isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
             isShowVipCourseForPay: this.form.isShowVipCourseForPay,
-            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
+            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
           }),
           calenderFeeType: this.form.calenderFeeType,
           calenderFeeJson: JSON.stringify(calenderFeeJson),
-          musicGroupCalenderRefundPeriods:
-            this.form.musicGroupCalenderRefundPeriods,
+          musicGroupCalenderRefundPeriods: this.form
+            .musicGroupCalenderRefundPeriods,
           currentTotalAmount: this.form.currentTotalAmount,
-          contractUrl: this.form.contractUrl,
+          contractUrl: this.form.contractUrl
         };
       }
     },
@@ -1170,7 +1173,7 @@ export default {
     },
     currentTotalAmount(val) {
       this.$set(this.form, "currentTotalAmount", val);
-    },
+    }
   },
   watch: {
     teamCourse(val) {
@@ -1202,17 +1205,17 @@ export default {
           return;
         }
         let arr = [];
-        newValue.forEach((item) => {
+        newValue.forEach(item => {
           arr.push({
             courseType: item.courseType,
             teacherNumber: 0,
             courseNumber: 0,
-            courseCurrentPrice: 0,
+            courseCurrentPrice: 0
           });
         });
         this.$set(this.form, "teacherFeeList", arr);
       },
-      deep: true,
+      deep: true
     },
     "form.currentTotalAmount"(val) {
       // console.log(val,'form.currentTotalAmount');
@@ -1224,11 +1227,11 @@ export default {
       if (val && !this.isSetCourseSettingsId) {
         try {
           const res = await queryByMusicGroupOrganizationCourseSettingsId({
-            id: val,
+            id: val
           });
-          let CourseSettingDetail = res.data.map((course) => {
+          let CourseSettingDetail = res.data.map(course => {
             return {
-              ...course,
+              ...course
             };
           });
           this.$set(this.form, "eclass", res.data);
@@ -1257,13 +1260,13 @@ export default {
         this.$set(this.form, "eclass", [{}]);
       }
       this.isSetCourseSettingsId = false;
-    },
+    }
   },
   computed: {
     musicGroup() {
       return this.baseInfo?.musicGroup;
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -1473,4 +1476,3 @@ export default {
   padding-bottom: 20px;
 }
 </style>
-

+ 9 - 6
src/views/resetTeaming/modals/accessories.vue

@@ -7,22 +7,24 @@
     <div class="section" v-if="accessOries.length > 0" key="accessOries">
       <!-- <h2 class="titles">辅件</h2> -->
       <el-row class="title-row">
-        <el-col :span="12">辅件商品</el-col>
+        <el-col :span="isShowSalePrice ? 14 : 19">辅件商品</el-col>
         <!--  -->
-        <el-col :span="5" :offset="1" style="text-align: right">原价</el-col>
-        <el-col :span="5" :offset="1" 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>
 
       <div v-for="(instr, index) in accessOries" :key="index">
         <el-row class="option-row" @click.native="onAuxiliarie(instr)">
-          <el-col :span="12">
+          <el-col :span="isShowSalePrice ? 14 : 19">
             <i
               class="check_default"
               :class="[instr.isStatus ? 'check_active' : '']"
             ></i
             >{{ instr.name }}
           </el-col>
-          <el-col :span="6">
+          <el-col :span="5">
             <del style="color: #808080; font-size: 12px"
               >¥{{
                 instr.goodsList[0]
@@ -31,7 +33,7 @@
               }}</del
             >
           </el-col>
-          <el-col :span="6">
+          <el-col :span="5" v-if="isShowSalePrice">
             <span style="color: #1a1a1a" v-if="instr.price == 0">免费</span>
             <span style="color: #1a1a1a" v-else
               >¥{{ (isGiveAccessories ? 0 : instr.price) | moneyFormat }}</span
@@ -61,6 +63,7 @@ export default {
     trainSmallBg: String,
     accessOries: Array,
     isGiveAccessories: Boolean, // 是否赠送辅件,如果为是,则不价格为0
+    isShowSalePrice: Boolean
   },
   data() {
     return {};

+ 54 - 38
src/views/resetTeaming/modals/activity.vue

@@ -1,68 +1,84 @@
 <template>
   <div class="courseModel" style="margin-top: 12px">
     <h2 class="titles">
-			<img :src="trainSmallBg" />
-			<span>小班课</span>
-		</h2>
+      <img :src="trainSmallBg" />
+      <span>小班课</span>
+    </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-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>
       <div v-for="(item, index) in activityList" :key="index">
         <el-row class="option-row" @click.native="onCourseChange(item)">
-          <el-col :span="12">
-            <i class="check_default"  :class="[item.isStatus ? 'check_active' : '', item.optionalFlag ? 'disabled' : '']"></i>
+          <el-col :span="isShowSalePrice ? 9 : 14">
+            <i
+              class="check_default"
+              :class="[
+                item.isStatus ? 'check_active' : '',
+                item.optionalFlag ? 'disabled' : ''
+              ]"
+            ></i>
             <span style="display: flex; align-items: center;">
               <template>{{ item.categoryName }}</template>
             </span>
           </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 :span="5">
+            <span style="color: #AAA; font-size: 12px">{{ item.num }}(节)</span>
+          </el-col>
+          <el-col :span="5">
+            <del style="color: #808080; 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>
   </div>
 </template>
 
 <script>
 export default {
-    name: 'courseModel',
-    props: {
-			trainSmallBg: String,
-			activityList: Array
-    },
-    methods: {
-      onCourseChange(item) {
-        this.$emit('onCheckItem', item)
-      }
+  name: "courseModel",
+  props: {
+    trainSmallBg: String,
+    activityList: Array,
+    isShowSalePrice: Boolean
+  },
+  methods: {
+    onCourseChange(item) {
+      this.$emit("onCheckItem", item);
     }
-}
+  }
+};
 </script>
 
 <style lang="less" scoped>
 .giveTitle {
-	margin-top: 16px;
-	padding-top: 8px;
-	color: #1A1A1A;
-	font-size: 14;
-	padding-left: 24;
+  margin-top: 16px;
+  padding-top: 8px;
+  color: #1a1a1a;
+  font-size: 14;
+  padding-left: 24;
 }
 .small_point {
-	position: absolute;
-	left: 8px;
-	top: 7px;
-	width: 6px;
-	height: 6px;
-	background: #01C1B5;
-	border-radius: 50%;
+  position: absolute;
+  left: 8px;
+  top: 7px;
+  width: 6px;
+  height: 6px;
+  background: #01c1b5;
+  border-radius: 50%;
 }
 @import url("./signUpPayment.less");
-</style>
+</style>

+ 20 - 8
src/views/resetTeaming/modals/courseModel.vue

@@ -31,10 +31,13 @@
         "
       >
         <el-row class="title-row">
-          <el-col :span="12">课程类型</el-col>
+          <el-col :span="isShowSalePrice ? 9 : 14">课程类型</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-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"
@@ -42,7 +45,7 @@
           v-for="(item, index) in courseInfo"
           :key="index"
         >
-          <el-col :span="12">
+          <el-col :span="isShowSalePrice ? 9 : 14">
             <i
               class="check_default"
               :class="[
@@ -55,14 +58,22 @@
             }}</template
             ><template v-else>{{ item.courseType | coursesType }}</template>
           </el-col>
-          <el-col :span="6">
+          <el-col :span="5">
             <span style="color: #AAA; font-size: 12px;"
               >{{ item.courseTotalMinuties }}(分钟)</span
             >
           </el-col>
-          <el-col :span="6">
+          <el-col :span="5">
+            <del style="color: #AAA; font-size: 12px;"
+              >¥{{ item.courseOriginalPrice | moneyFormat }}</del
+            >
+          </el-col>
+          <el-col :span="5" v-if="isShowSalePrice">
             <span style="color: #1A1A1A"
-              >¥{{ (remissionCourseFeeStatus ? 0 : item.courseCurrentPrice) | moneyFormat }}</span
+              >¥{{
+                (remissionCourseFeeStatus ? 0 : item.courseCurrentPrice)
+                  | moneyFormat
+              }}</span
             >
           </el-col>
         </el-row>
@@ -154,7 +165,8 @@ export default {
     chargeTypeName: String,
     memberCoursePrice: Array,
     memberCourseShowFlag: Boolean,
-    remissionCourseFeeStatus: Boolean
+    remissionCourseFeeStatus: Boolean,
+    isShowSalePrice: Boolean
   },
   components: {
     // videoPlayer

+ 64 - 34
src/views/resetTeaming/modals/instrumentModel.vue

@@ -7,7 +7,9 @@
     <div class="section" v-if="instrumentResultList.length > 0">
       <div v-for="(i, index) in instrumentResultList" :key="index">
         <el-row class="title-row">
-          <el-col :span="13">
+          <el-col
+            :span="i[0]['kitType'] == 'LEASE' || isShowSalePrice ? 14 : 19"
+          >
             <template v-if="i[0]['kitType'] == 'GROUP'">
               团购乐器
             </template>
@@ -28,21 +30,29 @@
             >
             <!-- <template v-if="i[0]['kitType'] == 'LEASE'">原价</template> -->
           </el-col>
-          <el-col :span="5" :offset="1" style="text-align: right;">
-            <!-- <template v-if="i[0]['kitType'] == 'GROUP' || i[0]['kitType'] == 'FREE'">现价</template> -->
-            <template v-if="['GROUP', 'FREE'].includes(i[0]['kitType'])"
-              >现价</template
-            >
-            <template v-if="i[0]['kitType'] == 'LEASE'"
-              >租赁押金</template
-            >
+          <el-col
+            :span="5"
+            style="text-align: right;"
+            v-if="
+              ['GROUP', 'FREE'].includes(i[0]['kitType']) && isShowSalePrice
+            "
+          >
+            售价
+          </el-col>
+          <el-col
+            :span="5"
+            style="text-align: right;"
+            v-if="i[0]['kitType'] == 'LEASE'"
+            >租赁押金
           </el-col>
         </el-row>
 
         <div v-for="(con, index) in i" :key="index">
           <div @click="instrumentF(con)">
             <el-row class="option-row">
-              <el-col :span="12">
+              <el-col
+                :span="con.kitType == 'LEASE' || isShowSalePrice ? 14 : 19"
+              >
                 <i
                   class="check_default"
                   :class="[con.isStatus ? 'check_active' : '']"
@@ -51,26 +61,36 @@
                   {{ con.name }}
                 </div>
               </el-col>
-              <el-col :span="6">
+              <el-col :span="5">
                 <del
                   style="color: #808080; font-size: 12px;"
                   v-if="con.kitType != 'owned'"
                   >¥{{ con.marketPrice | moneyFormat }}</del
                 >
               </el-col>
-              <el-col :span="6">
-                <span style="color: #1A1A1A" v-if="con.kitType == 'LEASE'"
-                  >¥{{
-                    Number((con.depositFee - con.coupon).toFixed(2))
-                      | moneyFormat
-                  }}</span
-                >
+              <el-col
+                :span="5"
+                v-if="
+                  ['FREE', 'GROUP'].includes(con.kitType) && isShowSalePrice
+                "
+              >
                 <span style="color: #1A1A1A" v-if="con.kitType == 'FREE'"
                   >¥{{ 0 | moneyFormat }}</span
                 >
+                <!-- 乐器现价 = 乐器现价 + 分部分润金额 -->
                 <span style="color: #1A1A1A" v-if="con.kitType == 'GROUP'"
                   >¥{{
-                    Number((con.price - con.coupon).toFixed(2)) | moneyFormat
+                    Number(
+                      (con.price - con.coupon + con.organShareProfit).toFixed(2)
+                    ) | moneyFormat
+                  }}</span
+                >
+              </el-col>
+              <el-col :span="5" v-if="con.kitType == 'LEASE'">
+                <span style="color: #1A1A1A"
+                  >¥{{
+                    Number((con.depositFee - con.coupon).toFixed(2))
+                      | moneyFormat
                   }}</span
                 >
               </el-col>
@@ -79,14 +99,23 @@
             <el-row style="padding-left: 26px; margin-bottom: 5px;">
               <el-col :span="24">
                 <div style="display: flex;align-items: center;">
-                    <div
-                      v-if="con.goodsList"
-                      style="font-size: 12px; color: #808080"
-                    >
-                      {{ con.goodsList[0].specification }}
-                    </div>
-                    <el-tag effect="plain" size="mini" style="margin-left: 10px; color: #ff4644;" @click.stop="onLookRule" v-if="con.groupRemissionCourseFee == 1 && con.kitType == 'GROUP'">课程减免</el-tag>
+                  <div
+                    v-if="con.goodsList"
+                    style="font-size: 12px; color: #808080"
+                  >
+                    {{ con.goodsList[0].specification }}
                   </div>
+                  <el-tag
+                    effect="plain"
+                    size="mini"
+                    style="margin-left: 10px; color: #ff4644;border-color: #ff4644;"
+                    @click.stop="onLookRule"
+                    v-if="
+                      con.groupRemissionCourseFee == 1 && con.kitType == 'GROUP'
+                    "
+                    >课程减免</el-tag
+                  >
+                </div>
               </el-col>
             </el-row>
             <!-- <el-row
@@ -118,14 +147,15 @@ export default {
     buyMaintenance: Boolean,
     trainSmallBg: String,
     toolsPackage: Array,
-    organId: [Number, String, null]
+    organId: [Number, String, null],
+    isShowSalePrice: Boolean
   },
   methods: {
     // onLeBao() {
     //     this.$emit('onLeBao')
     // },
     instrumentF(item) {
-      this.$emit("instrumentF", item, 'INSTRUMENT');
+      this.$emit("instrumentF", item, "INSTRUMENT");
     },
     onQuestions(item) {
       this.$emit("onQuestions", item);
@@ -142,11 +172,11 @@ export default {
 <style lang="less" scoped>
 @import url("./signUpPayment.less");
 .icon_courseFee {
-	margin-left: 9px;
-	display: inline-block;
-	width: 17px;
-	height: 15px;
-	background: url('../../../assets/images/musicGroup/icon_courseFee.png');
-	background-size: 100%;
+  margin-left: 9px;
+  display: inline-block;
+  width: 17px;
+  height: 15px;
+  background: url("../../../assets/images/musicGroup/icon_courseFee.png");
+  background-size: 100%;
 }
 </style>

+ 20 - 7
src/views/resetTeaming/modals/member.vue

@@ -19,13 +19,20 @@
 
     <div class="section">
       <el-row class="title-row">
-        <el-col :span="12">练习系统{{ isGiveAccessories && accessStatus ? '(赠送辅件一套)' : null }}</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-col :span="isShowSalePrice ? 9 : 14"
+          >练习系统{{
+            isGiveAccessories && accessStatus ? "(赠送辅件一套)" : null
+          }}</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>
       <div v-for="(item, index) in toolsPackage" :key="index">
         <el-row class="option-row" @click.native="onTrainChange(item)">
-          <el-col :span="12">
+          <el-col :span="isShowSalePrice ? 9 : 14">
             <i
               class="check_default"
               :class="[
@@ -37,12 +44,17 @@
               <template>{{ item.name }}</template>
             </span>
           </el-col>
-          <el-col :span="6">
+          <el-col :span="5">
             <span style="color: #AAA; font-size: 12px;"
               >{{ item.num }}({{ item.period | unitFormat }})</span
             >
           </el-col>
-          <el-col :span="6">
+          <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
             >
@@ -90,6 +102,7 @@ export default {
     trainSmallBg: String,
     isGiveAccessories: Boolean,
     accessStatus: Boolean,
+    isShowSalePrice: Boolean
   },
   data() {
     return {
@@ -100,7 +113,7 @@ export default {
   methods: {
     onTrainChange(item) {
       // 云教练点击时
-      this.$emit("onCheckItem", item, 'train');
+      this.$emit("onCheckItem", item, "train");
     },
     onQuestions(item) {
       this.$emit("onQuestions", item);

+ 20 - 15
src/views/resetTeaming/modals/signUpPayment.less

@@ -21,7 +21,7 @@
 
   .toolTitle {
     font-size: 18px;
-    color: #AC4C31;
+    color: #ac4c31;
     display: flex;
     font-weight: bold;
     align-items: center;
@@ -35,11 +35,11 @@
       display: inline-block;
       width: 15px;
       height: 15px;
-      background: url('../../../assets/images/musicGroup/video_btn.png');
+      background: url("../../../assets/images/musicGroup/video_btn.png");
       background-size: 100%;
     }
 
-    >span {
+    > span {
       display: flex;
       font-size: 11px;
       line-height: 1.5;
@@ -84,7 +84,7 @@
     width: 100%;
   }
 
-  &>span {
+  & > span {
     position: absolute;
     top: 0;
     left: 0;
@@ -95,7 +95,7 @@
     padding: 0 10px;
     font-size: 18px;
     font-weight: bold;
-    color: #AC4C31;
+    color: #ac4c31;
   }
 }
 
@@ -109,18 +109,19 @@
 }
 
 .disabled {
-
   // opacity: 0.5;
   // .check_active {
   //   opacity: 0.5;
   // }
   &::before {
-    background: url("../../../assets/images/icon_checkbox_disable.png") no-repeat center !important;
+    background: url("../../../assets/images/icon_checkbox_disable.png")
+      no-repeat center !important;
     background-size: contain !important;
   }
 
   .check_active::before {
-    background: url("../../../assets/images/icon_checkbox_disable.png") no-repeat center;
+    background: url("../../../assets/images/icon_checkbox_disable.png")
+      no-repeat center;
     background-size: contain;
   }
 }
@@ -131,15 +132,17 @@
   //     opacity: 0.5;
   // }
   &::before {
-      background: url("../../../assets/images/icon_checkbox_default_disabled.png") no-repeat center;
-      background-size: contain;
-      border-radius: 50%;
+    background: url("../../../assets/images/icon_checkbox_default_disabled.png")
+      no-repeat center;
+    background-size: contain;
+    border-radius: 50%;
   }
 
   .check_active {
-      background: url("../../../assets/images/icon_checkbox_default_disabled.png") no-repeat center;
-      background-size: contain;
-      border-radius: 50%;
+    background: url("../../../assets/images/icon_checkbox_default_disabled.png")
+      no-repeat center;
+    background-size: contain;
+    border-radius: 50%;
   }
 }
 
@@ -310,7 +313,8 @@
     &::before {
       display: block;
       content: " ";
-      background: url("../../../assets/images/icon_checkbox.png") no-repeat center;
+      background: url("../../../assets/images/icon_checkbox.png") no-repeat
+        center;
       border: 1px solid transparent;
       background-size: contain;
     }
@@ -350,6 +354,7 @@
     // align-items: center;
   }
 
+  .el-col-5,
   .el-col-6,
   .el-col-8,
   .el-col-11 {

+ 248 - 167
src/views/resetTeaming/modals/subject-preview.vue

@@ -3,7 +3,8 @@
     <tips />
 
     <course-model
-    v-if="mypreViewData&&mypreViewData.isShowMusicCourseForPay"
+      v-if="mypreViewData && mypreViewData.isShowMusicCourseForPay"
+      :isShowSalePrice="isShowSalePrice"
       :courseViewType="courseViewType"
       :courseShowInfo="courseShowInfo"
       :remissionCourseFeeStatus="remissionCourseFeeStatus"
@@ -19,7 +20,13 @@
     />
 
     <member
-      v-if="toolsPackage && toolsPackage.length > 0&&mypreViewData&&mypreViewData.isShowMemberForPay"
+      v-if="
+        toolsPackage &&
+          toolsPackage.length > 0 &&
+          mypreViewData &&
+          mypreViewData.isShowMemberForPay
+      "
+      :isShowSalePrice="isShowSalePrice"
       :toolsPackage="toolsPackage"
       :isGiveAccessories="isGiveAccessories"
       :accessStatus="accessOries.length > 0"
@@ -27,6 +34,7 @@
     />
 
     <instrument-model
+      :isShowSalePrice="isShowSalePrice"
       :instrumentResultList="instrumentResultList"
       :buyMaintenance="buyMaintenance"
       :trainSmallBg="trainSmallBg"
@@ -37,48 +45,87 @@
       @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">
         <img :src="trainSmallBg" />
         <span>乐器保养</span>
       </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 }}
-					</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>
 
-     <accessories
+    <accessories
+      :isShowSalePrice="isShowSalePrice"
       :trainSmallBg="trainSmallBg"
       :accessOries="accessOries"
       :isGiveAccessories="giveAccessoriesStatus"
       @onAuxiliarie="onCheckItem"
     />
     <activity
-      v-if="activityList && activityList.length > 0&&mypreViewData&&mypreViewData.isShowVipCourseForPay"
+      v-if="
+        activityList &&
+          activityList.length > 0 &&
+          mypreViewData &&
+          mypreViewData.isShowVipCourseForPay
+      "
+      :isShowSalePrice="isShowSalePrice"
       :trainSmallBg="trainSmallBg"
       :activityList="activityList"
       @onCheckItem="onCheckItem"
     />
 
-
     <!-- <div class="buy">
       <div class="price">
         <p class="oldprice">
@@ -104,17 +151,24 @@ import dayjs from "dayjs";
 const paymentPatternType = {
   0: "按月",
   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 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 {
   props: ["subjectId", "calenderId", "preViewData"],
-  components: { Tips, courseModel, InstrumentModel, accessories, activity, member },
+  components: {
+    Tips,
+    courseModel,
+    InstrumentModel,
+    accessories,
+    activity,
+    member
+  },
   data() {
     const query = this.$route.query;
     return {
@@ -145,7 +199,7 @@ export default {
         accessPrice: 0, // 辅件现价
         accessMarketPrice: 0, // 辅件原价
         goodsPrice: 0, // 乐器现价
-        goodsMarketPrice: 0, // 乐器原价
+        goodsMarketPrice: 0 // 乐器原价
       }, // 金额列表,金额计算
       toolsPackage: [], // 学习工具包
       instrumentRepair: [], // 乐保信息
@@ -178,13 +232,14 @@ export default {
       remissionCourseFeeStatus: false,
       isGiveAccessories: false, // 是否赠送辅件
       giveAccessoriesStatus: false,
-      mypreViewData:{
-        isShowMemberForPay:true,
-          isShowMusicInsuranceForPay:true,
-          isShowVipCourseForPay:true,
-          isShowMusicCourseForPay:true,
-      }
-    }
+      mypreViewData: {
+        isShowMemberForPay: true,
+        isShowMusicInsuranceForPay: true,
+        isShowVipCourseForPay: true,
+        isShowMusicCourseForPay: true
+      },
+      isShowSalePrice: true // 是否显示原价
+    };
   },
   mounted() {
     this.__init();
@@ -195,30 +250,37 @@ export default {
       let params = {
         musicGroupId: this.musicGroupId,
         subjectId: this.subjectId,
-        calenderId: this.calenderId,
+        calenderId: this.calenderId
       };
-      await getSubjectGoodsAndInfoPreview(params).then((res) => {
+      await getSubjectGoodsAndInfoPreview(params).then(res => {
         let result = res;
         if (result.code == 200) {
           let tempResult = result.data;
-          this.__dataFormat(tempResult)
+          this.__dataFormat(tempResult);
         }
         // 初始化计算金额
         this.calcPrice();
       });
     },
     __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.isGiveAccessories = tempResult.musicGroup && tempResult.musicGroup.isGiveAccessories || false; // 是否赠送辅件
+      this.isGiveAccessories =
+        (tempResult.musicGroup && tempResult.musicGroup.isGiveAccessories) ||
+        false; // 是否赠送辅件
       this.organId = tempResult.musicGroup.organId;
-      const musicGroupStatus = tempResult.musicGroup.status
+      const musicGroupStatus = tempResult.musicGroup.status;
       this.cloudTeacherFee = tempResult.cloudTeacherFee || 0;
       this.cloudTeacherPlusFee = tempResult.cloudTeacherPlusFee || 0;
 
@@ -226,7 +288,7 @@ export default {
       for (let i in memberCoursePrice) {
         this.memberCoursePrice.push({
           name: coursesType[i],
-          price: memberCoursePrice[i],
+          price: memberCoursePrice[i]
         });
       }
       this.memberCourseShowFlag =
@@ -245,60 +307,71 @@ export default {
             tempResult.musicGroupPaymentCalender.paymentValidEndDate
           ).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
         ? tempResult.memberPrivilegesItemList
         : [];
       let tempMember = [];
-      memberPrivilegesItemList.forEach((member) => {
+      memberPrivilegesItemList.forEach(member => {
         if (
           member.memberPrivilegesItems &&
           member.memberPrivilegesItems.length > 0
         ) {
-          member.memberPrivilegesItems.forEach((item) => {
+          member.memberPrivilegesItems.forEach(item => {
             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 => {
-        i.isStatus = true
-      })
-      this.activityList = [...activity]
+        i.isStatus = true;
+      });
+      this.activityList = [...activity];
 
       // 判断是否有课程
       if (tempInfo && tempInfo.length > 0) {
-
         // 默认课程都选中
-        tempInfo.forEach((item) => {
+        tempInfo.forEach(item => {
           // if (item && item.isStudentOptional) {
-            // item.isStatus = false;
+          // item.isStatus = false;
           // } else {
-            item.isStatus = true;
+          item.isStatus = true;
           // }
         });
         this.courseInfo = tempInfo;
@@ -307,8 +380,12 @@ export default {
       this.musicGroupSubject = tempResult.musicGroupSubjectPlan || [];
       let instrumentInfo = {};
       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") {
           // 获取乐器所有提供方式
           let KGPTJ = item.kitGroupPurchaseTypeJson
@@ -319,7 +396,7 @@ export default {
             tempItem.marketPrice = tempItem.goodsList[0].marketPrice;
             tempItem.kitType = single; // 优惠模式
             tempItem.coupon = KGPTJ[single]; // 优惠金额
-            tempItem.discountPrice = tempItem.goodsList[0].discountPrice
+            tempItem.discountPrice = tempItem.goodsList[0].discountPrice;
             if (instrumentInfo.id) {
               tempItem.isStatus = false;
               if (single == "GROUP") {
@@ -330,7 +407,7 @@ export default {
                   instrumentInfo.kitType == "LEASE" ||
                   instrumentInfo.kitType == "FREE"
                 ) {
-                  this.instrumentResult.forEach((instrRes) => {
+                  this.instrumentResult.forEach(instrRes => {
                     instrRes.isStatus = false;
                   });
                   tempItem.isStatus = true;
@@ -347,7 +424,7 @@ export default {
                   instrumentInfo.kitType == "LEASE" &&
                   instrumentInfo.price < tempItem.price
                 ) {
-                  this.instrumentResult.forEach((instrRes) => {
+                  this.instrumentResult.forEach(instrRes => {
                     instrRes.isStatus = false;
                   });
                   tempItem.isStatus = true;
@@ -364,7 +441,7 @@ export default {
                   instrumentInfo.kitType == "FREE" &&
                   instrumentInfo.price < tempItem.price
                 ) {
-                  this.instrumentResult.forEach((instrRes) => {
+                  this.instrumentResult.forEach(instrRes => {
                     instrRes.isStatus = false;
                   });
                   tempItem.isStatus = true;
@@ -386,11 +463,8 @@ export default {
               };
             }
             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") {
                   childGoodsNameList.push(child.name);
                 }
@@ -408,29 +482,29 @@ export default {
       });
       // 添加自备选项
       if (this.instrumentResult.length > 0) {
-        let sorted = this.groupBy(tempInstrument, (item) => {
+        let sorted = this.groupBy(tempInstrument, item => {
           return [item.kitType];
         });
         this.instrumentResultList = sorted;
 
         // 设置是否有减免金额
-        this.instrumentGetStatus()
-        this.setLeBaoStatus()
+        this.instrumentGetStatus();
+        this.setLeBaoStatus();
       }
       // 如果选择的是乐保,则把所有辅件价格设置为0
-      this.giveAccessoriesSetStatus()
+      this.giveAccessoriesSetStatus();
 
       // 初始化计算金额
       this.calcPrice();
     },
     groupBy(array, f) {
       var groups = {};
-      array.forEach(function (o) {
+      array.forEach(function(o) {
         var group = JSON.stringify(f(o));
         groups[group] = groups[group] || [];
         groups[group].push(o);
       });
-      return Object.keys(groups).map(function (group) {
+      return Object.keys(groups).map(function(group) {
         return groups[group];
       });
     },
@@ -442,7 +516,7 @@ export default {
           {
             confirmButtonText: "确定",
             dangerouslyUseHTMLString: true,
-            callback: (action) => {},
+            callback: action => {}
           }
         );
       } else if (type == "instrument") {
@@ -452,40 +526,43 @@ export default {
           {
             confirmButtonText: "确定",
             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 => {
           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;
-      if(type == 'train') {
+      if (type == "train") {
         // 如果选择的是乐保,则把所有辅件价格设置为0
-        this.giveAccessoriesSetStatus()
+        this.giveAccessoriesSetStatus();
       }
       // 设置是否有减免金额
-      this.instrumentGetStatus()
+      this.instrumentGetStatus();
       // 重新设置乐保状态
-      this.setLeBaoStatus()
+      this.setLeBaoStatus();
       // 重新计算金额
       this.calcPrice();
     },
     giveAccessoriesSetStatus() {
-      let status = false // 是否有选中云教练
+      let status = false; // 是否有选中云教练
       this.toolsPackage.forEach(item => {
         if (item.isStatus) {
           status = true;
@@ -496,36 +573,42 @@ export default {
       this.giveAccessoriesStatus = this.isGiveAccessories && status;
     },
     instrumentGetStatus() {
-      let childItem = {}
+      let childItem = {};
       this.instrumentResultList.forEach(group => {
         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 => {
         group.forEach(item => {
-          if(item.isStatus) {
-            status = true
+          if (item.isStatus) {
+            status = true;
           }
-        })
-      })
+        });
+      });
+
       this.instrumentRepair.forEach(repair => {
-        if(status) {
-          repair.noSelect = false
+        if (status) {
+          repair.noSelect = false;
         } else {
-          repair.noSelect = true
-          repair.isStatus = false
+          repair.noSelect = true;
+          repair.isStatus = false;
         }
-      })
+      });
+      this.$forceUpdate();
     },
     calcPrice() {
-      let ids = []
+      let ids = [];
       let amount = 0,
         marketPrice = 0,
         goodsPrice = 0, // 乐器两现价
@@ -546,7 +629,7 @@ export default {
       let csi = this.courseInfo;
       // 加上判断是否有课程信息
       if (mgs) {
-        csi.forEach((item) => {
+        csi.forEach(item => {
           if (item.isStatus) {
             musicClassFee += parseFloat(item.courseCurrentPrice);
             // if (this.courseViewType != 2) {
@@ -560,7 +643,7 @@ export default {
                 item.courseCurrentPrice
               );
             }
-            marketPrice += parseFloat(item.courseOriginalPrice)
+            marketPrice += parseFloat(item.courseOriginalPrice);
             //  else {
             //   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 => {
-          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 {
-            this.buyCloudTeacher = false
+            this.buyCloudTeacher = false;
           }
-        })
+        });
       }
 
       // 乐器
       let ir = this.instrumentResult;
       if (ir.length > 0) {
-        ir.forEach((item) => {
+        ir.forEach(item => {
           if (item.isStatus) {
             if (item.name != "自备乐器") {
               contractGoodsIds += item.goodsIdList;
@@ -596,7 +679,6 @@ export default {
             if (item.kitType == "FREE") {
               amount += 0;
               couponPrice = 0; // 优惠金额
-
             } else if (item.kitType == "LEASE") {
               couponPrice = item.coupon; // 优惠金额
               if (item.name != "自备乐器") {
@@ -605,7 +687,6 @@ export default {
               } else {
                 amount += 0;
               }
-
             } else if (item.kitType == "GROUP") {
               // 团购
               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 => {
-          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 {
-            this.buyMaintenance = false
+            this.buyMaintenance = false;
           }
-        })
+        });
       }
 
       amount += parseFloat(tempCourseFee + musicClassFee);
 
       // 辅件
-      if (
-        this.accessOries.length > 0) {
-        this.accessOries.forEach((item) => {
+      if (this.accessOries.length > 0) {
+        this.accessOries.forEach(item => {
           //  && this.accessIsShowStatus
           if (item.isStatus) {
-            tempAccessPrice += this.giveAccessoriesStatus ? 0 : parseFloat(item.price);
+            tempAccessPrice += this.giveAccessoriesStatus
+              ? 0
+              : parseFloat(item.price);
             amount += this.giveAccessoriesStatus ? 0 : parseFloat(item.price);
             if (item.goodsList && item.goodsList.length > 0) {
-              item.goodsList.forEach((childGoods) => {
+              item.goodsList.forEach(childGoods => {
                 tempAccessMarketPrice += parseFloat(childGoods.marketPrice);
                 marketPrice += parseFloat(childGoods.marketPrice);
               });
             }
             goodsGroupIds[item.id] = "ACCESSORIES";
-
           }
         });
       }
 
       // 小班课
-      const activityList = this.activityList
-      if(activityList.length > 0) {
+      const activityList = this.activityList;
+      if (activityList.length > 0) {
         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;
@@ -714,13 +795,13 @@ export default {
         accessMarketPrice: tempAccessMarketPrice,
         accessPrice: tempAccessPrice,
         goodsPrice: goodsPrice,
-        goodsMarketPrice: goodsMarketPrice,
+        goodsMarketPrice: goodsMarketPrice
       };
     },
     permission(str) {
       return permission(str);
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="less" scoped>