|
@@ -52,26 +52,6 @@
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <!-- <el-popover placement="top"
|
|
|
- width="160"
|
|
|
- trigger="click"
|
|
|
- :ref="scope.$index">
|
|
|
- <p>请输入退费金额</p>
|
|
|
- <el-input style="margin:10px 0;"
|
|
|
- type="number"
|
|
|
- v-model.trim="scope.row.fee"></el-input>
|
|
|
- <div style="text-align: right; margin-top: 20px">
|
|
|
- <el-button size="mini"
|
|
|
- type="text"
|
|
|
- @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- size="mini"
|
|
|
- @click="leaveSchool(scope)">确定</el-button>
|
|
|
- </div>
|
|
|
- <el-button type="text"
|
|
|
- slot="reference"
|
|
|
- @click="lookFee(scope)">退学</el-button>
|
|
|
- </el-popover> -->
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="
|
|
@@ -81,7 +61,6 @@
|
|
|
@click="lookFee(scope)"
|
|
|
>退学</el-button
|
|
|
>
|
|
|
- <!-- v-permission="'vipGroupManage/applyRefundForStudent'" -->
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="scope.row.studentStatus == 0"
|
|
@@ -144,7 +123,8 @@
|
|
|
<el-table-column prop="courseSalary" label="课程余额"></el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- :total="rules.total"
|
|
|
+ sync
|
|
|
+ :total.sync="rules.total"
|
|
|
:page.sync="rules.page"
|
|
|
:limit.sync="rules.limit"
|
|
|
:page-sizes="rules.page_size"
|
|
@@ -166,10 +146,19 @@
|
|
|
:inline="true"
|
|
|
>
|
|
|
<el-form-item label="剩余课时">
|
|
|
- <el-input disabled v-model.trim="adjustmentForm.count" style="width:200px!important"></el-input>
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model.trim="adjustmentForm.count"
|
|
|
+ style="width: 200px !important"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任课老师" prop="teacher">
|
|
|
- <el-select v-model.trim="adjustmentForm.teacher" clearable filterable style="width:200px!important">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="adjustmentForm.teacher"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ style="width: 200px !important"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="(item, index) in teacherList"
|
|
|
:key="index"
|
|
@@ -182,6 +171,7 @@
|
|
|
<el-form-item label="排课起始时间" prop="courseTime">
|
|
|
<el-date-picker
|
|
|
v-model.trim="adjustmentForm.courseTime"
|
|
|
+ @change="changeCourseTime"
|
|
|
:picker-options="pickerOptions"
|
|
|
style="width: 200px !important"
|
|
|
type="date"
|
|
@@ -189,13 +179,19 @@
|
|
|
placeholder="选择日期"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
+ <!-- vipGroupManage/recoverForStudent1 -->
|
|
|
<el-form-item label="剩余有效期" prop="days">
|
|
|
- <el-input style="width:200px!important" v-model.trim="adjustmentForm.days"></el-input>
|
|
|
+ <el-input-number :controls='false'
|
|
|
+ class="inputNumber"
|
|
|
+ style="width: 200px !important;"
|
|
|
+ :disabled="!permission('vipGroupManage/recoverForStudent1')"
|
|
|
+ v-model.trim="adjustmentForm.days"
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="有效期截止" prop="expireDate">
|
|
|
+ <el-form-item label="有效期截止" prop="expireDate">
|
|
|
<el-date-picker
|
|
|
+ :disabled="true"
|
|
|
v-model.trim="adjustmentForm.expireDate"
|
|
|
:picker-options="pickerOptions"
|
|
|
style="width: 200px !important"
|
|
@@ -206,10 +202,11 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-checkbox
|
|
|
+ <el-checkbox
|
|
|
style="margin-left: 10px"
|
|
|
v-model.trim="adjustmentForm.checked"
|
|
|
- >是否跳过节假日</el-checkbox>
|
|
|
+ >是否跳过节假日</el-checkbox
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="WeekWrap">
|
|
@@ -226,8 +223,13 @@
|
|
|
v-for="(item, index) in weekList"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <span class='title'>循环周期: </span>
|
|
|
- <el-select v-model.trim="item.dayOfWeek" filterable clearable style="width:200px!important">
|
|
|
+ <span class="title">循环周期: </span>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="item.dayOfWeek"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ style="width: 200px !important"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="(item, index) in weekDateList"
|
|
|
:key="index"
|
|
@@ -237,7 +239,7 @@
|
|
|
</el-select>
|
|
|
<span style="margin-left: 10px">开始时间</span>
|
|
|
<el-time-select
|
|
|
- style="margin-left: 10px; width:100px;"
|
|
|
+ style="margin-left: 10px; width: 100px"
|
|
|
placeholder=""
|
|
|
v-model.trim="item.startClassTime"
|
|
|
:picker-options="{
|
|
@@ -266,6 +268,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
+import dayjs from 'dayjs'
|
|
|
import {
|
|
|
findVipGroupStudents,
|
|
|
leaveSchool,
|
|
@@ -277,6 +280,7 @@ import {
|
|
|
recoverForStudent,
|
|
|
findTeacherWithVipGroupOrganAndSubject,
|
|
|
} from "@/api/vipSeting";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
data() {
|
|
@@ -305,8 +309,8 @@ export default {
|
|
|
courseType: "",
|
|
|
fee: "",
|
|
|
teacher: "",
|
|
|
- days:'',
|
|
|
- expireDate:''
|
|
|
+ days: "",
|
|
|
+ expireDate: "",
|
|
|
},
|
|
|
adjustmentRules: {
|
|
|
courseTime: [{ required: true, message: "请选择开始时间" }],
|
|
@@ -314,7 +318,7 @@ export default {
|
|
|
courseType: [{ required: true, message: "请选择课程类型" }],
|
|
|
fee: [{ required: true, message: "请输入费用" }],
|
|
|
teacher: [{ required: true, message: "请选择老师" }],
|
|
|
- days: [{ required: true, message: "请输入剩余有效期" }],
|
|
|
+ days: [{ required: true, message: "请输入剩余有效期" }],
|
|
|
expireDate: [{ required: true, message: "请输入有效期截止" }],
|
|
|
},
|
|
|
weekDateList: [
|
|
@@ -350,6 +354,10 @@ export default {
|
|
|
this.__init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ permission (str) {
|
|
|
+ console.log(permission(str))
|
|
|
+ return permission(str);
|
|
|
+ },
|
|
|
__init() {
|
|
|
let id = this.$route.query.id;
|
|
|
this.id = id;
|
|
@@ -519,20 +527,12 @@ export default {
|
|
|
// vip状态没暂停 不需要排课
|
|
|
// 课程编号 学生编号
|
|
|
const h = this.$createElement;
|
|
|
- // `将按照当前剩余课时安排上课,排课截至时间, '提示',
|
|
|
- /**
|
|
|
- *
|
|
|
- * message: h( [
|
|
|
- h("p", null, "将按照当前剩余课时安排上课"),
|
|
|
- h("p", { style: "color: red" },),
|
|
|
- ]),
|
|
|
- */
|
|
|
this.$msgbox({
|
|
|
title: "提示",
|
|
|
message: h("p", null, [
|
|
|
h("p", null, "将按照当前剩余课时安排上课"),
|
|
|
// h("span", null, `排课截至时间:`),
|
|
|
- // h("span", { style: "color: red" }, `${res.data.expireDate}`), 经辜经理同意注释
|
|
|
+ // h("span", { style: "color: red" }, `${res.data.expireDate}`), 辜经理同意注释
|
|
|
]),
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -556,6 +556,7 @@ export default {
|
|
|
this.adjustmentVisible = true;
|
|
|
this.adjustmentForm.teacher = res.data.teacherId;
|
|
|
this.adjustmentForm.count = `${res.data.totalCourseTimes}+${res.data.giveCourseTimes}`;
|
|
|
+ this.adjustmentForm.days = res.data.days;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -600,6 +601,8 @@ export default {
|
|
|
obj.courseTimes = [];
|
|
|
obj.courseTimes = this.weekList;
|
|
|
obj.vipGroupId = this.id;
|
|
|
+ obj.days = this.adjustmentForm.days;
|
|
|
+ obj.expireDate = this.adjustmentForm.expireDate;
|
|
|
recoverForStudent(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.adjustmentVisible = false;
|
|
@@ -612,9 +615,31 @@ export default {
|
|
|
});
|
|
|
this.activeStudent;
|
|
|
},
|
|
|
+ changeCourseTime(val) {
|
|
|
+
|
|
|
+ if(!this.adjustmentForm.days){
|
|
|
+ this.$message.error('请填写剩余有效期');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(val){
|
|
|
+ this.adjustmentForm.expireDate = dayjs(val).add(this.adjustmentForm.days,'day').format('YYYY-MM-DD')
|
|
|
+ }else{
|
|
|
+ this.adjustmentForm.expireDate = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.title { display: inline-block; width: 110px; text-align: right; margin-right: 10px;}
|
|
|
+.title {
|
|
|
+ display: inline-block;
|
|
|
+ width: 108px;
|
|
|
+ text-align: right;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/.el-input-number .el-input__inner{
|
|
|
+text-align: left!important;
|
|
|
+}
|
|
|
</style>
|