|
@@ -36,6 +36,7 @@
|
|
:isDisabled="isDisabled || statuss != 'DRAFT'"
|
|
:isDisabled="isDisabled || statuss != 'DRAFT'"
|
|
/>
|
|
/>
|
|
<salaryInfo
|
|
<salaryInfo
|
|
|
|
+ ref="salaryInfo"
|
|
:salaryForm="salaryForm"
|
|
:salaryForm="salaryForm"
|
|
v-if="active == 3"
|
|
v-if="active == 3"
|
|
:activeType="baseForm.activityType"
|
|
:activeType="baseForm.activityType"
|
|
@@ -98,7 +99,7 @@ import {
|
|
import cleanDeep from "clean-deep";
|
|
import cleanDeep from "clean-deep";
|
|
const payBaseForm = {
|
|
const payBaseForm = {
|
|
courseType: "",
|
|
courseType: "",
|
|
- vipGroupCategoryIdList: '',
|
|
|
|
|
|
+ vipGroupCategoryIdList: "",
|
|
applyToStudentType: [],
|
|
applyToStudentType: [],
|
|
teachMode: null,
|
|
teachMode: null,
|
|
allowOnlineToOffline: "",
|
|
allowOnlineToOffline: "",
|
|
@@ -185,9 +186,9 @@ export default {
|
|
this.baseForm.id = this.$route.query.id;
|
|
this.baseForm.id = this.$route.query.id;
|
|
const rusult = await getVipGroupActivity({ id: this.$route.query.id });
|
|
const rusult = await getVipGroupActivity({ id: this.$route.query.id });
|
|
this.formatDetail(rusult.data);
|
|
this.formatDetail(rusult.data);
|
|
- }else{
|
|
|
|
- this.payInfo = {...payBaseForm}
|
|
|
|
- this.salaryForm = {...baseSalaryForm}
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.payInfo = { ...payBaseForm };
|
|
|
|
+ this.salaryForm = { ...baseSalaryForm };
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -237,14 +238,14 @@ export default {
|
|
changeCourseType(val) {
|
|
changeCourseType(val) {
|
|
// this.$emit("changeCourseType", val);
|
|
// this.$emit("changeCourseType", val);
|
|
if (val == "PRACTICE") {
|
|
if (val == "PRACTICE") {
|
|
- this.$set(this.payForm, "vipGroupCategoryIdList", '');
|
|
|
|
|
|
+ this.$set(this.payForm, "vipGroupCategoryIdList", "");
|
|
this.$set(this.payForm, "teachMode", "");
|
|
this.$set(this.payForm, "teachMode", "");
|
|
this.$set(this.payForm, "singleCourseTime", 25);
|
|
this.$set(this.payForm, "singleCourseTime", 25);
|
|
this.$set(this.payForm, "allowOnlineToOffline", []);
|
|
this.$set(this.payForm, "allowOnlineToOffline", []);
|
|
} else {
|
|
} else {
|
|
this.$set(this.payForm, "singleCourseTime", 45);
|
|
this.$set(this.payForm, "singleCourseTime", 45);
|
|
this.$set(this.payForm, "allowOnlineToOffline", []);
|
|
this.$set(this.payForm, "allowOnlineToOffline", []);
|
|
- this.$set(this.payForm, "vipGroupCategoryIdList", '');
|
|
|
|
|
|
+ this.$set(this.payForm, "vipGroupCategoryIdList", "");
|
|
this.$set(this.payForm, "teachMode", "");
|
|
this.$set(this.payForm, "teachMode", "");
|
|
}
|
|
}
|
|
// vip
|
|
// vip
|
|
@@ -272,9 +273,13 @@ export default {
|
|
this.salaryForm = { ...baseSalaryForm };
|
|
this.salaryForm = { ...baseSalaryForm };
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
- submit() {
|
|
|
|
- this.baseForm.status = "PROGRESS";
|
|
|
|
- this.submitDataFormat("PROGRESS");
|
|
|
|
|
|
+ async submit() {
|
|
|
|
+ this.$refs.salaryInfo.$refs.salaryForm.validate((flag) => {
|
|
|
|
+ if (flag) {
|
|
|
|
+ this.baseForm.status = "PROGRESS";
|
|
|
|
+ this.submitDataFormat("PROGRESS");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
save() {
|
|
save() {
|
|
this.baseForm.status = "DRAFT";
|
|
this.baseForm.status = "DRAFT";
|
|
@@ -294,7 +299,9 @@ export default {
|
|
endTime = this.baseForm.activeTime[1];
|
|
endTime = this.baseForm.activeTime[1];
|
|
}
|
|
}
|
|
let organId = this.baseForm.organ.join(",");
|
|
let organId = this.baseForm.organ.join(",");
|
|
- this.baseForm.studentMaxUsedTimes?this.baseForm.studentMaxUsedTimes:this.baseForm.studentMaxUsedTimes=-1
|
|
|
|
|
|
+ this.baseForm.studentMaxUsedTimes
|
|
|
|
+ ? this.baseForm.studentMaxUsedTimes
|
|
|
|
+ : (this.baseForm.studentMaxUsedTimes = -1);
|
|
for (let item in this.salaryForm) {
|
|
for (let item in this.salaryForm) {
|
|
if (this.salaryForm[item].salarySettlementType == "TEACHER_DEFAULT") {
|
|
if (this.salaryForm[item].salarySettlementType == "TEACHER_DEFAULT") {
|
|
this.salaryForm[item].settlementValue = null;
|
|
this.salaryForm[item].settlementValue = null;
|
|
@@ -326,7 +333,7 @@ export default {
|
|
id: res.data.id,
|
|
id: res.data.id,
|
|
}),
|
|
}),
|
|
});
|
|
});
|
|
- this.formatDetail(res.data)
|
|
|
|
|
|
+ this.formatDetail(res.data);
|
|
} else {
|
|
} else {
|
|
localStorage.removeItem("newVip");
|
|
localStorage.removeItem("newVip");
|
|
localStorage.removeItem(`newPractice`);
|
|
localStorage.removeItem(`newPractice`);
|
|
@@ -411,11 +418,11 @@ export default {
|
|
// }),)
|
|
// }),)
|
|
this.payForm = {
|
|
this.payForm = {
|
|
courseType: data.courseType,
|
|
courseType: data.courseType,
|
|
- vipGroupCategoryIdList: data.vipGroupCategoryIdList?data.vipGroupCategoryIdList
|
|
|
|
- .split(",")
|
|
|
|
- .map((id) => {
|
|
|
|
- return Number(id);
|
|
|
|
- })[0]:null,
|
|
|
|
|
|
+ vipGroupCategoryIdList: data.vipGroupCategoryIdList
|
|
|
|
+ ? data.vipGroupCategoryIdList.split(",").map((id) => {
|
|
|
|
+ return Number(id);
|
|
|
|
+ })[0]
|
|
|
|
+ : null,
|
|
teachMode: data.teachMode + "",
|
|
teachMode: data.teachMode + "",
|
|
allowOnlineToOffline: data.allowOnlineToOffline + "",
|
|
allowOnlineToOffline: data.allowOnlineToOffline + "",
|
|
singleCourseTime: data.singleCourseTime,
|
|
singleCourseTime: data.singleCourseTime,
|
|
@@ -434,6 +441,7 @@ export default {
|
|
giveCourseNum: data.giveCourseNum,
|
|
giveCourseNum: data.giveCourseNum,
|
|
giveMemberRankId: data.giveMemberRankId,
|
|
giveMemberRankId: data.giveMemberRankId,
|
|
givePeriod: data.givePeriodEnum,
|
|
givePeriod: data.givePeriodEnum,
|
|
|
|
+ giveMemberTime: data.giveMemberTime ? data.giveMemberTime : null,
|
|
};
|
|
};
|
|
// 格式化缴费金额
|
|
// 格式化缴费金额
|
|
if (data.salarySettlementJson && data.salarySettlementJson != "null") {
|
|
if (data.salarySettlementJson && data.salarySettlementJson != "null") {
|