|
@@ -19,10 +19,21 @@
|
|
}}
|
|
}}
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="总现价">
|
|
|
|
+ <div>{{allCurrentPrice |moneyFormat}}元</div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="总原价">
|
|
|
|
+ <div>{{ allOriginalPrice | moneyFormat}}元</div>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="课程详情">
|
|
<el-form-item label="课程详情">
|
|
- <div class="inputStyle"
|
|
|
|
- style="width:500px">
|
|
|
|
- <p v-for="(item,index) in msgList">{{item.courseType | coursesType}}: 课程时长:{{item.courseTotalMinuties}}分钟 原价:{{item.courseOriginalPrice}}元 现价{{item.courseCurrentPrice}}元</p>
|
|
|
|
|
|
+ <div class="inputStyle">
|
|
|
|
+ <div v-for="(item,index) in msgList"
|
|
|
|
+ class="infoMsg">
|
|
|
|
+ <p class="name">{{item.courseType | coursesType}}:</p>
|
|
|
|
+ <p class="courseTime">课程时长:{{item.courseTotalMinuties}}分钟</p>
|
|
|
|
+ <p>原价:{{item.courseOriginalPrice | moneyFormat}}元</p>
|
|
|
|
+ <p>现价{{item.courseCurrentPrice | moneyFormat}}元</p>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -48,21 +59,39 @@ export default {
|
|
mounted () { },
|
|
mounted () { },
|
|
methods: {},
|
|
methods: {},
|
|
computed: {
|
|
computed: {
|
|
- infoMsg () {
|
|
|
|
|
|
+ allCurrentPrice () {
|
|
// courseType
|
|
// courseType
|
|
- let str = ''
|
|
|
|
|
|
+ let num = 0;
|
|
|
|
+ this.msgList.forEach(item => {
|
|
|
|
+ num += item.courseCurrentPrice
|
|
|
|
+ })
|
|
|
|
+ return num
|
|
|
|
+ },
|
|
|
|
+ allOriginalPrice () {
|
|
|
|
+ let num = 0;
|
|
this.msgList.forEach(item => {
|
|
this.msgList.forEach(item => {
|
|
- courseType.forEach(course => {
|
|
|
|
- if (item.courseType == course.value) {
|
|
|
|
- str += `${course.label}/${item.courseTotalMinuties}分钟、`
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ num += item.courseOriginalPrice
|
|
})
|
|
})
|
|
- str = str.substring(0, str.length - 1) + '。'
|
|
|
|
- return str
|
|
|
|
|
|
+ return num
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.infoMsg {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ p {
|
|
|
|
+ width: 120px;
|
|
|
|
+ padding-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ .name {
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+ .courseTime {
|
|
|
|
+ width: 150px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|