|
@@ -27,7 +27,6 @@
|
|
:status="statuss"
|
|
:status="statuss"
|
|
/>
|
|
/>
|
|
|
|
|
|
-
|
|
|
|
<payInfo
|
|
<payInfo
|
|
:payForm="payForm"
|
|
:payForm="payForm"
|
|
ref="payInfo"
|
|
ref="payInfo"
|
|
@@ -101,7 +100,7 @@ import {
|
|
vipGroupCategory,
|
|
vipGroupCategory,
|
|
addVipActive,
|
|
addVipActive,
|
|
resetVipActive,
|
|
resetVipActive,
|
|
- getVipGroupActivity,
|
|
|
|
|
|
+ getVipGroupActivity
|
|
} from "@/api/vipSeting";
|
|
} from "@/api/vipSeting";
|
|
import cleanDeep from "clean-deep";
|
|
import cleanDeep from "clean-deep";
|
|
const payBaseForm = {
|
|
const payBaseForm = {
|
|
@@ -125,39 +124,39 @@ const payBaseForm = {
|
|
giveCourseNum: null,
|
|
giveCourseNum: null,
|
|
giveMemberRankId: null,
|
|
giveMemberRankId: null,
|
|
giveMemberTime: null,
|
|
giveMemberTime: null,
|
|
- giveAllowOnlineToOffline: null,
|
|
|
|
|
|
+ giveAllowOnlineToOffline: null
|
|
};
|
|
};
|
|
const baseSalaryForm = {
|
|
const baseSalaryForm = {
|
|
vipOnlineSalarySettlement: {
|
|
vipOnlineSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
|
|
+ settlementValue: null
|
|
},
|
|
},
|
|
offlineSalarySettlement: {
|
|
offlineSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
|
|
+ settlementValue: null
|
|
},
|
|
},
|
|
giveVipOnlineSalarySettlement: {
|
|
giveVipOnlineSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
|
|
+ settlementValue: null
|
|
},
|
|
},
|
|
giveVipOfflineSalarySettlement: {
|
|
giveVipOfflineSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
|
|
+ settlementValue: null
|
|
},
|
|
},
|
|
practiceSalarySettlement: {
|
|
practiceSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
|
|
+ settlementValue: null
|
|
},
|
|
},
|
|
givePracticeSalarySettlement: {
|
|
givePracticeSalarySettlement: {
|
|
salarySettlementType: null,
|
|
salarySettlementType: null,
|
|
- settlementValue: null,
|
|
|
|
- },
|
|
|
|
|
|
+ settlementValue: null
|
|
|
|
+ }
|
|
};
|
|
};
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
baseInfo,
|
|
baseInfo,
|
|
payInfo,
|
|
payInfo,
|
|
- salaryInfo,
|
|
|
|
|
|
+ salaryInfo
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -175,16 +174,16 @@ export default {
|
|
isPayToBalance: "",
|
|
isPayToBalance: "",
|
|
marketPrice: "",
|
|
marketPrice: "",
|
|
activityChannel: null,
|
|
activityChannel: null,
|
|
- originalPrice:null
|
|
|
|
|
|
+ originalPrice: null
|
|
},
|
|
},
|
|
title: "新建课程活动方案",
|
|
title: "新建课程活动方案",
|
|
payForm: {
|
|
payForm: {
|
|
- ...payBaseForm,
|
|
|
|
|
|
+ ...payBaseForm
|
|
},
|
|
},
|
|
salaryForm: {
|
|
salaryForm: {
|
|
- ...baseSalaryForm,
|
|
|
|
|
|
+ ...baseSalaryForm
|
|
},
|
|
},
|
|
- remberList: [],
|
|
|
|
|
|
+ remberList: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -197,7 +196,7 @@ 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);
|
|
- this.$router
|
|
|
|
|
|
+ this.$router;
|
|
} else {
|
|
} else {
|
|
this.payInfo = { ...payBaseForm };
|
|
this.payInfo = { ...payBaseForm };
|
|
this.salaryForm = JSON.parse(JSON.stringify({ ...baseSalaryForm }));
|
|
this.salaryForm = JSON.parse(JSON.stringify({ ...baseSalaryForm }));
|
|
@@ -212,20 +211,20 @@ export default {
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/vipActiveManager/vipActiveList",
|
|
path: "/vipActiveManager/vipActiveList",
|
|
- query: { rules: this.rules, searchForm: this.searchForm },
|
|
|
|
|
|
+ query: { rules: this.rules, searchForm: this.searchForm }
|
|
});
|
|
});
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
next() {
|
|
next() {
|
|
let flags = true;
|
|
let flags = true;
|
|
if (this.active == 1) {
|
|
if (this.active == 1) {
|
|
- this.$refs.baseForm.$refs.vipform.validate((flag) => {
|
|
|
|
|
|
+ this.$refs.baseForm.$refs.vipform.validate(flag => {
|
|
flags = flag;
|
|
flags = flag;
|
|
});
|
|
});
|
|
// 验证表单1
|
|
// 验证表单1
|
|
} else if (this.active == 2) {
|
|
} else if (this.active == 2) {
|
|
// 验证表单2
|
|
// 验证表单2
|
|
- this.$refs.payInfo.$refs.form.validate((flag) => {
|
|
|
|
|
|
+ this.$refs.payInfo.$refs.form.validate(flag => {
|
|
flags = flag;
|
|
flags = flag;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -243,7 +242,7 @@ export default {
|
|
},
|
|
},
|
|
resetPayInfo() {
|
|
resetPayInfo() {
|
|
this.payForm = {
|
|
this.payForm = {
|
|
- ...payBaseForm,
|
|
|
|
|
|
+ ...payBaseForm
|
|
};
|
|
};
|
|
},
|
|
},
|
|
resetBaseChannel(val) {
|
|
resetBaseChannel(val) {
|
|
@@ -254,10 +253,10 @@ export default {
|
|
this.$set(this.baseForm, "isPayToBalance", null);
|
|
this.$set(this.baseForm, "isPayToBalance", null);
|
|
this.$set(this.baseForm, "marketPrice", null);
|
|
this.$set(this.baseForm, "marketPrice", null);
|
|
this.$set(this.baseForm, "originalPrice", null);
|
|
this.$set(this.baseForm, "originalPrice", null);
|
|
- if(val == 1){
|
|
|
|
- this.$set(this.baseForm, "activityType", 0);
|
|
|
|
- this.$set(this.payForm, "allowOnlineToOffline",1);
|
|
|
|
- this.$set(this.payForm, "teachMode", -1);
|
|
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ this.$set(this.baseForm, "activityType", 0);
|
|
|
|
+ this.$set(this.payForm, "allowOnlineToOffline", 1);
|
|
|
|
+ this.$set(this.payForm, "teachMode", -1);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
changeCourseType(val) {
|
|
changeCourseType(val) {
|
|
@@ -266,10 +265,10 @@ export default {
|
|
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", "");
|
|
}
|
|
}
|
|
@@ -307,7 +306,7 @@ export default {
|
|
},
|
|
},
|
|
async submit() {
|
|
async submit() {
|
|
if (this.$refs?.salaryInfo?.$refs?.salaryForm) {
|
|
if (this.$refs?.salaryInfo?.$refs?.salaryForm) {
|
|
- this.$refs.salaryInfo.$refs.salaryForm.validate((flag) => {
|
|
|
|
|
|
+ this.$refs.salaryInfo.$refs.salaryForm.validate(flag => {
|
|
if (flag) {
|
|
if (flag) {
|
|
this.baseForm.status = "PROGRESS";
|
|
this.baseForm.status = "PROGRESS";
|
|
this.submitDataFormat("PROGRESS");
|
|
this.submitDataFormat("PROGRESS");
|
|
@@ -348,7 +347,7 @@ export default {
|
|
// let vipGroupCategoryIdList =
|
|
// let vipGroupCategoryIdList =
|
|
// this.payForm.vipGroupCategoryIdList.join(",");
|
|
// this.payForm.vipGroupCategoryIdList.join(",");
|
|
let vipGroupSalarySettlement = this.salaryForm;
|
|
let vipGroupSalarySettlement = this.salaryForm;
|
|
- if(this.baseForm.activityChannel == 1){
|
|
|
|
|
|
+ if (this.baseForm.activityChannel == 1) {
|
|
this.payForm.maxCourseNum = this.payForm.minCourseNum;
|
|
this.payForm.maxCourseNum = this.payForm.minCourseNum;
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
@@ -360,18 +359,18 @@ export default {
|
|
startTime,
|
|
startTime,
|
|
endTime,
|
|
endTime,
|
|
applyToStudentType,
|
|
applyToStudentType,
|
|
- vipGroupSalarySettlement,
|
|
|
|
|
|
+ vipGroupSalarySettlement
|
|
};
|
|
};
|
|
if (this.baseForm.id) {
|
|
if (this.baseForm.id) {
|
|
- resetVipActive(cleanDeep(obj)).then((res) => {
|
|
|
|
|
|
+ resetVipActive(cleanDeep(obj)).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
if (status == "DRAFT") {
|
|
if (status == "DRAFT") {
|
|
this.$message.success("恭喜你,保存草稿成功");
|
|
this.$message.success("恭喜你,保存草稿成功");
|
|
this.baseForm.id = res.data.id;
|
|
this.baseForm.id = res.data.id;
|
|
this.$router.push({
|
|
this.$router.push({
|
|
query: merge(this.$route.query, {
|
|
query: merge(this.$route.query, {
|
|
- id: res.data.id,
|
|
|
|
- }),
|
|
|
|
|
|
+ id: res.data.id
|
|
|
|
+ })
|
|
});
|
|
});
|
|
this.formatDetail(res.data);
|
|
this.formatDetail(res.data);
|
|
} else {
|
|
} else {
|
|
@@ -380,7 +379,7 @@ export default {
|
|
this.$message.success("活动修改成功");
|
|
this.$message.success("活动修改成功");
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: "/vipActiveManager/vipActiveList",
|
|
|
|
|
|
+ path: "/vipActiveManager/vipActiveList"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -392,7 +391,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addVipActive(cleanDeep(obj)).then((res) => {
|
|
|
|
|
|
+ addVipActive(cleanDeep(obj)).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
if (status == "DRAFT") {
|
|
if (status == "DRAFT") {
|
|
this.$message.success("恭喜你,保存草稿成功");
|
|
this.$message.success("恭喜你,保存草稿成功");
|
|
@@ -402,14 +401,14 @@ export default {
|
|
});
|
|
});
|
|
this.$router.push({
|
|
this.$router.push({
|
|
query: merge(this.$route.query, {
|
|
query: merge(this.$route.query, {
|
|
- id: res.data.id,
|
|
|
|
- }),
|
|
|
|
|
|
+ id: res.data.id
|
|
|
|
+ })
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.$message.success("活动创建成功");
|
|
this.$message.success("活动创建成功");
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: "/vipActiveManager/vipActiveList",
|
|
|
|
|
|
+ path: "/vipActiveManager/vipActiveList"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -444,7 +443,7 @@ export default {
|
|
activeTime,
|
|
activeTime,
|
|
courseTime,
|
|
courseTime,
|
|
marketPrice: data.marketPrice,
|
|
marketPrice: data.marketPrice,
|
|
- organ: data.organId.split(",").map((organ) => {
|
|
|
|
|
|
+ organ: data.organId.split(",").map(organ => {
|
|
return Number(organ);
|
|
return Number(organ);
|
|
}),
|
|
}),
|
|
activityType: data.activityType,
|
|
activityType: data.activityType,
|
|
@@ -453,7 +452,7 @@ export default {
|
|
isPayToBalance: Number(data.payToBalance),
|
|
isPayToBalance: Number(data.payToBalance),
|
|
id: this.$route.query.id,
|
|
id: this.$route.query.id,
|
|
activityChannel: data.activityChannel,
|
|
activityChannel: data.activityChannel,
|
|
- originalPrice:data.originalPrice
|
|
|
|
|
|
+ originalPrice: data.originalPrice
|
|
});
|
|
});
|
|
// this.baseForm = {
|
|
// this.baseForm = {
|
|
// name: data.name,
|
|
// name: data.name,
|
|
@@ -480,7 +479,7 @@ export default {
|
|
this.payForm = {
|
|
this.payForm = {
|
|
courseType: data.courseType,
|
|
courseType: data.courseType,
|
|
vipGroupCategoryIdList: data.vipGroupCategoryIdList
|
|
vipGroupCategoryIdList: data.vipGroupCategoryIdList
|
|
- ? data.vipGroupCategoryIdList.split(",").map((id) => {
|
|
|
|
|
|
+ ? data.vipGroupCategoryIdList.split(",").map(id => {
|
|
return Number(id);
|
|
return Number(id);
|
|
})[0]
|
|
})[0]
|
|
: null,
|
|
: null,
|
|
@@ -503,7 +502,7 @@ export default {
|
|
giveMemberRankId: data.giveMemberRankId,
|
|
giveMemberRankId: data.giveMemberRankId,
|
|
givePeriod: data.givePeriodEnum,
|
|
givePeriod: data.givePeriodEnum,
|
|
giveMemberTime: data.giveMemberTime ? data.giveMemberTime : null,
|
|
giveMemberTime: data.giveMemberTime ? data.giveMemberTime : null,
|
|
- giveAllowOnlineToOffline: data.giveAllowOnlineToOffline + "",
|
|
|
|
|
|
+ giveAllowOnlineToOffline: data.giveAllowOnlineToOffline + ""
|
|
};
|
|
};
|
|
// 格式化缴费金额
|
|
// 格式化缴费金额
|
|
if (data.salarySettlementJson && data.salarySettlementJson != "null") {
|
|
if (data.salarySettlementJson && data.salarySettlementJson != "null") {
|
|
@@ -517,7 +516,7 @@ export default {
|
|
this.salaryForm = JSON.parse(JSON.stringify({ ...baseSalaryForm }));
|
|
this.salaryForm = JSON.parse(JSON.stringify({ ...baseSalaryForm }));
|
|
}
|
|
}
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
isDisabled() {
|
|
isDisabled() {
|
|
@@ -529,8 +528,8 @@ export default {
|
|
},
|
|
},
|
|
statuss() {
|
|
statuss() {
|
|
return this.status;
|
|
return this.status;
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -542,5 +541,3 @@ export default {
|
|
border-color: var(--color-primary) !important;
|
|
border-color: var(--color-primary) !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-
|
|
|
|
-
|
|
|