|
@@ -75,12 +75,12 @@
|
|
|
v-permission="'vipGroupManage/applyRefundForStudent'"
|
|
|
@click="lookFee(scope)">退学</el-button>
|
|
|
<!-- v-permission="'vipGroupManage/applyRefundForStudent'" -->
|
|
|
- <!-- <el-button type="text"
|
|
|
+ <el-button type="text"
|
|
|
v-if="scope.row.studentStatus == 0"
|
|
|
@click="stopCourse(scope)">休学</el-button>
|
|
|
<el-button type="text"
|
|
|
v-if="scope.row.studentStatus == 3"
|
|
|
- @click="recoveryCourse(scope)">恢复</el-button> -->
|
|
|
+ @click="recoveryCourse(scope)">恢复</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -140,7 +140,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="学员调整"
|
|
|
+ <el-dialog title="学员复学"
|
|
|
width="800px"
|
|
|
:visible.sync="adjustmentVisible">
|
|
|
<el-form :model='adjustmentForm'
|
|
@@ -154,10 +154,12 @@
|
|
|
v-model="adjustmentForm.count"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任课老师"
|
|
|
- prop="addCount">
|
|
|
- <el-select>
|
|
|
- <el-option label="李老师"
|
|
|
- value="1"></el-option>
|
|
|
+ prop="teacher">
|
|
|
+ <el-select v-model="adjustmentForm.teacher">
|
|
|
+ <el-option v-for="(item,index) in teacherList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.realName"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <br> -->
|
|
@@ -230,14 +232,15 @@
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
|
<el-button @click="adjustmentVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary">确 定</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ @click="submieRecover">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
-import { findVipGroupStudents, leaveSchool, getStudentSurplusCourseFee, getHaveCourseBalanceStudents, addVipGroupStudents, vipPauseForStudent } from '@/api/vipSeting'
|
|
|
+import { findVipGroupStudents, leaveSchool, getStudentSurplusCourseFee, getHaveCourseBalanceStudents, addVipGroupStudents, vipPauseForStudent, getStudentPauseInfo, recoverForStudent, findTeacherWithVipGroupOrganAndSubject } from '@/api/vipSeting'
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
data () {
|
|
@@ -264,13 +267,15 @@ export default {
|
|
|
checked: false,
|
|
|
addCount: '',
|
|
|
courseType: '',
|
|
|
- fee: ''
|
|
|
+ fee: '',
|
|
|
+ teacher: ''
|
|
|
},
|
|
|
adjustmentRules: {
|
|
|
courseTime: [{ required: true, message: '请选择开始时间' }],
|
|
|
addCount: [{ required: true, message: '请输入加课次数' }],
|
|
|
courseType: [{ required: true, message: '请选择课程类型' }],
|
|
|
- fee: [{ required: true, message: '请输入费用' }]
|
|
|
+ fee: [{ required: true, message: '请输入费用' }],
|
|
|
+ teacher: [{ required: true, message: '请选择老师' }]
|
|
|
},
|
|
|
weekDateList: [
|
|
|
{ value: '1', label: '星期一' },
|
|
@@ -292,12 +297,18 @@ export default {
|
|
|
return time.getTime() + 86400000 <= new Date().getTime()
|
|
|
}
|
|
|
},
|
|
|
+ teacherList: []
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
let id = this.$route.query.id;
|
|
|
this.id = id;
|
|
|
this.getStudents()
|
|
|
+ findTeacherWithVipGroupOrganAndSubject({ vipGroupId: this.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.teacherList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
search () {
|
|
@@ -405,7 +416,16 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
recoveryCourse (scope) {
|
|
|
- this.adjustmentVisible = true;
|
|
|
+ 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}`
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
// this.$confirm('是否休学?', '提示', {
|
|
|
// confirmButtonText: '确定',
|
|
|
// cancelButtonText: '取消',
|
|
@@ -430,6 +450,30 @@ export default {
|
|
|
id: new Date()
|
|
|
})
|
|
|
},
|
|
|
+ submieRecover () {
|
|
|
+ this.$refs['adjustmentForm'].validate(res => {
|
|
|
+ if (res) {
|
|
|
+ // 发请求
|
|
|
+ let obj = {}
|
|
|
+ obj.courseCreateStartTime = this.adjustmentForm.courseTime;
|
|
|
+ obj.skipHoliday = this.adjustmentForm.checked;
|
|
|
+ obj.teacherId = this.adjustmentForm.teacher;
|
|
|
+ obj.userId = this.activeStudent;
|
|
|
+ obj.courseTimes = [];
|
|
|
+ obj.courseTimes = this.weekList
|
|
|
+ obj.vipGroupId = this.id
|
|
|
+ recoverForStudent(obj).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.adjustmentVisible = false;
|
|
|
+ this.getStudents()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请填写必要参数')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.activeStudent;
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|