|
@@ -389,8 +389,8 @@ export default {
|
|
|
loadData.vipGroupCategorySelect = value
|
|
|
form.studentNum = value.studentNum // 每班人数
|
|
|
// form.singleClassMinutes = value.singleClassMinutes // 每课时长
|
|
|
- form.onlineClassesUnitPrice = value.onlineClassesUnitPrice
|
|
|
- form.offlineClassesUnitPrice = value.offlineClassesUnitPrice
|
|
|
+ form.onlineClassesUnitPrice = Math.ceil(value.onlineClassesUnitPrice)
|
|
|
+ form.offlineClassesUnitPrice = Math.ceil(value.offlineClassesUnitPrice)
|
|
|
|
|
|
// 每课时长赋值
|
|
|
form.singleClassMinutes = null
|
|
@@ -643,32 +643,37 @@ export default {
|
|
|
num = num + 7
|
|
|
}
|
|
|
let dataStr = this.getThinkDate(dateOperation, num)
|
|
|
- let tempArr = {
|
|
|
- 'classDate': dataStr,
|
|
|
- 'startClassTimeStr': scheduleList[i].startTime,
|
|
|
- "endClassTimeStr": scheduleList[i].endTime
|
|
|
- }
|
|
|
- if(scheduleList[i].type == '线上' && online > 0) {
|
|
|
- tempArr.teachMode = 'ONLINE'
|
|
|
- this.timeTable.push(tempArr)
|
|
|
- online--
|
|
|
- } else if(scheduleList[i].type == '线下' && offline > 0) {
|
|
|
- tempArr.teachMode = 'OFFLINE'
|
|
|
- this.timeTable.push(tempArr)
|
|
|
- offline--
|
|
|
- } else {
|
|
|
- if(online > 0) {
|
|
|
+
|
|
|
+ // 判断是否大于当前时间
|
|
|
+ let nowGetTime = new Date().getTime()
|
|
|
+ let courseTime = new Date(dataStr + ' ' + scheduleList[i].startTime).getTime()
|
|
|
+ if(nowGetTime < courseTime) {
|
|
|
+ let tempArr = {
|
|
|
+ 'classDate': dataStr,
|
|
|
+ 'startClassTimeStr': scheduleList[i].startTime,
|
|
|
+ "endClassTimeStr": scheduleList[i].endTime
|
|
|
+ }
|
|
|
+ if(scheduleList[i].type == '线上' && online > 0) {
|
|
|
tempArr.teachMode = 'ONLINE'
|
|
|
this.timeTable.push(tempArr)
|
|
|
online--
|
|
|
- } else if(offline > 0) {
|
|
|
+ } else if(scheduleList[i].type == '线下' && offline > 0) {
|
|
|
tempArr.teachMode = 'OFFLINE'
|
|
|
this.timeTable.push(tempArr)
|
|
|
offline--
|
|
|
+ } else {
|
|
|
+ if(online > 0) {
|
|
|
+ tempArr.teachMode = 'ONLINE'
|
|
|
+ this.timeTable.push(tempArr)
|
|
|
+ online--
|
|
|
+ } else if(offline > 0) {
|
|
|
+ tempArr.teachMode = 'OFFLINE'
|
|
|
+ this.timeTable.push(tempArr)
|
|
|
+ offline--
|
|
|
+ }
|
|
|
}
|
|
|
+ totalCount--
|
|
|
}
|
|
|
- totalCount--
|
|
|
-
|
|
|
}
|
|
|
// 加一周
|
|
|
if(scheduleList.length == 1) {
|
|
@@ -707,12 +712,12 @@ export default {
|
|
|
let onss = obj.onlineSalarySettlement
|
|
|
// 有线上课
|
|
|
if(onss.salarySettlementType == 'TEACHER_DEFAULT') {
|
|
|
- form.onlineTeacherSalary = tc.onlineClassesSalary // 线上课酬
|
|
|
+ form.onlineTeacherSalary = Math.round(tc.onlineClassesSalary) // 线上课酬
|
|
|
} else if(onss.salarySettlementType == 'RATIO_DISCOUNT') {
|
|
|
// 老师课酬的折扣 如果有则不打折
|
|
|
- form.onlineTeacherSalary = (vcs.onlineClassesUnitPrice * (onss.settlementValue ? onss.settlementValue : 100) / 100).toFixed(2)
|
|
|
+ form.onlineTeacherSalary = Math.round(vcs.onlineClassesUnitPrice * (onss.settlementValue ? onss.settlementValue : 100) / 100)
|
|
|
} else if(onss.salarySettlementType == 'FIXED_SALARY') {
|
|
|
- form.onlineTeacherSalary = (onss.settlementValue).toFixed(2)
|
|
|
+ form.onlineTeacherSalary = Math.round(onss.settlementValue)
|
|
|
}
|
|
|
form.onlineTeacherSalary = Number(form.onlineTeacherSalary)
|
|
|
}
|
|
@@ -720,21 +725,21 @@ export default {
|
|
|
let offss = obj.offlineSalarySettlement
|
|
|
// 有线下课
|
|
|
if(offss.salarySettlementType == 'TEACHER_DEFAULT') {
|
|
|
- form.offlineTeacherSalary = tc.offlineClassesSalary // 线上课酬
|
|
|
+ form.offlineTeacherSalary = Math.round(tc.offlineClassesSalary) // 线上课酬
|
|
|
} else if(offss.salarySettlementType == 'RATIO_DISCOUNT') {
|
|
|
// 老师课酬的折扣
|
|
|
- form.offlineTeacherSalary = (vcs.offlineClassesUnitPrice * (offss.settlementValue ? offss.settlementValue : 100) / 100).toFixed(2)
|
|
|
+ form.offlineTeacherSalary = Math.round((vcs.offlineClassesUnitPrice * (offss.settlementValue ? offss.settlementValue : 100) / 100))
|
|
|
} else if(offss.salarySettlementType == 'FIXED_SALARY') {
|
|
|
- form.offlineTeacherSalary = (offss.settlementValue).toFixed(2)
|
|
|
+ form.offlineTeacherSalary = Math.round(offss.settlementValue)
|
|
|
}
|
|
|
form.offlineTeacherSalary = Number(form.offlineTeacherSalary)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(vas.type == 'GIVE_CLASS' || vas.type == 'BASE_ACTIVITY') {
|
|
|
- form.totalCount = ((oncn * form.onlineClassesUnitPrice) + (offcn * form.offlineClassesUnitPrice)).toFixed(2)
|
|
|
+ form.totalCount = Math.round((oncn * form.onlineClassesUnitPrice) + (offcn * form.offlineClassesUnitPrice))
|
|
|
} else if(vas.type == 'DISCOUNT') {
|
|
|
- form.totalCount = (((oncn * form.onlineClassesUnitPrice) + (offcn * form.offlineClassesUnitPrice)) * Number(vas.attribute1) / 100).toFixed(2)
|
|
|
+ form.totalCount = Math.round(((oncn * form.onlineClassesUnitPrice) + (offcn * form.offlineClassesUnitPrice)) * Number(vas.attribute1) / 100)
|
|
|
}
|
|
|
form.totalCount = Number(form.totalCount)
|
|
|
},
|