|
@@ -25,6 +25,7 @@
|
|
|
placeholder="请选择"
|
|
|
/>
|
|
|
<van-field
|
|
|
+ v-show="courseTypeVip"
|
|
|
v-model="formName.vipGroupCategoryName"
|
|
|
@click="onGetSheetList('vipGroupCategory')"
|
|
|
label="课程形式"
|
|
@@ -53,7 +54,7 @@
|
|
|
:is-link="checkboxSelectDataList.length > 0 ? false : true"
|
|
|
size="large"
|
|
|
:value="checkboxSelectDataList.length > 0 ? '重新选择' : '请选择'"
|
|
|
- :value-class="checkboxSelectDataList.length > 0 ? 'studentColor' : null"
|
|
|
+ :value-class="[checkboxSelectDataList.length > 0 ? 'studentColor' : null, 'classStudent']"
|
|
|
/>
|
|
|
<div
|
|
|
v-if="checkboxSelectDataList.length > 0"
|
|
@@ -147,7 +148,9 @@
|
|
|
<van-field
|
|
|
v-model="form.totalClassTime"
|
|
|
label="课时总数"
|
|
|
- :readonly="true"
|
|
|
+ :readonly="courseTypePractice ? false : true"
|
|
|
+ @keyup="getCalcClass"
|
|
|
+ type="number"
|
|
|
input-align="right"
|
|
|
size="large"
|
|
|
placeholder="请输入次数"
|
|
@@ -279,7 +282,6 @@
|
|
|
v-if="statusList.hasOnline"
|
|
|
type="number"
|
|
|
/>
|
|
|
- <!-- || other.onlineSalary !='TEACHER_DEFAULT' -->
|
|
|
<van-field
|
|
|
v-model="form.offlineTeacherSalary"
|
|
|
label="线下课课酬"
|
|
@@ -290,7 +292,16 @@
|
|
|
v-if="statusList.hasOffline"
|
|
|
type="number"
|
|
|
/>
|
|
|
- <!-- || other.offlineSalary !='TEACHER_DEFAULT' -->
|
|
|
+ <van-field
|
|
|
+ v-model="form.onlineTeacherSalary"
|
|
|
+ label="网管课课酬"
|
|
|
+ input-align="right"
|
|
|
+ size="large"
|
|
|
+ :readonly="true"
|
|
|
+ placeholder="金额(每课时)"
|
|
|
+ v-if="courseTypePractice"
|
|
|
+ type="number"
|
|
|
+ />
|
|
|
<van-field
|
|
|
v-model="form.totalCount"
|
|
|
:readonly="true"
|
|
@@ -474,6 +485,9 @@ import {
|
|
|
vipGroupApply,
|
|
|
findEducationUsers,
|
|
|
queryStudentsWithTeacher,
|
|
|
+ queryPracticeGroupSellPrice,
|
|
|
+ getPracticeGroupCostCount,
|
|
|
+ practiceGroupApply
|
|
|
} from "@/api/teacher";
|
|
|
import setLoading from "@/utils/loading";
|
|
|
import dayjs from "dayjs";
|
|
@@ -620,6 +634,8 @@ export default {
|
|
|
dataShow: true, // 是否有数据
|
|
|
dataList: [],
|
|
|
salaryStatus: true, // 是否跳过课酬二次确认
|
|
|
+ singleClassMinutesPrice: 0, //网管课单价
|
|
|
+ singleClassMinutesSalary: 0, // 网管课课酬
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -636,7 +652,7 @@ export default {
|
|
|
methods: {
|
|
|
dayjs,
|
|
|
onCheckStudent() {
|
|
|
- if (!this.form.vipGroupCategoryId) {
|
|
|
+ if (!this.form.vipGroupCategoryId && this.courseTypeVip) {
|
|
|
// 判断是否选择了课程形式
|
|
|
this.$toast("请选择课程形式");
|
|
|
return;
|
|
@@ -647,8 +663,7 @@ export default {
|
|
|
// 获取科目列表
|
|
|
let sheetForm = this.sheetForm;
|
|
|
sheetForm.columns = [];
|
|
|
- console.log(this.checkboxSelectDataList);
|
|
|
- if (!this.form.vipGroupCategoryId && name == "vipGroupActivity") {
|
|
|
+ if (!this.form.vipGroupCategoryId && name == "vipGroupActivity" && this.courseTypeVip) {
|
|
|
this.$toast("请选择课程形式");
|
|
|
return;
|
|
|
} else if (
|
|
@@ -726,10 +741,15 @@ export default {
|
|
|
studentIds.push(item.userId);
|
|
|
});
|
|
|
}
|
|
|
- findByVipGroupCategory({
|
|
|
- categoryId: this.form.vipGroupCategoryId,
|
|
|
- studentIds: studentIds.join(","),
|
|
|
- }).then((res) => {
|
|
|
+ let params = {
|
|
|
+ studentIds: studentIds.join(",")
|
|
|
+ }
|
|
|
+ if(this.courseTypeVip) {
|
|
|
+ params.categoryId = this.form.vipGroupCategoryId
|
|
|
+ } else if(this.courseTypePractice) {
|
|
|
+ params.courseType = 'PRACTICE'
|
|
|
+ }
|
|
|
+ findByVipGroupCategory(params).then((res) => {
|
|
|
let result = res.data;
|
|
|
if (result.code == 200 && result.data.length > 0) {
|
|
|
let tempArr = [];
|
|
@@ -876,7 +896,11 @@ export default {
|
|
|
loadData.vipGroupCategorySelect.offlineClassesUnitPrice
|
|
|
);
|
|
|
|
|
|
- this.onCalcClassTimes(value); // 计算时间等.........
|
|
|
+ if(this.courseTypeVip) {
|
|
|
+ this.onCalcClassTimes(value); // 计算时间等.........
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
this.getCalcClass(); // 课酬计算
|
|
|
this.setTimeTable(); // 重新排课
|
|
|
|
|
@@ -938,30 +962,81 @@ export default {
|
|
|
statusList.hasOffline = false;
|
|
|
break;
|
|
|
}
|
|
|
- // console.log(statusList)
|
|
|
- // const salarySettlementJson = vas.salarySettlementJson ? JSON.parse(vas.salarySettlementJson) : null
|
|
|
- // console.log(salarySettlementJson, 'salarySettlementJson')
|
|
|
- // if (salarySettlementJson) {
|
|
|
- // // 重新设置课酬
|
|
|
- // const vipOfflineSalarySettlement = salarySettlementJson.vipOfflineSalarySettlement || salarySettlementJson.offlineSalarySettlement
|
|
|
- // const vipOnlineSalarySettlement = salarySettlementJson.vipOnlineSalarySettlement || salarySettlementJson.onlineSalarySettlement
|
|
|
- // console.log(vipOfflineSalarySettlement, vipOnlineSalarySettlement)
|
|
|
- // if(vipOfflineSalarySettlement && vipOfflineSalarySettlement.salarySettlementType === 'FIXED_SALARY') {
|
|
|
- // form.offlineClassesUnitPrice = Number(vipOfflineSalarySettlement.settlementValue)
|
|
|
- // }
|
|
|
- // if(vipOnlineSalarySettlement && vipOnlineSalarySettlement.salarySettlementType === 'FIXED_SALARY') {
|
|
|
- // form.onlineClassesUnitPrice = Number(vipOnlineSalarySettlement.settlementValue)
|
|
|
- // }
|
|
|
- // }
|
|
|
},
|
|
|
- onCourseTypeSelect(value) {
|
|
|
+ async onCourseTypeSelect(value) {
|
|
|
// 课程类型
|
|
|
+ this.statusList.courseTypeStatus = false
|
|
|
+ if(value.value == this.courseType) return
|
|
|
this.courseType = value.value
|
|
|
this.courseTypeName = value.name
|
|
|
- this.statusList.courseTypeStatus = false
|
|
|
+
|
|
|
+ let form = this.form,
|
|
|
+ formName = this.formName,
|
|
|
+ loadData = this.loadData
|
|
|
+
|
|
|
+ // 课程形式重置
|
|
|
+ form.vipGroupCategoryId = null
|
|
|
+ formName.vipGroupCategoryName = null
|
|
|
+ formName.vipGroupCategoryIndex = 0
|
|
|
+ // 重置上课学生
|
|
|
+ this.checkboxSelect = [];
|
|
|
+ this.checkboxSelectIds = [];
|
|
|
+ this.checkboxSelectList = []; //选中学生列表
|
|
|
+ this.checkboxSelectDataList = [];
|
|
|
+ // 重置活动文案
|
|
|
+ form.vipGroupActivityId = null;
|
|
|
+ formName.vipGroupActivityName = null;
|
|
|
+ formName.vipGroupActivityIndex = 0;
|
|
|
+ loadData.vipGroupActivity = [];
|
|
|
+ loadData.vipGroupActivitySelect = [];
|
|
|
+ // 更新每课时长
|
|
|
+ form.singleClassMinutes = null
|
|
|
+ // 课时总数
|
|
|
+ form.totalClassTime = null
|
|
|
+ form.offlineClassesNums = null
|
|
|
+ form.onlineClassesNums = null
|
|
|
+ this.scheduleList = [] // 清空课时安排
|
|
|
+ if(value.value == 'VIP') {
|
|
|
+ this.courseForm.columns[0].values = ["线上", "线下"]
|
|
|
+
|
|
|
+ form.studentNum = null
|
|
|
+ form.onlineClassesUnitPrice = 0
|
|
|
+ form.onlineTeacherSalary = 0
|
|
|
+ this.getCalcClass();
|
|
|
+ } else if(value.value == 'PRACTICE') {
|
|
|
+ this.courseForm.columns[0].values = ["线上"]
|
|
|
+ // 重置地址数据
|
|
|
+ this.form.teacherSchoolId = null;
|
|
|
+ this.formName.teacherSchoolName = null;
|
|
|
+ this.formName.teacherSchoolIndex = 0;
|
|
|
+
|
|
|
+ // 每班人数 (网管课固定1人)
|
|
|
+ form.studentNum = 1
|
|
|
+ loadData.classTimer = [{ name: 25, value: 25 }];
|
|
|
+ this.statusList.hasOnline = false
|
|
|
+ this.statusList.hasOffline = false
|
|
|
+ this.getCalcClass();
|
|
|
+ // 判断是否已经有金额了
|
|
|
+ if(!this.singleClassMinutesPrice) {
|
|
|
+ await queryPracticeGroupSellPrice().then(res => {
|
|
|
+ let result = res.data
|
|
|
+ if(result.code == 200) {
|
|
|
+ this.singleClassMinutesPrice = result.data.singleClassMinutesPrice || 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(!this.singleClassMinutesSalary) {
|
|
|
+ await getPracticeGroupCostCount().then(res => {
|
|
|
+ const result = res.data
|
|
|
+ if(result.code == 200) {
|
|
|
+ this.singleClassMinutesSalary = result.data.onlineTeacherSalary || 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
onClickSingleClass() {
|
|
|
- if (!this.formName.vipGroupCategoryName) {
|
|
|
+ if (!this.formName.vipGroupCategoryName && this.courseTypeVip) {
|
|
|
this.$toast("请选择课程形式");
|
|
|
return;
|
|
|
}
|
|
@@ -1027,9 +1102,7 @@ export default {
|
|
|
let enlistForm = this.enlistForm;
|
|
|
if (type == "end") {
|
|
|
if (this.form.registrationStartTime) {
|
|
|
- enlistForm.minDate = new Date(
|
|
|
- this.form.registrationStartTime.replace(/-/gi, "/")
|
|
|
- );
|
|
|
+ enlistForm.minDate = new Date(this.form.registrationStartTime.replace(/-/gi, "/"));
|
|
|
} else {
|
|
|
enlistForm.minDate = new Date();
|
|
|
}
|
|
@@ -1037,6 +1110,7 @@ export default {
|
|
|
// 开始时默认为当前时间
|
|
|
enlistForm.minDate = new Date();
|
|
|
}
|
|
|
+
|
|
|
if (value) {
|
|
|
enlistForm.currentDate = new Date(value.replace(/-/gi, "/"));
|
|
|
} else {
|
|
@@ -1059,10 +1133,18 @@ export default {
|
|
|
},
|
|
|
onScheduleRemove(item) {
|
|
|
// 删除课程安排
|
|
|
- let index = this.scheduleList.indexOf(item);
|
|
|
- if (index !== -1) {
|
|
|
- this.scheduleList.splice(index, 1);
|
|
|
- }
|
|
|
+ this.$dialog.confirm({
|
|
|
+ title: '提示',
|
|
|
+ message: '是否删除该课时安排?',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ confirmButtonColor: '#269a93',
|
|
|
+ cancelButtonText: '取消'
|
|
|
+ }).then(() => {
|
|
|
+ let index = this.scheduleList.indexOf(item);
|
|
|
+ if (index !== -1) {
|
|
|
+ this.scheduleList.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onTeachinConfirm(value) {
|
|
|
// 添加课程
|
|
@@ -1130,24 +1212,19 @@ export default {
|
|
|
if (!this.checkCourseList(false)) {
|
|
|
return;
|
|
|
}
|
|
|
- // return
|
|
|
// 重置排课列表
|
|
|
this.timeTable = [];
|
|
|
|
|
|
let form = this.form,
|
|
|
scheduleList = this.scheduleList;
|
|
|
|
|
|
- // if(!form.courseStart) {
|
|
|
- // this.$toast('请选择排课开始时间')
|
|
|
- // return
|
|
|
- // }
|
|
|
// 拿到线上课数与线下课数 以及
|
|
|
- let online = parseInt(
|
|
|
- form.onlineClassesNums ? form.onlineClassesNums : 0
|
|
|
- );
|
|
|
- let offline = parseInt(
|
|
|
- form.offlineClassesNums ? form.offlineClassesNums : 0
|
|
|
- );
|
|
|
+ let online = parseInt(form.onlineClassesNums || 0);
|
|
|
+ let offline = parseInt(form.offlineClassesNums || 0);
|
|
|
+ // 网管课默认只有线上课次
|
|
|
+ if(this.courseTypePractice) {
|
|
|
+ online = parseInt(form.totalClassTime || 0)
|
|
|
+ }
|
|
|
// 判断是否有课程安排
|
|
|
if (scheduleList.length <= 0) {
|
|
|
return;
|
|
@@ -1228,13 +1305,25 @@ export default {
|
|
|
tc = loadData.teacherCategory, // 老师基本信息
|
|
|
oncn = form.onlineClassesNums ? form.onlineClassesNums : 0, // 线上课次数
|
|
|
offcn = form.offlineClassesNums ? form.offlineClassesNums : 0 // 线下课次数
|
|
|
- // 优惠活动
|
|
|
- const discount = Number(vas.discount) / 100
|
|
|
+ // 网管课默认只有线上课次
|
|
|
+ if(this.courseTypePractice) {
|
|
|
+ oncn = parseInt(form.totalClassTime || 0)
|
|
|
+ }
|
|
|
+ // 优惠活动(如果没有则原价)
|
|
|
+ const discount = Number(vas.discount || 100) / 100
|
|
|
+
|
|
|
+ // 重置老师默认网管课金额
|
|
|
+ if(this.courseTypePractice) {
|
|
|
+ //老师课酬
|
|
|
+ form.onlineTeacherSalary = Math.round(this.singleClassMinutesSalary)
|
|
|
+ // 课程单价
|
|
|
+ form.onlineClassesUnitPrice = Math.round(this.singleClassMinutesPrice)
|
|
|
+ }
|
|
|
// ...
|
|
|
if (vas.salarySettlementJson) {
|
|
|
let obj = JSON.parse(vas.salarySettlementJson);
|
|
|
// 课程按课来计算
|
|
|
- if(this.courseType == 'VIP') {
|
|
|
+ if(this.courseTypeVip) {
|
|
|
if(obj && obj.vipOnlineSalarySettlement) {
|
|
|
let vnss = obj.vipOnlineSalarySettlement
|
|
|
if(vnss.salarySettlementType == 'TEACHER_DEFAULT') {
|
|
@@ -1256,10 +1345,37 @@ export default {
|
|
|
} else {
|
|
|
form.offlineTeacherSalary = Math.round(tc.offlineClassesSalary)
|
|
|
}
|
|
|
+ } else if(this.courseTypePractice) {
|
|
|
+ // //老师课酬
|
|
|
+ // form.onlineTeacherSalary = Math.round(this.singleClassMinutesSalary)
|
|
|
+ // // 课程单价
|
|
|
+ // form.onlineClassesUnitPrice = Math.round(this.singleClassMinutesPrice)
|
|
|
+ if(obj && obj.practiceSalarySettlement) {
|
|
|
+ let pss = obj.practiceSalarySettlement
|
|
|
+ if(pss.salarySettlementType == 'TEACHER_DEFAULT') {
|
|
|
+ form.onlineTeacherSalary = Math.round(this.singleClassMinutesSalary)
|
|
|
+ } else if(pss.salarySettlementType == 'FIXED_SALARY') {
|
|
|
+ form.onlineTeacherSalary = Math.round(pss.settlementValue * discount)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ form.onlineTeacherSalary = Math.round(this.singleClassMinutesSalary)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const totalCount = ((oncn * form.onlineClassesUnitPrice + offcn * form.offlineClassesUnitPrice) * discount);
|
|
|
+ let totalCount = 0
|
|
|
+ console.log({
|
|
|
+ singleClassMinutesPrice: this.singleClassMinutesPrice,
|
|
|
+ singleClassMinutesSalary: this.singleClassMinutesSalary,
|
|
|
+ onlineClassesUnitPrice: form.onlineClassesUnitPrice,
|
|
|
+ discount: discount,
|
|
|
+ oncn: oncn
|
|
|
+ })
|
|
|
+ if(this.courseTypeVip) {
|
|
|
+ totalCount = ((oncn * form.onlineClassesUnitPrice + offcn * form.offlineClassesUnitPrice) * discount);
|
|
|
+ } else {
|
|
|
+ totalCount = ((oncn * form.onlineClassesUnitPrice) * discount);
|
|
|
+ }
|
|
|
form.totalCount = Number(totalCount);
|
|
|
},
|
|
|
getThinkDate(date, num) {
|
|
@@ -1361,7 +1477,7 @@ export default {
|
|
|
this.$toast("请选择科目");
|
|
|
return false;
|
|
|
}
|
|
|
- if (!form.vipGroupCategoryId) {
|
|
|
+ if (!form.vipGroupCategoryId && this.courseTypeVip) {
|
|
|
this.$toast("请选择课程形式");
|
|
|
return false;
|
|
|
}
|
|
@@ -1374,7 +1490,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!form.vipGroupActivityId) {
|
|
|
+ if (!form.vipGroupActivityId && this.courseTypeVip) {
|
|
|
this.$toast("请选择活动方案");
|
|
|
return false;
|
|
|
}
|
|
@@ -1424,7 +1540,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
let vipGroupActivitySelect = this.loadData.vipGroupActivitySelect;
|
|
|
- console.log(vipGroupActivitySelect)
|
|
|
if (vipGroupActivitySelect.minCourseNum > 0 && vipGroupActivitySelect.maxCourseNum > 0) {
|
|
|
// debugger
|
|
|
let tempCourseCount =
|
|
@@ -1523,6 +1638,9 @@ export default {
|
|
|
|
|
|
form.onlineClassesNum = Number(form.onlineClassesNums);
|
|
|
form.offlineClassesNum = Number(form.offlineClassesNums);
|
|
|
+ if(this.courseTypePractice) { //网管课等于总课次
|
|
|
+ form.onlineClassesNum = Number(form.totalClassTime)
|
|
|
+ }
|
|
|
|
|
|
form.totalClassTimes = Number(form.onlineClassesNums) +Number(form.offlineClassesNums)
|
|
|
form.paymentExpireDate = form.coursesExpireDate;
|
|
@@ -1530,8 +1648,7 @@ export default {
|
|
|
|
|
|
form.firstStudentId = this.checkboxSelectDataList.length > 0 ? this.checkboxSelectDataList[0].userId : null;
|
|
|
let params = {
|
|
|
- courseSchedules: this.timeTable,
|
|
|
- vipGroupApplyBaseInfo: form,
|
|
|
+ courseSchedules: this.timeTable
|
|
|
};
|
|
|
if (allowOverstepActivityStudentNum == 1) {
|
|
|
params.allowOverstepActivityStudentNum = 1;
|
|
@@ -1540,6 +1657,18 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.onSubmitStatus = false;
|
|
|
+ if(this.courseTypeVip) {
|
|
|
+ params.vipGroupApplyBaseInfo = form
|
|
|
+ await this.getVipApply(params)
|
|
|
+ } else {
|
|
|
+ params.practiceGroupApplyBaseInfoDto = form
|
|
|
+ params.practiceGroupApplyBaseInfoDto.studentId = form.studentIdList
|
|
|
+ params.practiceGroupApplyBaseInfoDto.allCourseNum = form.totalClassTime
|
|
|
+ params.practiceGroupApplyBaseInfoDto.subjectId = form.subjectIdList
|
|
|
+ await this.getPracticeApply(params)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getVipApply(params) {
|
|
|
setLoading(true);
|
|
|
await vipGroupApply(params)
|
|
|
.then((res) => {
|
|
@@ -1593,6 +1722,60 @@ export default {
|
|
|
setLoading(false);
|
|
|
});
|
|
|
},
|
|
|
+ async getPracticeApply(params) {
|
|
|
+ setLoading(true);
|
|
|
+ await practiceGroupApply(params)
|
|
|
+ .then((res) => {
|
|
|
+ let result = res.data;
|
|
|
+ setLoading(false);
|
|
|
+ if (result.code == 200) {
|
|
|
+ this.$toast("申请成功");
|
|
|
+ setTimeout(() => {
|
|
|
+ this.onSubmitStatus = true;
|
|
|
+ if (browser().iPhone) {
|
|
|
+ window.webkit.messageHandlers.DAYA.postMessage(
|
|
|
+ JSON.stringify({
|
|
|
+ api: "back",
|
|
|
+ })
|
|
|
+ );
|
|
|
+ } else if (browser().android) {
|
|
|
+ DAYA.postMessage(
|
|
|
+ JSON.stringify({
|
|
|
+ api: "back",
|
|
|
+ })
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$router.push("/business");
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
+ } else if (result.code == 206) {
|
|
|
+ this.onSubmitStatus = true;
|
|
|
+ this.salaryStatus = true;
|
|
|
+ this.$dialog
|
|
|
+ .confirm({
|
|
|
+ message: result.msg,
|
|
|
+ showConfirmButton: true,
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "继续创建",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.salaryStatus = false;
|
|
|
+ this.onSubmit(1);
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.onSubmitStatus = true;
|
|
|
+ this.salaryStatus = true;
|
|
|
+ this.$toast(result.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.onSubmitStatus = true;
|
|
|
+ this.salaryStatus = true;
|
|
|
+ setLoading(false);
|
|
|
+ });
|
|
|
+ },
|
|
|
checkCourseList(isShowToast = true) {
|
|
|
let form = this.form;
|
|
|
let scheduleList = this.scheduleList || [];
|
|
@@ -1611,14 +1794,6 @@ export default {
|
|
|
!form.onlineClassesNums && form.onlineClassesNums <= 0 ? true : false;
|
|
|
let offlineClassesStatus =
|
|
|
!form.offlineClassesNums && form.offlineClassesNums <= 0 ? true : false;
|
|
|
- // let onlineClassesStatus = false
|
|
|
- // if(form.onlineClassesNums || form.onlineClassesNums >= 0) {
|
|
|
- // onlineClassesStatus = true
|
|
|
- // }
|
|
|
- // let offlineClassesStatus = false
|
|
|
- // if(form.offlineClassesNums || form.offlineClassesNums >= 0) {
|
|
|
- // offlineClassesStatus = true
|
|
|
- // }
|
|
|
if (statusList.hasOnline) {
|
|
|
if (onlineClassesStatus) {
|
|
|
if (isShowToast) {
|
|
@@ -1693,9 +1868,11 @@ export default {
|
|
|
},
|
|
|
onPopupSubmit() {
|
|
|
const vipGroupCategorySelect = this.loadData.vipGroupCategorySelect;
|
|
|
- if (this.checkboxSelect.length != vipGroupCategorySelect.studentNum) {
|
|
|
+ const compareNum = this.courseTypeVip ? vipGroupCategorySelect.studentNum : 1
|
|
|
+ console.log(compareNum)
|
|
|
+ if (this.checkboxSelect.length != compareNum) {
|
|
|
this.$toast(
|
|
|
- `请选择学生${vipGroupCategorySelect.studentNum}名,当前选择${this.checkboxSelect.length}名`
|
|
|
+ `请选择学生${compareNum}名,当前选择${this.checkboxSelect.length}名`
|
|
|
);
|
|
|
return;
|
|
|
}
|
|
@@ -1737,6 +1914,14 @@ export default {
|
|
|
return first + "****" + last;
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ courseTypeVip() {
|
|
|
+ return this.courseType == 'VIP' ? true : false
|
|
|
+ },
|
|
|
+ courseTypePractice() {
|
|
|
+ return this.courseType == 'PRACTICE' ? true : false
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
@@ -1915,6 +2100,9 @@ export default {
|
|
|
.studentColor {
|
|
|
color: @mColor;
|
|
|
}
|
|
|
+.classStudent {
|
|
|
+ font-size: .14rem !important;
|
|
|
+}
|
|
|
|
|
|
/deep/.van-field--disabled .van-field__label,
|
|
|
/deep/.van-field__label {
|