|
@@ -1,86 +1,76 @@
|
|
|
<template>
|
|
|
<div class="vip-base">
|
|
|
<div class="left">
|
|
|
- <el-form label-position="right"
|
|
|
- label-width="120px"
|
|
|
- :model="topForm">
|
|
|
+ <el-form label-position="right" label-width="120px" :model="topForm">
|
|
|
<el-form-item label="指导老师">
|
|
|
- <el-input v-model.trim="topForm.teacherCount"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.teacherCount" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="乐团主管">
|
|
|
- <el-input v-model.trim="topForm.educationalTeacherName"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="topForm.educationalTeacherName"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="科目名称">
|
|
|
- <el-input v-model.trim="topForm.subject"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.subject" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="活动方案">
|
|
|
- <el-input v-model.trim="topForm.active"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.active" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程形式">
|
|
|
- <el-input v-model.trim="topForm.status"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.status" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="每班人数">
|
|
|
- <el-input v-model.trim="topForm.classNum"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.classNum" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="每课时长">
|
|
|
- <el-input v-model.trim="topForm.classTime"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.classTime" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="教学点名称">
|
|
|
- <el-input v-model.trim="topForm.address"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.address" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="线上课数">
|
|
|
- <el-input v-model.trim="topForm.onlineClass"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.onlineClass" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="线下课数">
|
|
|
- <el-input v-model.trim="topForm.offlineClass"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="topForm.offlineClass" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="报名开始时间">
|
|
|
- <div class="disBox">{{topForm.startTime | dateForMinFormat}}</div>
|
|
|
+ <div class="disBox">{{ topForm.startTime | dateForMinFormat }}</div>
|
|
|
<!-- <el-input v-model.trim="topForm.startTime" disabled></el-input> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="报名结束时间">
|
|
|
- <div class="disBox">{{topForm.endTime | dateForMinFormat}}</div>
|
|
|
+ <div class="disBox">{{ topForm.endTime | dateForMinFormat }}</div>
|
|
|
<!-- <el-input v-model.trim="topForm.endTime" disabled></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <el-form label-position="right"
|
|
|
- label-width="120px"
|
|
|
- :model="rightForm">
|
|
|
+ <el-form label-position="right" label-width="120px" :model="rightForm">
|
|
|
<el-form-item label="总课时数">
|
|
|
- <el-input v-model.trim="rightForm.allClass"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="rightForm.allClass" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程单价(线上)">
|
|
|
- <el-input v-model.trim="rightForm.onlineClass"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- :disabled="!isreset"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="rightForm.onlineClass"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ :disabled="!isreset"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程单价(线下)">
|
|
|
- <el-input v-model.trim="rightForm.offlineClass"
|
|
|
- type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
- :disabled="!isreset"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="rightForm.offlineClass"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ :disabled="!isreset"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程总价">
|
|
|
- <el-input v-model.trim="rightForm.allPrice"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="rightForm.allPrice" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="当前课程进度">
|
|
|
- <el-input v-model.trim="rightForm.progress"
|
|
|
- disabled></el-input>
|
|
|
+ <el-input v-model.trim="rightForm.progress" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- <el-button v-if="!isreset"
|
|
@@ -101,10 +91,11 @@ import {
|
|
|
getVipGroupDetail,
|
|
|
findVipGroupStudents,
|
|
|
leaveSchool,
|
|
|
- updateVipBaseInfo
|
|
|
+ updateVipBaseInfo,
|
|
|
} from "@/api/vipSeting";
|
|
|
export default {
|
|
|
- data () {
|
|
|
+ props: ["vipDetail"],
|
|
|
+ data() {
|
|
|
return {
|
|
|
topForm: {
|
|
|
teacherCount: "",
|
|
@@ -117,38 +108,37 @@ export default {
|
|
|
onlineClass: "", //线上课数
|
|
|
offlineClass: "", //线下课数
|
|
|
startTime: "", // 报名开始时间
|
|
|
- endTime: ""
|
|
|
+ endTime: "",
|
|
|
},
|
|
|
rightForm: {
|
|
|
allClass: "",
|
|
|
onlineClass: "",
|
|
|
offlineClass: "",
|
|
|
allPrice: "",
|
|
|
- progress: ""
|
|
|
+ progress: "",
|
|
|
},
|
|
|
tableList: [],
|
|
|
- isreset: false
|
|
|
+ isreset: false,
|
|
|
};
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.__init();
|
|
|
- },
|
|
|
- activated () {
|
|
|
+ mounted() {
|
|
|
this.__init();
|
|
|
},
|
|
|
methods: {
|
|
|
- __init () {
|
|
|
- let id = this.$route.query.id;
|
|
|
- this.id = id;
|
|
|
+ __init() {
|
|
|
+ // let id = this.$route.query.id;
|
|
|
+ // this.id = id;
|
|
|
// 根据id 获取vip详情
|
|
|
- this.getVipGroupDetail(id);
|
|
|
+
|
|
|
// 根据id 获取vip学员
|
|
|
this.getStudents();
|
|
|
+ this.getVipGroupDetail()
|
|
|
},
|
|
|
- getVipGroupDetail (id) {
|
|
|
- getVipGroupDetail({ vipGroupId: id }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- /**
|
|
|
+ getVipGroupDetail() {
|
|
|
+ let id = this.$route.query.id;
|
|
|
+ getVipGroupDetail({ vipGroupId: id }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ /**
|
|
|
* teacherCount: '',
|
|
|
subject: '', // 科目名称
|
|
|
active: '', // 活动名称
|
|
@@ -161,49 +151,44 @@ export default {
|
|
|
startTime: '', // 报名开始时间
|
|
|
*
|
|
|
*/
|
|
|
- this.topForm.teacherCount = res.data.userName;
|
|
|
- this.topForm.educationalTeacherName = res.data.educationalTeacherName
|
|
|
- this.topForm.subject = res.data.subjectName; //科目名称
|
|
|
- this.topForm.active = res.data.vipGroupActivityName;
|
|
|
- this.topForm.status = res.data.categoryName;
|
|
|
- this.topForm.classNum = res.data.studentNum;
|
|
|
+ this.topForm.teacherCount = res.data.userName;
|
|
|
+ this.topForm.educationalTeacherName =
|
|
|
+ res.data.educationalTeacherName;
|
|
|
+ this.topForm.subject = res.data.subjectName; //科目名称
|
|
|
+ this.topForm.active = res.data.vipGroupActivityName;
|
|
|
+ this.topForm.status = res.data.categoryName;
|
|
|
+ this.topForm.classNum = res.data.studentNum;
|
|
|
|
|
|
- // totalClassTimes; 总课时数
|
|
|
- this.topForm.classTime = res.data.singleClassMinutes;
|
|
|
- // 教学点
|
|
|
- this.topForm.address = res.data.teacherSchoolName;
|
|
|
- this.topForm.onlineClass = res.data.onlineClassesNum;
|
|
|
- this.topForm.offlineClass = res.data.offlineClassesNum;
|
|
|
- // endTime
|
|
|
- this.topForm.startTime = res.data.registrationStartTime;
|
|
|
- this.topForm.endTime = res.data.paymentExpireDate;
|
|
|
- this.rightForm.allClass = res.data.totalClassTimes;
|
|
|
- this.rightForm.onlineClass = res.data.onlineClassesUnitPrice;
|
|
|
- this.rightForm.offlineClass = res.data.offlineClassesUnitPrice;
|
|
|
- this.rightForm.allPrice = res.data.totalPrice;
|
|
|
- this.rightForm.progress =
|
|
|
- res.data.currentClassTimes + "/" + res.data.totalClassTimes;
|
|
|
- /**
|
|
|
- * allClass: '',
|
|
|
- onlineClass: '',
|
|
|
- offlineClass: '',
|
|
|
- allPrice: '',
|
|
|
- progress: ''
|
|
|
- */
|
|
|
- }
|
|
|
- });
|
|
|
+ // totalClassTimes; 总课时数
|
|
|
+ this.topForm.classTime = res.data.singleClassMinutes;
|
|
|
+ // 教学点
|
|
|
+ this.topForm.address = res.data.teacherSchoolName;
|
|
|
+ this.topForm.onlineClass = res.data.onlineClassesNum;
|
|
|
+ this.topForm.offlineClass = res.data.offlineClassesNum;
|
|
|
+ // endTime
|
|
|
+ this.topForm.startTime = res.data.registrationStartTime;
|
|
|
+ this.topForm.endTime = res.data.paymentExpireDate;
|
|
|
+ this.rightForm.allClass = res.data.totalClassTimes;
|
|
|
+ this.rightForm.onlineClass = res.data.onlineClassesUnitPrice;
|
|
|
+ this.rightForm.offlineClass = res.data.offlineClassesUnitPrice;
|
|
|
+ this.rightForm.allPrice = res.data.totalPrice;
|
|
|
+ this.rightForm.progress =
|
|
|
+ res.data.currentClassTimes + "/" + res.data.totalClassTimes;
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- getStudents () {
|
|
|
- findVipGroupStudents({ vipGroupId: this.id }).then(res => {
|
|
|
+ getStudents() {
|
|
|
+ findVipGroupStudents({ vipGroupId: this.id }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- leaveSchool (scope) {
|
|
|
+ leaveSchool(scope) {
|
|
|
let studentId = scope.row.id;
|
|
|
let vipGroupId = this.id;
|
|
|
- leaveSchool({ studentId, vipGroupId }).then(res => {
|
|
|
+ leaveSchool({ studentId, vipGroupId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("退学成功");
|
|
|
scope._self.$refs[scope.$index].doClose();
|
|
@@ -211,10 +196,10 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- resetPrice () {
|
|
|
+ resetPrice() {
|
|
|
this.isreset = true;
|
|
|
},
|
|
|
- submitBtn () {
|
|
|
+ submitBtn() {
|
|
|
// 提交
|
|
|
/**
|
|
|
* this.rightForm.onlineClass = res.data.onlineClassesUnitPrice;
|
|
@@ -225,15 +210,23 @@ export default {
|
|
|
updateVipBaseInfo({
|
|
|
id: this.id,
|
|
|
onlineClassesUnitPrice,
|
|
|
- offlineClassesUnitPrice
|
|
|
- }).then(res => {
|
|
|
+ offlineClassesUnitPrice,
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
|
this.isreset = false;
|
|
|
- this.getVipGroupDetail(this.id);
|
|
|
+ this.$emit('getVipGroupDetail')
|
|
|
+ // this.getVipGroupDetail(this.id);
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ // vipDetail(val){
|
|
|
+ // if(val){
|
|
|
+ // this.getVipGroupDetail();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
};
|
|
|
</script>
|