|
|
@@ -68,14 +68,16 @@
|
|
|
<!-- 输入框 -->
|
|
|
<el-form-item :prop="`administrator.rulesRatioList.${ruleindex}.partnerRatioList.${index}.min`"
|
|
|
:rules="getRules(ruleindex, index, 'min', 'administrator')">
|
|
|
- <el-input-number v-model="item.min" size="small" controls-position="right" :min="1" :max="index?100000000:10000" :precision="index?2:0"
|
|
|
+ <el-input-number v-model="item.min" size="small" controls-position="right" :min="1"
|
|
|
+ :max="index ? 100000000 : 10000" :precision="index ? 2 : 0"
|
|
|
style="margin: 0 5px;width: 200px;"></el-input-number>
|
|
|
<span>{{ index ? '元' : '人' }}</span>
|
|
|
</el-form-item>
|
|
|
<span style="margin: 0 5px;">至</span>
|
|
|
<el-form-item :prop="`administrator.rulesRatioList.${ruleindex}.partnerRatioList.${index}.max`"
|
|
|
:rules="getRules(ruleindex, index, 'max', 'administrator')">
|
|
|
- <el-input-number v-model="item.max" size="small" controls-position="right" :min="item.min" :max="index?100000000:10000" :precision="index?2:0"
|
|
|
+ <el-input-number v-model="item.max" size="small" controls-position="right" :min="item.min"
|
|
|
+ :max="index ? 100000000 : 10000" :precision="index ? 2 : 0"
|
|
|
style="margin: 0 5px;width: 200px;"></el-input-number>
|
|
|
<span>{{ index ? '元' : '人' }}</span>
|
|
|
</el-form-item>
|
|
|
@@ -162,14 +164,16 @@
|
|
|
<!-- 输入框 -->
|
|
|
<el-form-item :prop="`partner.rulesRatioList.${ruleindex}.partnerRatioList.${index}.min`"
|
|
|
:rules="getRules(ruleindex, index, 'min', 'partner')">
|
|
|
- <el-input-number v-model="item.min" size="small" controls-position="right" :min="1" :max="index?100000000:10000" :precision="index?2:0"
|
|
|
+ <el-input-number v-model="item.min" size="small" controls-position="right" :min="1"
|
|
|
+ :max="index ? 100000000 : 10000" :precision="index ? 2 : 0"
|
|
|
style="margin: 0 5px;width: 200px;"></el-input-number>
|
|
|
<span>{{ index ? '元' : '人' }}</span>
|
|
|
</el-form-item>
|
|
|
<span style="margin: 0 5px;">至</span>
|
|
|
<el-form-item :prop="`partner.rulesRatioList.${ruleindex}.partnerRatioList.${index}.max`"
|
|
|
:rules="getRules(ruleindex, index, 'max', 'partner')">
|
|
|
- <el-input-number v-model="item.max" size="small" controls-position="right" :min="item.min" :max="index?100000000:10000" :precision="index?2:0"
|
|
|
+ <el-input-number v-model="item.max" size="small" controls-position="right" :min="item.min"
|
|
|
+ :max="index ? 100000000 : 10000" :precision="index ? 2 : 0"
|
|
|
style="margin: 0 5px;width: 200px;"></el-input-number>
|
|
|
<span>{{ index ? '元' : '人' }}</span>
|
|
|
</el-form-item>
|
|
|
@@ -335,33 +339,33 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rulesAdd(Name) {
|
|
|
- const info=this.from[Name].rulesRatioList[this.from[Name].rulesRatioList.length-1]
|
|
|
- console.log(this.from[Name].rulesRatioList[this.from[Name].rulesRatioList.length-1])
|
|
|
- if(info.partnerRatioList[0].max && info.partnerRatioList[1].max){
|
|
|
+ const info = this.from[Name].rulesRatioList[this.from[Name].rulesRatioList.length - 1]
|
|
|
+ console.log(this.from[Name].rulesRatioList[this.from[Name].rulesRatioList.length - 1])
|
|
|
+ if (info.partnerRatioList[0].max && info.partnerRatioList[1].max) {
|
|
|
this.from[Name].rulesRatioList.push({
|
|
|
- allSatisfied: "",
|
|
|
- kickback: "",
|
|
|
- partnerRatioList: [
|
|
|
- {
|
|
|
- bf: false,
|
|
|
- ry: false,
|
|
|
- max: "",
|
|
|
- min: info.partnerRatioList[0].max+1,
|
|
|
- },
|
|
|
- {
|
|
|
- bf: false,
|
|
|
- ry: false,
|
|
|
- max: "",
|
|
|
- min: info.partnerRatioList[1].max+1,
|
|
|
+ allSatisfied: "",
|
|
|
+ kickback: "",
|
|
|
+ partnerRatioList: [
|
|
|
+ {
|
|
|
+ bf: false,
|
|
|
+ ry: false,
|
|
|
+ max: "",
|
|
|
+ min: info.partnerRatioList[0].max + 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ bf: false,
|
|
|
+ ry: false,
|
|
|
+ max: "",
|
|
|
+ min: info.partnerRatioList[1].max + 1,
|
|
|
|
|
|
- }
|
|
|
- ]
|
|
|
- })
|
|
|
- }else{
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ } else {
|
|
|
this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '请先将最大值补充完整',
|
|
|
- });
|
|
|
+ type: 'error',
|
|
|
+ message: '请先将最大值补充完整',
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -371,24 +375,21 @@ export default {
|
|
|
save() {
|
|
|
this.$refs.formRef.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- console.log(this.from)
|
|
|
- console.log('校验通过');
|
|
|
- } else {
|
|
|
- console.log('校验失败');
|
|
|
- }
|
|
|
- });
|
|
|
- return;
|
|
|
- this.$api.retail.commissionsave(this.from).then((res) => {
|
|
|
- if (res.code == '200') {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.msg,
|
|
|
+ this.$api.retail.commissionsave(this.from).then((res) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: res.msg,
|
|
|
- });
|
|
|
+ console.log('校验失败');
|
|
|
}
|
|
|
});
|
|
|
}
|