Jelajahi Sumber

预览更新

lex-xin 4 tahun lalu
induk
melakukan
66c517ad98
1 mengubah file dengan 68 tambahan dan 2 penghapusan
  1. 68 2
      src/views/resetTeaming/modals/subject-preview.vue

+ 68 - 2
src/views/resetTeaming/modals/subject-preview.vue

@@ -11,7 +11,7 @@
 			<div class="yunTrain">
 				<img :src="trainBg" />
 				<div class="toolText">
-					<p class="toolTitle">乐器练习云教练<sup v-if="courseViewType == 2" style="top: -5px;font-size: 20px;">+</sup>
+					<p class="toolTitle">乐器练习云教练
 						<i class="icon_video" @click="videoStatus = true"></i>
 					</p>
 					<p class="toolDate">有效期说明:自开课之日起6个月内有效</p>
@@ -19,11 +19,36 @@
 			</div>
 		</template>
 
+        <template v-if="courseViewType == 1 && courseShowInfo.length > 0">
+			<div class="yunTrain" style="margin-top: 12px;">
+				<img :src="trainBg" />
+				<div class="toolText">
+					<p class="toolTitle">服务</p>
+					<p class="toolDate" v-if="serviceValidDate">服务有效期:{{ serviceValidDate }}</p>
+				</div>
+			</div>
+		</template>
+
 		<h2 class="titles" style="margin-top: 12px;" v-if="courseViewType == 0">
 			<img :src="trainSmallBg" />
 			<span>乐团课程</span>
 		</h2>
 		<template class="section">
+            <!-- 所有不可选的课程合集 -->
+			<div class="section" v-if="courseShowStatus && courseViewType == 1">
+				<el-row class="option-row"  v-for="(item, index) in courseShowInfo" :class="[!item.isStudentOptional ? 'disabled' : '']" :key="index" @click.native="onCourseChange(item)">
+					<el-col :span="16">
+						<i class="check_default" :class="[item.isStatus ? 'check_active' : '']"></i>
+						<span style="display: flex; align-items: center;">
+							<template v-if="item.courseType == 'PROJECT'">{{ chargeTypeName }} </template><template v-else>{{ item.courseType | coursesType }}</template>
+						</span>
+						<el-icon v-if="item.courseType == 'PROJECT'" class="el-icon-question" @click.native="onQuestions('amr')" />
+					</el-col>
+					<el-col :span="8">
+						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
+					</el-col>
+				</el-row>
+			</div>
 
             <div class="section" v-if="courseViewType == 2">
 				<div v-for="(item, index) in toolsPackage" :key="index">
@@ -67,6 +92,29 @@
 			</div>
 		</template>
 
+        <div class="section" v-if="courseInfo && courseInfo.length > 0 && isClickStatus && courseViewType == 1">
+			<h2 class="title">{{ '乐团课程' }}</h2>
+			<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="11" :offset="1" style="text-align: right;">现价</el-col>
+			</el-row>
+			<!-- 可选课程信息集合 -->
+			<template v-for="(item, index) in courseInfo">
+				<el-row class="option-row" :key="index"  @click.native="onCourseChange(item)" v-if="item.isStudentOptional">
+					<el-col :span="12">
+						<i class="check_default" :class="[item.isStatus ? 'check_active' : '', !item.isStudentOptional ? 'disabled' : '']"></i><template v-if="item.courseType == 'PROJECT'">{{ item.name }}</template><template v-else>{{ item.courseType | coursesType }}</template>
+					</el-col>
+					<!-- <el-col :span="6">
+						<del style="color: #AAA; font-size: .12rem;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
+					</el-col> -->
+					<el-col :span="11" :offset="1">
+						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
+					</el-col>
+				</el-row>
+			</template>
+		</div>
+
         <h2 class="titles" v-if="instrumentResultList && instrumentResultList.length > 0">
 			<img :src="trainSmallBg" />
 			<span>乐器</span>
@@ -251,7 +299,8 @@ export default {
                 name: '练习系统(六个月)',
                 childGoodsList: [{ name: '' }],
             }], // 学习工具包
-            courseInfo: null, // 课程信息
+            courseInfo: [], // 课程信息
+            courseShowInfo: [], // 课程信息显示用
             musicGroupSubject: null, // 基本信息
             instrumentResult: [], //乐器
             accessOries: [], // 辅件(打包)
@@ -648,6 +697,23 @@ export default {
                 marketPrice += parseFloat(tempFee)
             }
             if (mgs) {
+                let tempCourse = this.courseShowInfo
+                if (tempCourse.length > 0 && this.courseViewType == 1) {
+                    let m = 0
+                    tempCourse.forEach(item => {
+                        m += parseFloat(item.courseCurrentPrice)
+                        // 不可选的课程才会减免课程费用
+                        // if (!item.isStudentOptional) {
+                        //     tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
+                        // }
+                    });
+                    marketPrice += parseFloat(m)
+                    buyList.unshift({
+                        name: this.chargeTypeName,
+                        type: paymentPatternType[this.paymentPattern],
+                        price: Number((m).toFixed(2))
+                    })
+                }
                     csi.forEach(item => {
                         if (item.isStatus) {
                             if(this.courseViewType != 2) {