|
@@ -60,11 +60,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程单价(线上)">
|
|
|
<el-input v-model="rightForm.onlineClass"
|
|
|
- disabled></el-input>
|
|
|
+ type="number"
|
|
|
+ :disabled='!isreset'></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程单价(线下)">
|
|
|
<el-input v-model="rightForm.offlineClass"
|
|
|
- disabled></el-input>
|
|
|
+ type="number"
|
|
|
+ :disabled='!isreset'></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程总价">
|
|
|
<el-input v-model="rightForm.allPrice"
|
|
@@ -75,13 +77,21 @@
|
|
|
disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+ <el-button v-if="!isreset"
|
|
|
+ v-permission="'vipGroupManage/updateVipBaseInfo'"
|
|
|
+ class="resetBtn"
|
|
|
+ type="primary"
|
|
|
+ @click="resetPrice">修改</el-button>
|
|
|
+ <el-button class="resetBtn"
|
|
|
+ v-permission="'vipGroupManage/updateVipBaseInfo'"
|
|
|
+ v-if="isreset"
|
|
|
+ type="primary"
|
|
|
+ @click="submitBtn">确定</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getVipGroupDetail, findVipGroupStudents, leaveSchool } from '@/api/vipSeting'
|
|
|
+import { getVipGroupDetail, findVipGroupStudents, leaveSchool, updateVipBaseInfo } from '@/api/vipSeting'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -105,60 +115,64 @@ export default {
|
|
|
allPrice: '',
|
|
|
progress: ''
|
|
|
},
|
|
|
- tableList: []
|
|
|
+ tableList: [],
|
|
|
+ isreset: false
|
|
|
}
|
|
|
}, mounted () {
|
|
|
let id = this.$route.query.id;
|
|
|
this.id = id;
|
|
|
// 根据id 获取vip详情
|
|
|
- getVipGroupDetail({ vipGroupId: id }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- /**
|
|
|
- * teacherCount: '',
|
|
|
- subject: '', // 科目名称
|
|
|
- active: '', // 活动名称
|
|
|
- status: '', //课程形式
|
|
|
- classNum: "", // 每班人数
|
|
|
- classTime: '', // 每课时长
|
|
|
- address: '', // 教学点名称
|
|
|
- onlineClass: '', //线上课数
|
|
|
- offlineClass: '', //线下课数
|
|
|
- startTime: '', // 报名开始时间
|
|
|
- *
|
|
|
- */
|
|
|
- this.topForm.teacherCount = res.data.userName;
|
|
|
- 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;
|
|
|
- this.$emit('getName', res.data.name);
|
|
|
- /**
|
|
|
- * allClass: '',
|
|
|
- onlineClass: '',
|
|
|
- offlineClass: '',
|
|
|
- allPrice: '',
|
|
|
- progress: ''
|
|
|
- */
|
|
|
- }
|
|
|
- });
|
|
|
+ this.getVipGroupDetail(id);
|
|
|
// 根据id 获取vip学员
|
|
|
this.getStudents();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getVipGroupDetail (id) {
|
|
|
+ getVipGroupDetail({ vipGroupId: id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ /**
|
|
|
+ * teacherCount: '',
|
|
|
+ subject: '', // 科目名称
|
|
|
+ active: '', // 活动名称
|
|
|
+ status: '', //课程形式
|
|
|
+ classNum: "", // 每班人数
|
|
|
+ classTime: '', // 每课时长
|
|
|
+ address: '', // 教学点名称
|
|
|
+ onlineClass: '', //线上课数
|
|
|
+ offlineClass: '', //线下课数
|
|
|
+ startTime: '', // 报名开始时间
|
|
|
+ *
|
|
|
+ */
|
|
|
+ this.topForm.teacherCount = res.data.userName;
|
|
|
+ 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;
|
|
|
+ this.$emit('getName', res.data.name);
|
|
|
+ /**
|
|
|
+ * allClass: '',
|
|
|
+ onlineClass: '',
|
|
|
+ offlineClass: '',
|
|
|
+ allPrice: '',
|
|
|
+ progress: ''
|
|
|
+ */
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getStudents () {
|
|
|
findVipGroupStudents({ vipGroupId: this.id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -178,6 +192,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+ },
|
|
|
+ resetPrice () {
|
|
|
+ this.isreset = true;
|
|
|
+ },
|
|
|
+ submitBtn () {
|
|
|
+ // 提交
|
|
|
+ /**
|
|
|
+ * this.rightForm.onlineClass = res.data.onlineClassesUnitPrice;
|
|
|
+ this.rightForm.offlineClass = res.data.offlineClassesUnitPrice;
|
|
|
+ */
|
|
|
+ let onlineClassesUnitPrice = this.rightForm.onlineClass;
|
|
|
+ let offlineClassesUnitPrice = this.rightForm.offlineClass
|
|
|
+ updateVipBaseInfo({ id: this.id, onlineClassesUnitPrice, offlineClassesUnitPrice }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.isreset = false;
|
|
|
+ this.getVipGroupDetail(this.id);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -209,5 +242,12 @@ export default {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
}
|
|
|
+ .right {
|
|
|
+ clear: both;
|
|
|
+ .resetBtn {
|
|
|
+ margin-top: 30px;
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|