|
@@ -418,10 +418,33 @@ export default {
|
|
|
recoveryCourse (scope) {
|
|
|
getStudentPauseInfo({ studentId: scope.row.id, vipGroupId: this.id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.activeStudent = res.data.studentId
|
|
|
- this.adjustmentVisible = true;
|
|
|
- this.adjustmentForm.teacher = res.data.teacherId;
|
|
|
- this.adjustmentForm.count = `${res.data.totalCourseTimes}+${res.data.giveCourseTimes}`
|
|
|
+
|
|
|
+ if (res.data.isPause == 0) {
|
|
|
+ // vip状态没暂停 不需要排课
|
|
|
+ // 课程编号 学生编号
|
|
|
+ this.$confirm('将按照当前剩余课时安排上课', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 发请求 恢复上课
|
|
|
+ recoverForStudent({ vipGroupId: this.id, userId: scope.row.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.adjustmentVisible = false;
|
|
|
+ this.getStudents()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.activeStudent = res.data.studentId
|
|
|
+ this.adjustmentVisible = true;
|
|
|
+ this.adjustmentForm.teacher = res.data.teacherId;
|
|
|
+ this.adjustmentForm.count = `${res.data.totalCourseTimes}+${res.data.giveCourseTimes}`
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|