Browse Source

修改金额和标题显示

lex-xin 4 years ago
parent
commit
b545c9095e
1 changed files with 42 additions and 30 deletions
  1. 42 30
      src/views/resetTeaming/modals/subject-preview.vue

+ 42 - 30
src/views/resetTeaming/modals/subject-preview.vue

@@ -7,12 +7,12 @@
 		</div>
 		</div>
 
 
 		<div class="section">
 		<div class="section">
-			<h2 class="title">乐团训练辅助</h2>
+			<h2 class="title">乐团辅训系统</h2>
             <p style="font-size: 14px; padding: 2px 0; color: #a1a1a1" v-if="serviceValidDate">服务有效期:{{ serviceValidDate }}</p>
             <p style="font-size: 14px; padding: 2px 0; color: #a1a1a1" v-if="serviceValidDate">服务有效期:{{ serviceValidDate }}</p>
 			<el-row class="title-row">
 			<el-row class="title-row">
 				<el-col :span="12">服务项目</el-col>
 				<el-col :span="12">服务项目</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" :offset="1" style="text-align: right;">原价</el-col>
+				<el-col :span="5" :offset="1" style="text-align: right;">现价</el-col>
 			</el-row>
 			</el-row>
 			<!-- 所有不可选的课程合集 -->
 			<!-- 所有不可选的课程合集 -->
 			<template v-if="courseShowStatus">
 			<template v-if="courseShowStatus">
@@ -25,10 +25,10 @@
 						<el-icon v-if="item.courseType == 'PROJECT'" class="el-icon-question" @click.native="onQuestions" />
 						<el-icon v-if="item.courseType == 'PROJECT'" class="el-icon-question" @click.native="onQuestions" />
 					</el-col>
 					</el-col>
 					<el-col :span="6">
 					<el-col :span="6">
-						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
+						<del style="color: #AAA; font-size: 13px;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
 					</el-col>
 					</el-col>
 					<el-col :span="6">
 					<el-col :span="6">
-						<del style="color: #AAA;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
+						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
 					</el-col>
 					</el-col>
 				</el-row>
 				</el-row>
 			</template>
 			</template>
@@ -39,10 +39,10 @@
 						<i class="check_default" :class="[item.isStatus ? 'check_active' : '']"></i><template v-if="item.courseType == 'PROJECT'">{{ item.name }}</template><template v-else>{{ item.courseType | coursesType }}</template>
 						<i class="check_default" :class="[item.isStatus ? 'check_active' : '']"></i><template v-if="item.courseType == 'PROJECT'">{{ item.name }}</template><template v-else>{{ item.courseType | coursesType }}</template>
 					</el-col>
 					</el-col>
 					<el-col :span="6">
 					<el-col :span="6">
-						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
+						<del style="color: #AAA; font-size: 13px;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
 					</el-col>
 					</el-col>
 					<el-col :span="6">
 					<el-col :span="6">
-						<del style="color: #AAA;">¥{{ item.courseOriginalPrice | moneyFormat }}</del>
+						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
 					</el-col>
 					</el-col>
 				</el-row>
 				</el-row>
 			</template>
 			</template>
@@ -52,10 +52,10 @@
 					仅需支付
 					仅需支付
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.musicClassFee | moneyFormat }}</span>
+					<del class="fontBold" style="color: #f85043; font-size: 13px;">¥{{ orderInfo.musicMarketClassFee | moneyFormat }}</del>
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<del class="fontBold" style="color: #f85043;">¥{{ orderInfo.musicMarketClassFee | moneyFormat }}</del>
+					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.musicClassFee | moneyFormat }}</span>
 				</el-col>
 				</el-col>
 			</el-row>
 			</el-row>
 		</div>
 		</div>
@@ -71,17 +71,17 @@
 						<template v-if="i[0]['kitType'] == 'owned'">自备乐器</template>
 						<template v-if="i[0]['kitType'] == 'owned'">自备乐器</template>
 					</el-col>
 					</el-col>
 					<el-col :span="5" :offset="1" style="text-align: right;">
 					<el-col :span="5" :offset="1" style="text-align: right;">
-						<template v-if="['GROUP', 'FREE'].includes(i[0]['kitType'])">现价</template>
-						<template v-if="i[0]['kitType'] == 'LEASE'">租赁押金</template>
+						<template v-if="['GROUP', 'LEASE', 'FREE'].includes(i[0]['kitType'])">原价</template>
 					</el-col>
 					</el-col>
 					<el-col :span="5" :offset="1" style="text-align: right;">
 					<el-col :span="5" :offset="1" style="text-align: right;">
-						<template v-if="['GROUP', 'LEASE', 'FREE'].includes(i[0]['kitType'])">原价</template>
+						<template v-if="['GROUP', 'FREE'].includes(i[0]['kitType'])">现价</template>
+						<template v-if="i[0]['kitType'] == 'LEASE'">租赁押金</template>
 					</el-col>
 					</el-col>
 				</el-row>
 				</el-row>
 
 
 				<el-row class="option-row" v-for="(con, index) in i" :key="index" @click.native="instrumentF(con)">
 				<el-row class="option-row" v-for="(con, index) in i" :key="index" @click.native="instrumentF(con)">
 					<el-col :span="12">
 					<el-col :span="12">
-						<i class="check_default" :class="[ con.checked ? 'radio_active' : '' ]"></i>
+						<i class="check_default" :class="[ con.checked ? 'check_active' : '' ]"></i>
 						<div>
 						<div>
 							{{ con.name }}
 							{{ con.name }}
 							<div v-if="con.goodsList" style="font-size: .12rem; color: #aaa">
 							<div v-if="con.goodsList" style="font-size: .12rem; color: #aaa">
@@ -90,13 +90,13 @@
 						</div>
 						</div>
 					</el-col>
 					</el-col>
 					<el-col :span="6">
 					<el-col :span="6">
+						<del style="color: #AAA; font-size: 13px;" 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>
 						<span style="color: #1A1A1A" v-if="(con.kitType == 'LEASE')">¥{{ Number((con.depositFee  - con.coupon).toFixed(2)) | moneyFormat }}</span>
 						<span style="color: #1A1A1A" v-if="con.price && con.kitType == 'FREE'">¥{{ 0 | moneyFormat }}</span>
 						<span style="color: #1A1A1A" v-if="con.price && con.kitType == 'FREE'">¥{{ 0 | moneyFormat }}</span>
 						<span style="color: #1A1A1A" v-if="con.price && con.kitType == 'GROUP'">¥{{ Number((con.price  - con.coupon).toFixed(2)) | moneyFormat }}</span>
 						<span style="color: #1A1A1A" v-if="con.price && con.kitType == 'GROUP'">¥{{ Number((con.price  - con.coupon).toFixed(2)) | moneyFormat }}</span>
 					</el-col>
 					</el-col>
-					<el-col :span="6">
-						<del style="color: #AAA;" v-if="con.kitType != 'owned'">¥{{ con.marketPrice | moneyFormat }}</del>
-					</el-col>
 				</el-row>
 				</el-row>
 			</div>
 			</div>
 
 
@@ -105,10 +105,10 @@
 					仅需支付
 					仅需支付
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.goodsPrice | moneyFormat }}</span>
+					<del class="fontBold" style="color: #f85043; font-size: 13px;">¥{{ orderInfo.goodsMarketPrice | moneyFormat }}</del>
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<del class="fontBold" style="color: #f85043;">¥{{ orderInfo.goodsMarketPrice | moneyFormat }}</del>
+					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.goodsPrice | moneyFormat }}</span>
 				</el-col>
 				</el-col>
 			</el-row>
 			</el-row>
 		</div>
 		</div>
@@ -117,8 +117,8 @@
 			<h2 class="title">辅件</h2>
 			<h2 class="title">辅件</h2>
             <el-row class="title-row">
             <el-row class="title-row">
 				<el-col :span="12">服务项目</el-col>
 				<el-col :span="12">服务项目</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" :offset="1" style="text-align: right;">原价</el-col>
+				<el-col :span="5" :offset="1" style="text-align: right;">现价</el-col>
 			</el-row>
 			</el-row>
 
 
 			<el-row class="option-row" v-for="(instr, index) in accessOries" :key="index" @click.native="onAuxiliarie(instr)">
 			<el-row class="option-row" v-for="(instr, index) in accessOries" :key="index" @click.native="onAuxiliarie(instr)">
@@ -126,11 +126,11 @@
 					<i class="check_default" :class="[ instr.checked ? 'check_active' : '' ]"></i>{{ instr.name }}
 					<i class="check_default" :class="[ instr.checked ? 'check_active' : '' ]"></i>{{ instr.name }}
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<span style="color: #1A1A1A" v-if="instr.price == 0">免费</span>
-					<span style="color: #1A1A1A" v-else>¥{{ instr.price | moneyFormat }}</span>
+					<del style="color: #AAA; font-size: 13px;">¥{{ instr.goodsList[0] ? instr.goodsList[0].marketPrice : 0 | moneyFormat }}</del>
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<del style="color: #AAA;">¥{{ instr.goodsList[0] ? instr.goodsList[0].marketPrice : 0 | moneyFormat }}</del>
+					<span style="color: #1A1A1A" v-if="instr.price == 0">免费</span>
+					<span style="color: #1A1A1A" v-else>¥{{ instr.price | moneyFormat }}</span>
 				</el-col>
 				</el-col>
 			</el-row>
 			</el-row>
 
 
@@ -139,10 +139,10 @@
 					仅需支付
 					仅需支付
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.accessPrice | moneyFormat }}</span>
+					<del class="fontBold" style="color: #f85043; font-size: 13px;">¥{{ orderInfo.accessMarketPrice | moneyFormat }}</del>
 				</el-col>
 				</el-col>
 				<el-col :span="6">
 				<el-col :span="6">
-					<del class="fontBold" style="color: #f85043;">¥{{ orderInfo.accessMarketPrice | moneyFormat }}</del>
+					<span class="fontBold" style="color: #f85043;">¥{{ orderInfo.accessPrice | moneyFormat }}</span>
 				</el-col>
 				</el-col>
 			</el-row>
 			</el-row>
 		</div>
 		</div>
@@ -167,14 +167,14 @@
 				</p> -->
 				</p> -->
                 <p class="oldprice">
                 <p class="oldprice">
                     <del class="text">原价</del>
                     <del class="text">原价</del>
-                    <del>¥{{ orderInfo.marketPrice }}</del>
+                    <del style=" font-size: 13px;">¥{{ orderInfo.marketPrice | moneyFormat }}</del>
                 </p>
                 </p>
                 <p class="now_price">
                 <p class="now_price">
                     <span class="text">仅需支付</span>
                     <span class="text">仅需支付</span>
-                    <span style="font-weight: bold">¥{{ needPrice }}</span>
+                    <span style="font-weight: bold">¥{{ needPrice | moneyFormat }}</span>
                 </p>
                 </p>
 			</div>
 			</div>
-            
+
 			<a class="btn-submit">购买</a>
 			<a class="btn-submit">购买</a>
 		</div>
 		</div>
     </div>
     </div>
@@ -267,7 +267,7 @@ export default {
                             courseCurrentPrice: 0,
                             courseCurrentPrice: 0,
                             courseOriginalPrice: 0,
                             courseOriginalPrice: 0,
                             courseType: null,
                             courseType: null,
-                            name: '乐团训练辅助系统'
+                            name: '乐团辅训系统'
                         }
                         }
                         tempInfo.forEach(info => {
                         tempInfo.forEach(info => {
                             if(!info.isStudentOptional) {
                             if(!info.isStudentOptional) {
@@ -277,7 +277,7 @@ export default {
                                     courseOriginalPrice: 9800,
                                     courseOriginalPrice: 9800,
                                     courseType: 'PROJECT',
                                     courseType: 'PROJECT',
                                     isStatus: true,
                                     isStatus: true,
-                                    name: '乐团训练辅助系统'
+                                    name: '乐团辅训系统'
                                 }
                                 }
                             }
                             }
                         })
                         })
@@ -478,17 +478,29 @@ export default {
             let csi = this.courseInfo
             let csi = this.courseInfo
             // 加上判断是否有课程信息
             // 加上判断是否有课程信息
             if (mgs) {
             if (mgs) {
+                let tempCourse = this.courseShowInfo
+                if(tempCourse.length > 0) {
+                    let tempPrice = 0
+                    tempCourse.forEach(item => {
+                        // tempPrice += parseFloat(item.courseCurrentPrice)
+                        // marketPrice += parseFloat(item.courseOriginalPrice)
+                        musicMarketClassFee += parseFloat(item.courseOriginalPrice)
+                    });
+                }
                 csi.forEach(item => {
                 csi.forEach(item => {
                     if (item.isStatus) {
                     if (item.isStatus) {
                         musicClassFee += parseFloat(item.courseCurrentPrice)
                         musicClassFee += parseFloat(item.courseCurrentPrice)
-                        musicMarketClassFee += parseFloat(item.courseOriginalPrice)
-                        marketPrice += parseFloat(item.courseOriginalPrice)
+                        // musicMarketClassFee += parseFloat(item.courseOriginalPrice)
+                        // marketPrice += parseFloat(item.courseOriginalPrice)
                         if (item.id > 0) {
                         if (item.id > 0) {
                             courseKeys.push(item.id)
                             courseKeys.push(item.id)
                         }
                         }
                         // 不可选的课程才会减免课程费用
                         // 不可选的课程才会减免课程费用
                         if(!item.isStudentOptional) {
                         if(!item.isStudentOptional) {
                             tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
                             tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
+                        } else {
+                            marketPrice += parseFloat(item.courseOriginalPrice)
+                            musicMarketClassFee += parseFloat(item.courseOriginalPrice)
                         }
                         }
                     }
                     }
                 })
                 })