|
@@ -471,38 +471,38 @@
|
|
|
align="center"
|
|
|
width="120px;"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.membershipEndTime">
|
|
|
- <div v-if="scope.row.membershipDay >= 0">
|
|
|
- {{ scope.row.membershipEndTime | dayjsFormat }}
|
|
|
- <p class="red">剩余{{ scope.row.membershipDay }}天</p>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.membershipEndTime">
|
|
|
+ <div v-if="scope.row.membershipDay >= 0">
|
|
|
+ {{ scope.row.membershipEndTime | dayjsFormat }}
|
|
|
+ <p class="red">剩余{{ scope.row.membershipDay }}天</p>
|
|
|
+ </div>
|
|
|
+ <!-- 已过期 -->
|
|
|
+ <div v-else>
|
|
|
+ <!-- 有未生效 -->
|
|
|
+ <div v-if="scope.row.hasNoStartCloudTeacher">
|
|
|
+ <p>会员未生效</p>
|
|
|
</div>
|
|
|
- <!-- 已过期 -->
|
|
|
+ <!-- 无未生效 -->
|
|
|
<div v-else>
|
|
|
- <!-- 有未生效 -->
|
|
|
- <div v-if="scope.row.hasNoStartCloudTeacher">
|
|
|
- <p>会员未生效</p>
|
|
|
- </div>
|
|
|
- <!-- 无未生效 -->
|
|
|
- <div v-else>
|
|
|
- {{ scope.row.membershipEndTime | dayjsFormat }}
|
|
|
- <p class="red" v-if="scope.row.membershipDay < 0">
|
|
|
- 已过期{{ Math.abs(scope.row.membershipDay) }}天
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ {{ scope.row.membershipEndTime | dayjsFormat }}
|
|
|
+ <p class="red" v-if="scope.row.membershipDay < 0">
|
|
|
+ 已过期{{ Math.abs(scope.row.membershipDay) }}天
|
|
|
+ </p>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- <div></div>
|
|
|
+ <!-- <div></div>
|
|
|
<p v-if="scope.row.hasNoStartCloudTeacher">
|
|
|
{{ scope.row.membershipEndTime | dayjsFormat }}
|
|
|
</p> -->
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div v-else class="red">
|
|
|
- <div v-if="scope.row.hasNoStartCloudTeacher">会员未生效</div>
|
|
|
- <div v-else>未购买会员</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <div v-else class="red">
|
|
|
+ <div v-if="scope.row.hasNoStartCloudTeacher">会员未生效</div>
|
|
|
+ <div v-else>未购买会员</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="备注" prop="remark" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -538,13 +538,13 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="
|
|
|
- permission('musicGroupQuit/directQuitMusicGroup/3852') &&
|
|
|
+ permission('musicGroupQuit/apply/3852') &&
|
|
|
scope.row.studentStatus != 'QUIT'
|
|
|
"
|
|
|
@click="quieTeamMask(scope.row)"
|
|
|
- >退团退费</el-button
|
|
|
+ >退团</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="text"
|
|
|
v-if="
|
|
|
permission('musicGroupQuit/directQuitMusicGroup/3851') &&
|
|
@@ -552,7 +552,7 @@
|
|
|
"
|
|
|
@click="quieTeam(scope.row)"
|
|
|
>退团</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
|
|
|
<el-button
|
|
|
type="text"
|
|
@@ -763,7 +763,7 @@
|
|
|
</el-dialog>
|
|
|
<!-- 退团弹窗 -->
|
|
|
<el-dialog title="退团信息确认" width="700px" :visible.sync="quitVisible">
|
|
|
- <quiteTeam :quitForm="quitForm" :activeRow="activeRow" ref="quitForm" />
|
|
|
+ <quiteTeam :quitForm="quitForm" ref="quitForm" />
|
|
|
<span slot="footer" class="dialog-footer question">
|
|
|
<div>
|
|
|
<el-popover placement="right" width="500" trigger="click">
|
|
@@ -959,6 +959,8 @@ import {
|
|
|
StudentFeeIsLock,
|
|
|
updateStudentFee,
|
|
|
getMusicGroupGradeList,
|
|
|
+ getRefundsDetail,
|
|
|
+ applyMusicGroupQuit,
|
|
|
} from "@/api/buildTeam";
|
|
|
import {
|
|
|
addStudent,
|
|
@@ -1027,14 +1029,16 @@ export default {
|
|
|
organizationCourseUnitPriceSettings: [],
|
|
|
quitForm: {
|
|
|
// 退团信息确认
|
|
|
- isCloudTeacherAmount: null,
|
|
|
- cloudTeacherAmount: null,
|
|
|
isRefundCourseFee: null,
|
|
|
isRefundInstrumentFee: null,
|
|
|
isRefundTeachingAssistantsFee: null,
|
|
|
- isMaintenanceFee: null,
|
|
|
- maintenanceFee: 0,
|
|
|
+ courseViewType: null,
|
|
|
+ hasMaintenance: null,
|
|
|
+ studentName: null,
|
|
|
+ musicGroupName: null,
|
|
|
+ isVisit: false,
|
|
|
reason: "",
|
|
|
+ userComment: null,
|
|
|
},
|
|
|
classMask: {
|
|
|
studentName: "",
|
|
@@ -1176,6 +1180,7 @@ export default {
|
|
|
organId: "",
|
|
|
addTryVisible: false,
|
|
|
memberRankList: [],
|
|
|
+ isManage:false
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -1206,6 +1211,17 @@ export default {
|
|
|
// this.init();
|
|
|
// },
|
|
|
async mounted() {
|
|
|
+ let isSuperAdmin = this.$store.getters.isSuperAdmin;
|
|
|
+ let roles = this.$store.getters.roles;
|
|
|
+ if (isSuperAdmin) {
|
|
|
+ this.isManage = true;
|
|
|
+ } else {
|
|
|
+ if (roles.indexof(3) != -1) {
|
|
|
+ this.isManage = true;
|
|
|
+ } else {
|
|
|
+ this.isManage = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
try {
|
|
|
const res = await getOrganizationCourseUnitPriceSettings({
|
|
|
rows: 9999,
|
|
@@ -1471,6 +1487,7 @@ export default {
|
|
|
.then(() => {
|
|
|
let row = this.activeRow;
|
|
|
let params = {
|
|
|
+ ...this.quitForm,
|
|
|
musicGroupId: this.teamid,
|
|
|
userId: row.userId,
|
|
|
reason: this.quitForm.reason,
|
|
@@ -1481,27 +1498,54 @@ export default {
|
|
|
maintenanceFee: this.quitForm.maintenanceFee,
|
|
|
isRefundMemberFee: this.quitForm.isRefundMemberFee,
|
|
|
};
|
|
|
- // 退还乐器练习云教练费用
|
|
|
- if (this.quitForm.isRefundMemberFee) {
|
|
|
- params.cloudTeacherAmount = this.quitForm.cloudTeacherAmount;
|
|
|
+ params.returnFeeDto = {
|
|
|
+ accessoriesFee: params.accessoriesFee,
|
|
|
+ courseFee: params.courseFee,
|
|
|
+ isReturnAccessoriesFee: params.isReturnAccessoriesFee,
|
|
|
+ isReturnCourseFee: params.isReturnCourseFee,
|
|
|
+ isReturnMaintenanceFee: params.isReturnMaintenanceFee,
|
|
|
+ isReturnMemberFee: params.isReturnMemberFee,
|
|
|
+ isReturnMusicalFee: params.isReturnMusicalFee,
|
|
|
+ maintenanceFee: params.maintenanceFee,
|
|
|
+ memberFee: params.memberFee,
|
|
|
+ musicalFee: params.musicalFee,
|
|
|
+ };
|
|
|
+ if (this.isManage) {
|
|
|
+ params.status = "APPROVED";
|
|
|
} else {
|
|
|
- params.cloudTeacherAmount = 0;
|
|
|
+ params.status = "PROCESSING";
|
|
|
+ }
|
|
|
+ // 退还乐器练习云教练费用
|
|
|
+ if (
|
|
|
+ this.activeRow.memberFee <
|
|
|
+ parseFloat(params.returnFeeDto.memberFee)
|
|
|
+ ) {
|
|
|
+ this.$message.error("会员金额不能超过默认金额");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.activeRow.maintenanceFee <
|
|
|
+ parseFloat(params.returnFeeDto.maintenanceFee)
|
|
|
+ ) {
|
|
|
+ this.$message.error("乐保金额不能超过默认金额");
|
|
|
+ return;
|
|
|
}
|
|
|
// 发请求 退团
|
|
|
- StudentQuit(params).then((res) => {
|
|
|
- this.quitForm = {
|
|
|
- // 退团信息确认
|
|
|
- isRefundCourseFee: null,
|
|
|
- isRefundInstrumentFee: null,
|
|
|
- isRefundTeachingAssistantsFee: null,
|
|
|
- isMaintenanceFee: null,
|
|
|
- cloudTeacherAmount: null,
|
|
|
- isCloudTeacherAmount: null,
|
|
|
- isRefundMemberFee: null,
|
|
|
- maintenanceFee: 0,
|
|
|
- reason: "",
|
|
|
- };
|
|
|
+ applyMusicGroupQuit(params).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ this.quitForm = {
|
|
|
+ // 退团信息确认
|
|
|
+ isRefundCourseFee: null,
|
|
|
+ isRefundInstrumentFee: null,
|
|
|
+ isRefundTeachingAssistantsFee: null,
|
|
|
+ courseViewType: null,
|
|
|
+ hasMaintenance: null,
|
|
|
+ studentName: null,
|
|
|
+ musicGroupName: null,
|
|
|
+ isVisit: false,
|
|
|
+ reason: "",
|
|
|
+ userComment: null,
|
|
|
+ };
|
|
|
this.$message.success("退团成功");
|
|
|
this.getList();
|
|
|
this.quitVisible = false;
|
|
@@ -1688,50 +1732,68 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- quieTeamMask(row) {
|
|
|
- this.activeRow = row;
|
|
|
+ async quieTeamMask(row) {
|
|
|
this.activeRow.courseViewType = this.baseInfo.courseViewType;
|
|
|
+
|
|
|
this.quitVisible = true;
|
|
|
- this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
|
|
|
- },
|
|
|
- quieTeam(row) {
|
|
|
- this.$prompt("请输入退团原因", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- inputPattern: /\S/,
|
|
|
- inputErrorMessage: "请输入退团原因",
|
|
|
- })
|
|
|
- .then((val) => {
|
|
|
- // 发请求 退团
|
|
|
- StudentQuit({
|
|
|
- musicGroupId: this.teamid,
|
|
|
- userId: row.userId,
|
|
|
- reason: val.value,
|
|
|
- isRefundCourseFee: false,
|
|
|
- isRefundInstrumentFee: false,
|
|
|
- isRefundTeachingAssistantsFee: false,
|
|
|
- }).then((res) => {
|
|
|
- this.quitForm = {
|
|
|
- // 退团信息确认
|
|
|
- isRefundCourseFee: null,
|
|
|
- isRefundInstrumentFee: null,
|
|
|
- isRefundTeachingAssistantsFee: null,
|
|
|
- isMaintenanceFee: null,
|
|
|
- cloudTeacherAmount: null,
|
|
|
- isCloudTeacherAmount: null,
|
|
|
- maintenanceFee: 0,
|
|
|
- reason: "",
|
|
|
- };
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("退团成功");
|
|
|
- this.getList();
|
|
|
- this.quitVisible = false;
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+ try {
|
|
|
+ const res = await getRefundsDetail({
|
|
|
+ musicGroupId: this.$route.query.id,
|
|
|
+ userId: row.userId,
|
|
|
+ });
|
|
|
+ this.quitForm = {
|
|
|
+ ...this.quitForm,
|
|
|
+ ...res.data,
|
|
|
+ courseViewType: this.baseInfo.courseViewType,
|
|
|
+ studentName: row.realName,
|
|
|
+ musicGroupName: this.baseInfo.name,
|
|
|
+ hasMaintenance: row.hasMaintenance,
|
|
|
+ };
|
|
|
+ this.activeRow = {...row,...res.data};
|
|
|
+ this.quitVisible = true;
|
|
|
+ // this.quitForm.cloudTeacherAmount = row.cloudTeacherAmount;
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
},
|
|
|
+ // quieTeam(row) {
|
|
|
+ // this.$prompt("请输入退团原因", "提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // inputPattern: /\S/,
|
|
|
+ // inputErrorMessage: "请输入退团原因",
|
|
|
+ // })
|
|
|
+ // .then((val) => {
|
|
|
+ // // 发请求 退团
|
|
|
+ // StudentQuit({
|
|
|
+ // musicGroupId: this.teamid,
|
|
|
+ // userId: row.userId,
|
|
|
+ // reason: val.value,
|
|
|
+ // isRefundCourseFee: false,
|
|
|
+ // isRefundInstrumentFee: false,
|
|
|
+ // isRefundTeachingAssistantsFee: false,
|
|
|
+ // }).then((res) => {
|
|
|
+ // this.quitForm = {
|
|
|
+ // // 退团信息确认
|
|
|
+ // isRefundCourseFee: null,
|
|
|
+ // isRefundInstrumentFee: null,
|
|
|
+ // isRefundTeachingAssistantsFee: null,
|
|
|
+ // isMaintenanceFee: null,
|
|
|
+ // cloudTeacherAmount: null,
|
|
|
+ // isCloudTeacherAmount: null,
|
|
|
+ // maintenanceFee: 0,
|
|
|
+ // reason: "",
|
|
|
+ // };
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message.success("退团成功");
|
|
|
+ // this.getList();
|
|
|
+ // this.quitVisible = false;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(() => {});
|
|
|
+ // },
|
|
|
checkPhone(val) {
|
|
|
var regu = /^1[3456789]\d{9}$/;
|
|
|
var re = new RegExp(regu);
|
|
@@ -1821,7 +1883,6 @@ export default {
|
|
|
this.visitForm.purpose = val[1];
|
|
|
},
|
|
|
submitAddVisit() {
|
|
|
- console.log(this.$refs.visitForm);
|
|
|
this.$refs.visitForm.validate((res) => {
|
|
|
if (res) {
|
|
|
addVisit(cleanDeep(this.visitForm)).then((res) => {
|
|
@@ -1912,13 +1973,6 @@ export default {
|
|
|
this.getMusicClass();
|
|
|
}
|
|
|
},
|
|
|
- "quitForm.isMaintenanceFee"(val) {
|
|
|
- if (val) {
|
|
|
- this.quitForm.maintenanceFee = 300;
|
|
|
- } else {
|
|
|
- this.quitForm.maintenanceFee = 0;
|
|
|
- }
|
|
|
- },
|
|
|
quitVisible(val) {
|
|
|
if (!val) {
|
|
|
this.quitForm = {
|
|
@@ -1926,12 +1980,13 @@ export default {
|
|
|
isRefundCourseFee: null,
|
|
|
isRefundInstrumentFee: null,
|
|
|
isRefundTeachingAssistantsFee: null,
|
|
|
- isMaintenanceFee: null,
|
|
|
- cloudTeacherAmount: null,
|
|
|
- isCloudTeacherAmount: null,
|
|
|
- isRefundMemberFee: null,
|
|
|
- maintenanceFee: 0,
|
|
|
+ courseViewType: null,
|
|
|
+ hasMaintenance: null,
|
|
|
+ studentName: null,
|
|
|
+ musicGroupName: null,
|
|
|
+ isVisit: false,
|
|
|
reason: "",
|
|
|
+ userComment: null,
|
|
|
};
|
|
|
this.$refs["quitForm"].$refs["quitForm"].resetFields();
|
|
|
}
|
|
@@ -2125,6 +2180,6 @@ export default {
|
|
|
padding: 20px 0 20px 110px;
|
|
|
}
|
|
|
.red {
|
|
|
- color:red;
|
|
|
+ color: red;
|
|
|
}
|
|
|
</style>
|