|
@@ -216,7 +216,7 @@
|
|
|
<el-form-item label="每课时长" prop="classTime">
|
|
|
<el-select
|
|
|
v-model.trim="leftForm.classTime"
|
|
|
- :disabled="timeTable.length > 0"
|
|
|
+ :disabled="timeTable.length > 0|| classTimeDis"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in this.classTimeList"
|
|
@@ -850,6 +850,7 @@ export default {
|
|
|
courseTimeList: [],
|
|
|
isMusicTheory: false,
|
|
|
chioseStudent: [],
|
|
|
+ classTimeDis:false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -895,18 +896,18 @@ export default {
|
|
|
// }, 100);
|
|
|
// 判断一下有没有缓存
|
|
|
this.$router.beforeEach(async (to, from, next) => {
|
|
|
- if (this.leftForm?.classOrganId&&from.path=='/business/buildVip') {
|
|
|
- console.log(this.leftForm?.classOrganId)
|
|
|
+ if (this.leftForm?.classOrganId && from.path == "/business/buildVip") {
|
|
|
+ console.log(this.leftForm?.classOrganId);
|
|
|
this.$confirm("检测到您有未提交的数据, 离开将丢失该数据?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
closeOnClickModal: false,
|
|
|
type: "warning",
|
|
|
- }).then(async () => {
|
|
|
- next()
|
|
|
- }).catch(err=>{
|
|
|
-
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ next();
|
|
|
+ })
|
|
|
+ .catch((err) => {});
|
|
|
} else {
|
|
|
next();
|
|
|
}
|
|
@@ -1259,11 +1260,13 @@ export default {
|
|
|
this.rightForm.discount = 100;
|
|
|
|
|
|
if (val) {
|
|
|
+ this.classTimeDis = true
|
|
|
for (let i in this.courseTypeList) {
|
|
|
if (this.courseTypeList[i].id == this.leftForm.courseType) {
|
|
|
// 学生人数
|
|
|
this.leftForm.classNum = this.courseTypeList[i].studentNum;
|
|
|
// 每课时长
|
|
|
+
|
|
|
this.classTimeList =
|
|
|
this.courseTypeList[i].singleClassMinutes.split(",");
|
|
|
// this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
|
|
@@ -1289,6 +1292,7 @@ export default {
|
|
|
this.leftForm.courseStart = this.activeList[i].coursesStartTime;
|
|
|
this.leftForm.courseEnd = this.activeList[i].coursesEndTime;
|
|
|
this.rightForm.discount = this.activeList[i].discount;
|
|
|
+ this.leftForm.classTime = this.activeList[i].singleCourseTime;
|
|
|
// 获取活动种类并保存
|
|
|
this.hotType = this.activeList[i].type;
|
|
|
// 获取买赠必要参数
|
|
@@ -1340,9 +1344,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
+ this.classTimeDis = false
|
|
|
+ for (let i in this.courseTypeList) {
|
|
|
+ if (this.courseTypeList[i].id == this.leftForm.courseType) {
|
|
|
+ // 学生人数
|
|
|
+ this.leftForm.classNum = this.courseTypeList[i].studentNum;
|
|
|
+ // 每课时长
|
|
|
+ this.classTimeList =
|
|
|
+ this.courseTypeList[i].singleClassMinutes.split(",");
|
|
|
+ // this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
|
|
|
+ this.leftForm.classTime = this.classTimeList[0];
|
|
|
+ // 线上课单节价格
|
|
|
+ this.rightForm.onlinePrice =
|
|
|
+ this.courseTypeList[i].onlineClassesUnitPrice;
|
|
|
+ // 线下课单节价格
|
|
|
+ this.rightForm.offlinePrice =
|
|
|
+ this.courseTypeList[i].offlineClassesUnitPrice;
|
|
|
+ this.rightForm.discount = this.courseTypeList[i].discount;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.courseType == "PRACTICE") {
|
|
|
this.hasOffline = false;
|
|
|
this.hasOnline = true;
|
|
|
+ this.classTimeList = [25];
|
|
|
}
|
|
|
}
|
|
|
// 重置课程单价
|