|
@@ -1,7 +1,10 @@
|
|
|
<template>
|
|
|
<div class="m-container">
|
|
|
<h2>
|
|
|
- <el-page-header @back="onCancel" content="VIP课申请"></el-page-header>
|
|
|
+ <el-page-header
|
|
|
+ @back="onCancel"
|
|
|
+ content="VIP/乐理课申请"
|
|
|
+ ></el-page-header>
|
|
|
<!-- <div class="squrt" /> -->
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
@@ -124,7 +127,7 @@
|
|
|
v-model.trim="leftForm.activeType"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!leftForm.courseType"
|
|
|
+ :disabled="!leftForm.courseType|| isMusicTheory"
|
|
|
@change="chioseActive"
|
|
|
>
|
|
|
<el-option
|
|
@@ -251,11 +254,13 @@
|
|
|
v-model.trim="centerForm.offlineCourseNum"
|
|
|
@mousewheel.native.prevent
|
|
|
type="number"
|
|
|
- > <template slot="append">节</template>
|
|
|
+ >
|
|
|
+ <template slot="append">节</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="待排课数">
|
|
|
- <el-input v-model.trim="allCourseCount" disabled > <template slot="append">节</template>
|
|
|
+ <el-input v-model.trim="allCourseCount" disabled>
|
|
|
+ <template slot="append">节</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -349,12 +354,16 @@
|
|
|
:inline="true"
|
|
|
>
|
|
|
<el-form-item v-if="hasOnline" label="线上课课酬">
|
|
|
- <el-input v-model.trim="rightForm.onlineCourse" :disabled="true" > <template slot="append">元/节</template>
|
|
|
+ <el-input v-model.trim="rightForm.onlineCourse" :disabled="true">
|
|
|
+ <template slot="append" v-if="!isMusicTheory">元/节</template>
|
|
|
+ <template slot="append" v-else>元/人</template>
|
|
|
</el-input>
|
|
|
<!-- || onlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="hasOffline" label="线下课课酬">
|
|
|
- <el-input v-model.trim="rightForm.offlineCourse" :disabled="true" > <template slot="append">元/节</template>
|
|
|
+ <el-input v-model.trim="rightForm.offlineCourse" :disabled="true">
|
|
|
+ <template slot="append" v-if="!isMusicTheory">元/节</template>
|
|
|
+ <template slot="append" v-else>元/人</template>
|
|
|
</el-input>
|
|
|
<!-- || offlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
|
|
|
</el-form-item>
|
|
@@ -740,6 +749,7 @@ export default {
|
|
|
id: "",
|
|
|
studentList: [],
|
|
|
courseTimeList: [],
|
|
|
+ isMusicTheory:false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -899,6 +909,7 @@ export default {
|
|
|
this.rightForm.offlinePrice = this.courseTypeList[
|
|
|
i
|
|
|
].offlineClassesUnitPrice;
|
|
|
+ this.isMusicTheory = this.courseTypeList[i].musicTheory
|
|
|
}
|
|
|
}
|
|
|
// teacherId
|
|
@@ -1344,10 +1355,29 @@ export default {
|
|
|
this.$message.error("请点击计算按钮计算课酬");
|
|
|
return;
|
|
|
}
|
|
|
- if (this.leftForm.students.length > this.studentLimit) {
|
|
|
- this.$message.error(`请选择上课学生为${this.studentLimit}人`);
|
|
|
- return;
|
|
|
+ // let activeCourseType;
|
|
|
+ let flag =false
|
|
|
+ // console.log(this.courseTypeList,)
|
|
|
+ // this.courseTypeList.forEach((courseType) => {
|
|
|
+ // if (courseType.id == this.leftForm.courseType) {
|
|
|
+ // activeCourseType = courseType;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // console.log(activeCourseType)
|
|
|
+ if (this.isMusicTheory) {
|
|
|
+ if (this.leftForm.students.length > this.studentLimit || this.leftForm.students.length<3) {
|
|
|
+ this.$message.error(`请选择上课学生为3-${this.studentLimit}人`);
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.leftForm.students.length !== this.studentLimit) {
|
|
|
+ this.$message.error(`请选择上课学生为${this.studentLimit}人`);
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
}
|
|
|
+ if(flag)return
|
|
|
+ // 获取活动方案
|
|
|
+
|
|
|
// 判断线上课课酬和线下课课酬
|
|
|
let online = parseInt(this.centerForm.onlineCourseNum);
|
|
|
let offline = parseInt(this.centerForm.offlineCourseNum);
|
|
@@ -1378,7 +1408,7 @@ export default {
|
|
|
let studentIdList = this.leftForm.students.join(",") || null;
|
|
|
obj.vipGroupApplyBaseInfo = {
|
|
|
studentIdList, // 这个不要了
|
|
|
- vipGroupStudentCoursePrices:this.activeStudentList,
|
|
|
+ vipGroupStudentCoursePrices: this.activeStudentList,
|
|
|
coursesExpireDate: this.leftForm.courseEnd,
|
|
|
teacherSchoolId: this.leftForm.section,
|
|
|
// name: this.leftForm.name,
|
|
@@ -1505,13 +1535,12 @@ export default {
|
|
|
// 老师 乐团主管 都要重置
|
|
|
this.studentList = [];
|
|
|
this.$set(this.leftForm, "students", []);
|
|
|
- this.$set(this.leftForm, "teacher", '');
|
|
|
- this.$set(this.leftForm, "educationalTeacherId", '');
|
|
|
- this.$set(this.leftForm, "section", '');
|
|
|
- this.$set(this.leftForm, "activeType", '');
|
|
|
- this.$set(this.leftForm, "classTime", '');
|
|
|
- this.$set(this.leftForm, "subject", '');
|
|
|
-
|
|
|
+ this.$set(this.leftForm, "teacher", "");
|
|
|
+ this.$set(this.leftForm, "educationalTeacherId", "");
|
|
|
+ this.$set(this.leftForm, "section", "");
|
|
|
+ this.$set(this.leftForm, "activeType", "");
|
|
|
+ this.$set(this.leftForm, "classTime", "");
|
|
|
+ this.$set(this.leftForm, "subject", "");
|
|
|
|
|
|
// this.leftForm.students = [];
|
|
|
// this.leftForm.teacherId = "";
|
|
@@ -1649,7 +1678,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeStudent(val) {
|
|
|
- console.log(val, this.studentList);
|
|
|
this.activeStudentList = [];
|
|
|
this.studentList.forEach((stu) => {
|
|
|
if (val.indexOf(stu.userId) != -1) {
|