|
@@ -343,14 +343,14 @@
|
|
|
pattern: /^[1-9][0-9]*$/,
|
|
|
message: '请输入大于0的正整数',
|
|
|
},
|
|
|
- { validator: validateMonth, trigger: 'blur' },
|
|
|
+ { validator: validateMonthIncome, trigger: 'blur' },
|
|
|
]"
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.incomeMonthFee"
|
|
|
:disabled="addDisabled"
|
|
|
- :placeholder="monthRule"
|
|
|
+ :placeholder="monthRuleIncome"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
@@ -433,14 +433,14 @@
|
|
|
pattern: /^[1-9][0-9]*$/,
|
|
|
message: '请输入大于0的正整数',
|
|
|
},
|
|
|
- { validator: validateQuarterly, trigger: 'blur' },
|
|
|
+ { validator: validateQuarterlyIncome, trigger: 'blur' },
|
|
|
]"
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.incomeQuarterlyFee"
|
|
|
:disabled="addDisabled"
|
|
|
- :placeholder="quarterlyRule"
|
|
|
+ :placeholder="quarterlyRuleIncome"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
@@ -522,14 +522,14 @@
|
|
|
pattern: /^[1-9][0-9]*$/,
|
|
|
message: '请输入大于0的正整数',
|
|
|
},
|
|
|
- { validator: validateHalfYear, trigger: 'blur' },
|
|
|
+ { validator: validateHalfYearIncome, trigger: 'blur' },
|
|
|
]"
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.incomeHalfYearFee"
|
|
|
:disabled="addDisabled"
|
|
|
- :placeholder="halfYearRule"
|
|
|
+ :placeholder="halfYearRuleIncome"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
@@ -611,14 +611,14 @@
|
|
|
pattern: /^[1-9][0-9]*$/,
|
|
|
message: '请输入大于0的正整数',
|
|
|
},
|
|
|
- { validator: validateYear, trigger: 'blur' },
|
|
|
+ { validator: validateYearIncome, trigger: 'blur' },
|
|
|
]"
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
<el-input
|
|
|
v-model="form.incomeYearFee"
|
|
|
:disabled="addDisabled"
|
|
|
- :placeholder="yearRule"
|
|
|
+ :placeholder="yearRuleIncome"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
@@ -851,6 +851,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ validateMonthIncome(rule, value, callback){
|
|
|
+ const one = Number(value);
|
|
|
+ const min = Number(this.rulesForm.minMonthFee);
|
|
|
+ const max = this.form.groupPurchaseMonthFee ? Number(this.form.groupPurchaseMonthFee) : Number(this.rulesForm.maxMonthFee)
|
|
|
+ if (one >= min && one <= max) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ return callback(new Error(`月度经营报表应在${min}-${max}之间`));
|
|
|
+ },
|
|
|
validateMonth(rule, value, callback) {
|
|
|
const one = Number(value);
|
|
|
const min = Number(this.rulesForm.minMonthFee);
|
|
@@ -860,6 +869,15 @@ export default {
|
|
|
}
|
|
|
return callback(new Error(`月度云教练定价应在${min}-${max}之间`));
|
|
|
},
|
|
|
+ validateQuarterlyIncome(rule, value, callback) {
|
|
|
+ const one = Number(value);
|
|
|
+ const min = Number(this.rulesForm.minQuarterlyFee);
|
|
|
+ const max = this.form.groupPurchaseQuarterlyFee ? Number(this.form.groupPurchaseQuarterlyFee) : Number(this.rulesForm.maxQuarterlyFee);
|
|
|
+ if (one >= min && one <= max) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ return callback(new Error(`季度经营报表应在${min}-${max}之间`));
|
|
|
+ },
|
|
|
validateQuarterly(rule, value, callback) {
|
|
|
const one = Number(value);
|
|
|
const min = Number(this.rulesForm.minQuarterlyFee);
|
|
@@ -869,6 +887,15 @@ export default {
|
|
|
}
|
|
|
return callback(new Error(`季度云教练定价应在${min}-${max}之间`));
|
|
|
},
|
|
|
+ validateHalfYearIncome(rule, value, callback) {
|
|
|
+ const one = Number(value);
|
|
|
+ const min = Number(this.rulesForm.minHalfYearFee);
|
|
|
+ const max = this.form.groupPurchaseHalfYearFee ? Number(this.form.groupPurchaseHalfYearFee) : Number(this.rulesForm.maxHalfYearFee);
|
|
|
+ if (one >= min && one <= max) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ return callback(new Error(`半年经营报表应在${min}-${max}之间`));
|
|
|
+ },
|
|
|
validateHalfYear(rule, value, callback) {
|
|
|
const one = Number(value);
|
|
|
const min = Number(this.rulesForm.minHalfYearFee);
|
|
@@ -878,6 +905,15 @@ export default {
|
|
|
}
|
|
|
return callback(new Error(`半年云教练定价应在${min}-${max}之间`));
|
|
|
},
|
|
|
+ validateYearIncome(rule, value, callback) {
|
|
|
+ const one = Number(value);
|
|
|
+ const min = Number(this.rulesForm.minYearFee);
|
|
|
+ const max = this.form.groupPurchaseYearFee ? Number(this.form.groupPurchaseYearFee) : Number(this.rulesForm.maxYearFee);
|
|
|
+ if (one >= min && one <= max) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ return callback(new Error(`年度经营报表应在${min}-${max}之间`));
|
|
|
+ },
|
|
|
validateYear(rule, value, callback) {
|
|
|
const one = Number(value);
|
|
|
const min = Number(this.rulesForm.minYearFee);
|
|
@@ -896,15 +932,27 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
+ monthRuleIncome() {
|
|
|
+ return `${this.rulesForm.minMonthFee}-${this.form.groupPurchaseMonthFee ? this.form.groupPurchaseMonthFee : this.rulesForm.maxMonthFee}`;
|
|
|
+ },
|
|
|
monthRule() {
|
|
|
return `${this.rulesForm.minMonthFee}-${this.rulesForm.maxMonthFee}`;
|
|
|
},
|
|
|
+ quarterlyRuleIncome() {
|
|
|
+ return `${this.rulesForm.minQuarterlyFee}-${this.form.groupPurchaseQuarterlyFee ? this.form.groupPurchaseQuarterlyFee : this.rulesForm.maxQuarterlyFee}`;
|
|
|
+ },
|
|
|
quarterlyRule() {
|
|
|
return `${this.rulesForm.minQuarterlyFee}-${this.rulesForm.maxQuarterlyFee}`;
|
|
|
},
|
|
|
+ halfYearRuleIncome() {
|
|
|
+ return `${this.rulesForm.minHalfYearFee}-${this.form.groupPurchaseHalfYearFee ? this.form.groupPurchaseHalfYearFee : this.rulesForm.maxHalfYearFee}`;
|
|
|
+ },
|
|
|
halfYearRule() {
|
|
|
return `${this.rulesForm.minHalfYearFee}-${this.rulesForm.maxHalfYearFee}`;
|
|
|
},
|
|
|
+ yearRuleIncome() {
|
|
|
+ return `${this.rulesForm.minYearFee}-${this.form.groupPurchaseYearFee ? this.form.groupPurchaseYearFee : this.rulesForm.maxYearFee}`;
|
|
|
+ },
|
|
|
yearRule() {
|
|
|
return `${this.rulesForm.minYearFee}-${this.rulesForm.maxYearFee}`;
|
|
|
},
|