|
@@ -149,6 +149,7 @@ import classrooms from "./classrooms";
|
|
|
import otherform from "./other";
|
|
|
import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
|
|
|
import merge from 'webpack-merge'
|
|
|
+import numeral from 'numeral'
|
|
|
|
|
|
const paymentTypeFormat = {
|
|
|
0: "MUSIC_APPLY",
|
|
@@ -353,7 +354,7 @@ export default {
|
|
|
priceChange (item, index) {
|
|
|
const _ = [...this.eclass]
|
|
|
const active = this.organizationCourseUnitPriceSettingsByType[item.courseType] || {}
|
|
|
- const price = ((item.courseTotalMinuties || 1) * (active.unitPrice || 1)).toFixed(2)
|
|
|
+ const price = Math.round(numeral(active.unitPrice || 1).multiply((item.courseTotalMinuties || 1)).value())
|
|
|
item.courseCurrentPrice = price
|
|
|
item.courseOriginalPrice = price
|
|
|
_[index] = item
|
|
@@ -368,20 +369,22 @@ export default {
|
|
|
money += item.courseCurrentPrice;
|
|
|
if (this.cycles && this.cycles.length) {
|
|
|
if (item.isStudentOptional) {
|
|
|
- first += (item.courseCurrentPrice * 100)
|
|
|
+ first += item.courseCurrentPrice
|
|
|
} else {
|
|
|
- const floorMoney = Math.floor((item.courseCurrentPrice * 100) / this.cycles.length)
|
|
|
- const remainder = (item.courseCurrentPrice * 100) % this.cycles.length
|
|
|
+ const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
|
|
|
+ const remainder = item.courseCurrentPrice % this.cycles.length
|
|
|
+ console.log(remainder)
|
|
|
first += floorMoney + remainder
|
|
|
other += floorMoney
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ console.log(first, other)
|
|
|
if (this.cycles && this.cycles.length) {
|
|
|
this.cycles = this.cycles.map((item, index) => {
|
|
|
return {
|
|
|
...item,
|
|
|
- paymentAmount: (index === 0 ? first / 100 : (other / 100))
|
|
|
+ paymentAmount: (index === 0 ? first : other)
|
|
|
}
|
|
|
})
|
|
|
}
|