|
@@ -83,8 +83,8 @@
|
|
|
<el-option
|
|
|
v-for="(item, index) in educationList"
|
|
|
:key="index"
|
|
|
- :label="item.userName"
|
|
|
- :value="item.userId"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.key"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -215,9 +215,11 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="每课时长" prop="classTime">
|
|
|
<el-select
|
|
|
- @change="()=>{
|
|
|
- computationalBtn = false
|
|
|
- }"
|
|
|
+ @change="
|
|
|
+ () => {
|
|
|
+ computationalBtn = false;
|
|
|
+ }
|
|
|
+ "
|
|
|
v-model.trim="leftForm.classTime"
|
|
|
:disabled="timeTable.length > 0 || classTimeDis"
|
|
|
>
|
|
@@ -466,7 +468,6 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
:disabled="true"
|
|
|
-
|
|
|
@change="changeStudentMoney"
|
|
|
style="width: 90% !important"
|
|
|
class="number-input"
|
|
@@ -486,7 +487,6 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
@change="changeStudentMoney"
|
|
|
-
|
|
|
style="width: 90% !important"
|
|
|
class="number-input"
|
|
|
:disabled="true"
|
|
@@ -519,7 +519,6 @@
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
-
|
|
|
style="width: 90% !important"
|
|
|
class="number-input"
|
|
|
v-model="scope.row.paymentPrice"
|
|
@@ -672,6 +671,7 @@ import {
|
|
|
getSubject,
|
|
|
findEducationUsers,
|
|
|
getPracticeApplySubjects,
|
|
|
+ findUserByRole,
|
|
|
} from "@/api/buildTeam";
|
|
|
import {
|
|
|
vipGroupCategory,
|
|
@@ -807,7 +807,7 @@ export default {
|
|
|
educationalTeacherId: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请选择教务",
|
|
|
+ message: "请选择乐团主管",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
@@ -1116,6 +1116,10 @@ export default {
|
|
|
}
|
|
|
// 获取所有科目的接口
|
|
|
await this.$store.dispatch("setBranchs");
|
|
|
+ if (this.selects.branchs.length <= 0) {
|
|
|
+ this.$bus.$emit("showguide", ["organ"]);
|
|
|
+ }
|
|
|
+
|
|
|
if (this.courseType == "PRACTICE") {
|
|
|
getPracticeApplySubjects().then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -1139,7 +1143,6 @@ export default {
|
|
|
this.courseOption = this.coursesDate();
|
|
|
},
|
|
|
onCourseNumChange(type) {
|
|
|
-
|
|
|
// 折扣类型,并且设置的排课数有值
|
|
|
this.computationalBtn = false;
|
|
|
let centerForm = this.centerForm;
|
|
@@ -1204,7 +1207,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
changeSubject(val) {
|
|
|
- this.computationalBtn = false
|
|
|
+ this.computationalBtn = false;
|
|
|
this.leftForm.teacher = "";
|
|
|
this.leftForm.section = "";
|
|
|
// 根据科目id获取相应的老师
|
|
@@ -1214,6 +1217,10 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.teacherList = res.data;
|
|
|
+ if( this.teacherList.length <=0){
|
|
|
+ this.$bus.$emit("showguide", ['teacher']);
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
// getTeacherBySubject({ subjecId: val }).then(res => {
|
|
@@ -1228,7 +1235,7 @@ export default {
|
|
|
this.rightForm.offlineCourse = "";
|
|
|
this.rightForm.onlineCourse = "";
|
|
|
this.leftForm.activeType = "";
|
|
|
- this.computationalBtn = false;
|
|
|
+ this.computationalBtn = false;
|
|
|
this.leftForm.students = []; // 重置所选学生
|
|
|
this.changePrice(val);
|
|
|
},
|
|
@@ -1249,6 +1256,11 @@ export default {
|
|
|
// 线下课单节价格
|
|
|
this.rightForm.offlinePrice =
|
|
|
this.courseTypeList[i].offlineClassesUnitPrice;
|
|
|
+
|
|
|
+ if(this.rightForm.onlinePrice<=0 || this.rightForm.offlinePrice<=0){
|
|
|
+ this.$bus.$emit("showguide", ['vipPrice']);
|
|
|
+ return
|
|
|
+ }
|
|
|
this.isMusicTheory = this.courseTypeList[i].musicTheory;
|
|
|
}
|
|
|
}
|
|
@@ -2030,7 +2042,7 @@ export default {
|
|
|
this.leftForm.section = "";
|
|
|
this.rightForm.offlineCourse = "";
|
|
|
this.rightForm.onlineCourse = "";
|
|
|
- this.computationalBtn = false
|
|
|
+ this.computationalBtn = false;
|
|
|
// this.leftForm.courseType = "";
|
|
|
if (val) {
|
|
|
getTeachSchool({
|
|
@@ -2038,6 +2050,10 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.scetionList = res.data;
|
|
|
+ // if(this.scetionList.length <=0){
|
|
|
+ // this.$bus.$emit("showguide", ['teamPayType']);
|
|
|
+ // return
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -2081,10 +2097,10 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
- onClassChange(val) {
|
|
|
+ async onClassChange(val) {
|
|
|
// 课程分部改变时
|
|
|
// 老师 乐团主管 都要重置
|
|
|
- this.computationalBtn = false
|
|
|
+ this.computationalBtn = false;
|
|
|
this.studentList = [];
|
|
|
this.activeStudentList = [];
|
|
|
this.$set(this.leftForm, "students", []);
|
|
@@ -2114,16 +2130,32 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
// 获取乐团主管
|
|
|
- findEducationUsers({ organId: val }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.educationList = res.data;
|
|
|
+ try {
|
|
|
+ const ruselt = await findUserByRole({
|
|
|
+ id: val,
|
|
|
+ });
|
|
|
+ this.educationList = ruselt?.data?.educationId;
|
|
|
+ if (this.educationList.length <= 0) {
|
|
|
+ this.$bus.$emit("showguide", ["teamManager"]);
|
|
|
+ return
|
|
|
}
|
|
|
- });
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ // 乐团主管
|
|
|
+ this.educationList = ruselt?.data?.educationId;
|
|
|
+ */
|
|
|
+ // findEducationUsers({ organId: val }).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.educationList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
// 如果是网管课 则获取网管课单价
|
|
|
if (this.courseType == "PRACTICE") {
|
|
|
getPracticeGroupSellPrice({ organId: val }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- console.log(res);
|
|
|
this.rightForm.onlinePrice = res.data.singleClassMinutesPrice;
|
|
|
}
|
|
|
});
|
|
@@ -2269,8 +2301,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeStudent(val) {
|
|
|
- this.computationalBtn = false
|
|
|
- this.chioseActive()
|
|
|
+ this.computationalBtn = false;
|
|
|
+ this.chioseActive();
|
|
|
this.leftForm.activeType = "";
|
|
|
this.activeStudentList = [];
|
|
|
this.chioseStudent = val;
|
|
@@ -2306,7 +2338,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeStudentP(val) {
|
|
|
- this.chioseActive()
|
|
|
+ this.chioseActive();
|
|
|
this.leftForm.activeType = "";
|
|
|
this.activeStudentList = [];
|
|
|
this.chioseStudent = val;
|