|
@@ -9,10 +9,10 @@
|
|
|
class="newBand"
|
|
|
@click="resetTeachers"
|
|
|
v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
|
|
|
- >修改老师</div>
|
|
|
+ >课程组调整</div>
|
|
|
<!-- // accompanys/addCourse -->
|
|
|
- <!-- <div v-permission="'accompanys/addCourse'" class="newBand" @click="addCourse">网管课加课</div>
|
|
|
- <div class="newBand" v-permission="'accompanys/vipCourseAdjust'" @click="adjustment">批量调整</div> -->
|
|
|
+ <div v-permission="{ child:'courseSchedule/batchAddCourses',parent:'/accompanys'}" class="newBand" @click="addCourse">网管课加课</div>
|
|
|
+ <div class="newBand" v-permission="'accompanys/vipCourseAdjust'" @click="adjustment">批量调整</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="tableWrap">
|
|
@@ -70,24 +70,24 @@
|
|
|
v-if="!scope.row.isSettlement"
|
|
|
@click="resetClass(scope.row)"
|
|
|
>调整</el-button>
|
|
|
- <!-- <el-button
|
|
|
+ <el-button
|
|
|
type="text"
|
|
|
v-permission="'accompanys/remove'"
|
|
|
v-if="!scope.row.isSettlement && scope.row.status == 'NOT_START'"
|
|
|
@click="removeClass(scope.row)"
|
|
|
- >删除</el-button> -->
|
|
|
+ >删除</el-button>
|
|
|
<el-button
|
|
|
v-permission="'courseSchedule/practiceCourseTeacherAdjust'"
|
|
|
type="text"
|
|
|
v-if="scope.row.status == 'NOT_START'"
|
|
|
@click="resetTeacher(scope.row)"
|
|
|
>更换老师</el-button>
|
|
|
- <!-- <el-button
|
|
|
+ <el-button
|
|
|
type="text"
|
|
|
v-permission="'accompanys/cleanAttendance'"
|
|
|
v-if="!scope.row.isSettlement"
|
|
|
@click="clearAttend(scope.row)"
|
|
|
- >清除考勤</el-button> -->
|
|
|
+ >清除考勤</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -167,7 +167,7 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
|
- title="老师调整"
|
|
|
+ title="课程组调整"
|
|
|
width="400px"
|
|
|
:before-close="teacherClose"
|
|
|
:visible.sync="teacherVisible"
|
|
@@ -180,7 +180,20 @@
|
|
|
label-width="80px;"
|
|
|
:inline="true"
|
|
|
>
|
|
|
- <el-form-item label="老师姓名">
|
|
|
+ <el-form-item label="课程班名称">
|
|
|
+ <el-input v-model.trim="teacherForm.name" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程组声部">
|
|
|
+ <el-select v-model.trim="teacherForm.subject" @change="changeSound" filterable clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in subjectList"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程组老师">
|
|
|
<el-select v-model.trim="teacherForm.teacher" filterable clearable>
|
|
|
<el-option
|
|
|
v-for="(item,index) in teacherList"
|
|
@@ -190,6 +203,9 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <p style="color:#FF5353">*更改课程组老师,将更换全部未开始课程的老师</p>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="teacherVisible = false">取 消</el-button>
|
|
@@ -212,9 +228,9 @@
|
|
|
<el-input type="number" @mousewheel.native.prevent v-model.trim="adjustmentForm.addCount"></el-input>
|
|
|
</el-form-item>
|
|
|
<br />
|
|
|
- <el-form-item label="单课费用" prop="fee" v-if="isaddCourse">
|
|
|
+ <!-- <el-form-item label="单课费用" prop="fee" v-if="isaddCourse">
|
|
|
<el-input v-model.trim="adjustmentForm.fee"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="排课起始时间" prop="courseTime">
|
|
|
<el-date-picker
|
|
|
v-model.trim="adjustmentForm.courseTime"
|
|
@@ -286,7 +302,9 @@ import {
|
|
|
practiceGroupManage,
|
|
|
practiceGroupTeacherAdjust,
|
|
|
practiceCourseTeacherAdjust,
|
|
|
- cleanAttendance
|
|
|
+ cleanAttendance,
|
|
|
+ batchAddCourses,
|
|
|
+ getPracticeApplySubjects
|
|
|
} from "@/api/buildTeam";
|
|
|
import {
|
|
|
vipCourseAdjust,
|
|
@@ -321,6 +339,7 @@ export default {
|
|
|
teacherList: [],
|
|
|
courseData: [],
|
|
|
practiceId: null,
|
|
|
+ subjectList: [],
|
|
|
maskForm: {
|
|
|
date: "",
|
|
|
startTime: "",
|
|
@@ -343,10 +362,13 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
teacherRules: {
|
|
|
- teacher: [{ required: true, message: "请选择老师", trigger: "blur" }]
|
|
|
+ teacher: [{ required: true, message: "请选择老师", trigger: "blur" }],
|
|
|
+ subject: [{ required: true, message: "请选择声部", trigger: "blur" }]
|
|
|
},
|
|
|
teacherForm: {
|
|
|
- teacher: null
|
|
|
+ teacher: null,
|
|
|
+ name: null,
|
|
|
+ subject: null
|
|
|
},
|
|
|
courseOption: null,
|
|
|
coursesExpireDate: null,
|
|
@@ -404,6 +426,12 @@ export default {
|
|
|
this.teacherList = res.data;
|
|
|
}
|
|
|
});
|
|
|
+ // 获取默认声部信息
|
|
|
+ getPracticeApplySubjects().then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.subjectList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
// 获取课程组信息
|
|
|
this.courseOption = this.coursesDate();
|
|
|
this.getCourseGroup();
|
|
@@ -496,6 +524,8 @@ export default {
|
|
|
// 课程组
|
|
|
this.isMultiple = true;
|
|
|
this.teacherForm.teacher = this.courseData[0].userId;
|
|
|
+ this.teacherForm.name = this.courseData[0].name;
|
|
|
+ this.teacherForm.subject = this.courseData[0].subjectId;
|
|
|
this.teacherVisible = true;
|
|
|
},
|
|
|
subresetTeacher() {
|
|
@@ -503,12 +533,7 @@ export default {
|
|
|
if (some) {
|
|
|
if (this.isMultiple) {
|
|
|
// 修改课程组老师
|
|
|
- this.$confirm("此操作将修改所有未上课程的老师, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
+
|
|
|
practiceGroupTeacherAdjust({
|
|
|
practiceGroupId: this.practiceId,
|
|
|
teacherId: this.teacherForm.teacher
|
|
@@ -520,15 +545,12 @@ export default {
|
|
|
this.teacherVisible = false;
|
|
|
}
|
|
|
});
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- return;
|
|
|
- });
|
|
|
} else {
|
|
|
// 修改单节课老师
|
|
|
practiceCourseTeacherAdjust({
|
|
|
courseScheduleId: this.activeRow.id,
|
|
|
- teacherId: this.teacherForm.teacher
|
|
|
+ teacherId: this.teacherForm.teacher,
|
|
|
+ subjectId:this.teacherForm.subjectId
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
@@ -575,6 +597,17 @@ export default {
|
|
|
this.adjustmentVisible = true;
|
|
|
}
|
|
|
},
|
|
|
+ changeSound(val){
|
|
|
+ if(val){
|
|
|
+ this.subjectList.forEach(item=>{
|
|
|
+ if(item.id == val){
|
|
|
+ let strArr = this.teacherForm.name.split('•')
|
|
|
+ this.teacherForm.name = item.name+'•'+strArr[1]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
addWeek() {
|
|
|
// 添加循环周期
|
|
|
this.weekList.push({
|
|
@@ -606,8 +639,10 @@ export default {
|
|
|
let idArr = this.activeList.map(item => {
|
|
|
return item.id;
|
|
|
});
|
|
|
- let courseScheduleIds = idArr.join(",");
|
|
|
- obj.courseScheduleIds = courseScheduleIds;
|
|
|
+ // courseScheduleIdList
|
|
|
+ let courseScheduleIdList = idArr.join(",");
|
|
|
+ obj.courseScheduleIdList = courseScheduleIdList;
|
|
|
+ obj.courseScheduleIds = courseScheduleIdList
|
|
|
obj.courseTimes = this.weekList;
|
|
|
obj.holiday = this.adjustmentForm.checked;
|
|
|
obj.teachMode = this.adjustmentForm.courseType || null;
|
|
@@ -663,20 +698,22 @@ export default {
|
|
|
}
|
|
|
// 开始
|
|
|
let obj = {};
|
|
|
- obj.courseCreateStartTime = this.adjustmentForm.courseTime;
|
|
|
- let idArr = this.activeList.map(item => {
|
|
|
- return item.id;
|
|
|
- });
|
|
|
- let courseScheduleIds = idArr.join(",");
|
|
|
- obj.courseScheduleIds = courseScheduleIds;
|
|
|
- obj.courseTimes = this.weekList;
|
|
|
- obj.holiday = this.adjustmentForm.checked;
|
|
|
- obj.vipGroupId = this.practiceId;
|
|
|
- obj.courseCount = this.adjustmentForm.addCount;
|
|
|
+ obj.startDate = this.adjustmentForm.courseTime;
|
|
|
+ // let idArr = this.activeList.map(item => {
|
|
|
+ // return item.id;
|
|
|
+ // });
|
|
|
+ // let courseScheduleIds = idArr.join(",");
|
|
|
+ // obj.courseScheduleIds = courseScheduleIds;
|
|
|
+ obj.coursesTimes = this.adjustmentForm.addCount;
|
|
|
+ obj.teachingArrangementList = this.weekList;
|
|
|
+
|
|
|
+ obj.isJumpHoliday = this.adjustmentForm.checked;
|
|
|
+ obj.musicGroupId = this.practiceId;
|
|
|
obj.teachMode = this.adjustmentForm.courseType;
|
|
|
- obj.singleClassPrice = this.adjustmentForm.fee;
|
|
|
- obj.groupType = "PRACTICE";
|
|
|
- batchAppendVipGroupCourses(obj).then(res => {
|
|
|
+ obj.type = "PRACTICE";
|
|
|
+ // console.log(obj)
|
|
|
+ // return
|
|
|
+ batchAddCourses(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("恭喜您添加成功");
|
|
|
this.adjustmentVisible = false;
|