|
@@ -21,19 +21,21 @@
|
|
|
v-if="active == 1"
|
|
|
ref="baseForm"
|
|
|
@resetPayInfo="resetPayInfo"
|
|
|
- @resetBaseChannel="resetBaseChannel"
|
|
|
+ @resetBaseChannel="resetBaseChannel"
|
|
|
:isDisabled="isDisabled"
|
|
|
:status="statuss"
|
|
|
/>
|
|
|
+
|
|
|
+
|
|
|
<payInfo
|
|
|
:payForm="payForm"
|
|
|
ref="payInfo"
|
|
|
:activeType="baseForm.activityType"
|
|
|
+ :activityChannel="baseForm.activityChannel"
|
|
|
@changeCourseType="changeCourseType"
|
|
|
@changeGiveCourseType="changeGiveCourseType"
|
|
|
@chageSalary="chageSalary"
|
|
|
@resetIsLimitNum="resetIsLimitNum"
|
|
|
-
|
|
|
v-if="active == 2"
|
|
|
:remberList="remberList"
|
|
|
:isDisabled="isDisabled || statuss != 'DRAFT'"
|
|
@@ -112,7 +114,6 @@ const payBaseForm = {
|
|
|
maxCourseNum: null,
|
|
|
memberRankId: null,
|
|
|
periodEnum: null,
|
|
|
-
|
|
|
discount: 100,
|
|
|
fullMinusCourseTimes: null,
|
|
|
giveCourseType: null,
|
|
@@ -122,7 +123,7 @@ const payBaseForm = {
|
|
|
giveCourseNum: null,
|
|
|
giveMemberRankId: null,
|
|
|
giveMemberTime: null,
|
|
|
- giveAllowOnlineToOffline:null
|
|
|
+ giveAllowOnlineToOffline: null,
|
|
|
};
|
|
|
const baseSalaryForm = {
|
|
|
vipOnlineSalarySettlement: {
|
|
@@ -171,7 +172,8 @@ export default {
|
|
|
studentMaxUsedTimes: "",
|
|
|
isPayToBalance: "",
|
|
|
marketPrice: "",
|
|
|
- aceicityChannel:null,
|
|
|
+ activityChannel: null,
|
|
|
+ originalPrice:null
|
|
|
},
|
|
|
title: "新建课程活动方案",
|
|
|
payForm: {
|
|
@@ -241,17 +243,30 @@ export default {
|
|
|
...payBaseForm,
|
|
|
};
|
|
|
},
|
|
|
- resetBaseChannel(){},
|
|
|
+ resetBaseChannel(val) {
|
|
|
+ this.$set(this.baseForm, "courseTime", []);
|
|
|
+ this.$set(this.baseForm, "activityType", null);
|
|
|
+ this.$set(this.baseForm, "applyToStudentType", []);
|
|
|
+ this.$set(this.baseForm, "studentMaxUsedTimes", null);
|
|
|
+ this.$set(this.baseForm, "isPayToBalance", null);
|
|
|
+ this.$set(this.baseForm, "marketPrice", 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);
|
|
|
+ }
|
|
|
+ },
|
|
|
changeCourseType(val) {
|
|
|
// this.$emit("changeCourseType", val);
|
|
|
if (val == "PRACTICE") {
|
|
|
this.$set(this.payForm, "vipGroupCategoryIdList", "");
|
|
|
this.$set(this.payForm, "teachMode", "");
|
|
|
this.$set(this.payForm, "singleCourseTime", 25);
|
|
|
- this.$set(this.payForm, "allowOnlineToOffline", []);
|
|
|
+ this.$set(this.payForm, "allowOnlineToOffline", '');
|
|
|
} else {
|
|
|
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, "teachMode", "");
|
|
|
}
|
|
@@ -276,7 +291,6 @@ export default {
|
|
|
this.$set(this.payForm, "givePeriod", null);
|
|
|
this.$set(this.payForm, "giveTeachMode", "");
|
|
|
this.$set(this.payForm, "giveAllowOnlineToOffline", "");
|
|
|
-
|
|
|
},
|
|
|
chageSalary() {
|
|
|
this.salaryForm = null;
|
|
@@ -331,6 +345,9 @@ export default {
|
|
|
// let vipGroupCategoryIdList =
|
|
|
// this.payForm.vipGroupCategoryIdList.join(",");
|
|
|
let vipGroupSalarySettlement = this.salaryForm;
|
|
|
+ if(this.baseForm.activityChannel == 1){
|
|
|
+ this.payForm.maxCourseNum = this.payForm.minCourseNum;
|
|
|
+ }
|
|
|
let obj = {
|
|
|
...this.baseForm,
|
|
|
...this.payForm,
|
|
@@ -432,8 +449,8 @@ export default {
|
|
|
studentMaxUsedTimes: data.studentMaxUsedTimes,
|
|
|
isPayToBalance: Number(data.payToBalance),
|
|
|
id: this.$route.query.id,
|
|
|
- activityChannel:data.activityChannel
|
|
|
-
|
|
|
+ activityChannel: data.activityChannel,
|
|
|
+ originalPrice:data.originalPrice
|
|
|
});
|
|
|
// this.baseForm = {
|
|
|
// name: data.name,
|
|
@@ -483,7 +500,7 @@ export default {
|
|
|
giveMemberRankId: data.giveMemberRankId,
|
|
|
givePeriod: data.givePeriodEnum,
|
|
|
giveMemberTime: data.giveMemberTime ? data.giveMemberTime : null,
|
|
|
- giveAllowOnlineToOffline:data.giveAllowOnlineToOffline+''
|
|
|
+ giveAllowOnlineToOffline: data.giveAllowOnlineToOffline + "",
|
|
|
};
|
|
|
// 格式化缴费金额
|
|
|
if (data.salarySettlementJson && data.salarySettlementJson != "null") {
|