|
@@ -33,14 +33,16 @@
|
|
|
<el-form-item label="直接团长规则" prop="leadersMoney">
|
|
|
<el-input v-model="formData.leadersMoney" placeholder="请输入直接团长规则" style="width: 150px;">
|
|
|
<template #append>
|
|
|
- <div v-if="formData.leadersRule === 1">:1</div>
|
|
|
+ <div v-if="formData.leadersRule === 1">%</div>
|
|
|
+ <div v-else-if="formData.leadersRule === 2">元</div>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="间接团长规则" prop="leadersInMoney">
|
|
|
<el-input v-model="formData.leadersInMoney" placeholder="请输入间接团长规则" style="width: 150px;">
|
|
|
<template #append>
|
|
|
- <div v-if="formData.leadersRule === 1">:1</div>
|
|
|
+ <div v-if="formData.leadersRule === 1">%</div>
|
|
|
+ <div v-else-if="formData.leadersRule === 2">元</div>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -53,14 +55,16 @@
|
|
|
<el-form-item label="直接合伙人规则" prop="partnerMoney">
|
|
|
<el-input v-model="formData.partnerMoney" placeholder="请输入直接合伙人规则" style="width: 150px;">
|
|
|
<template #append>
|
|
|
- <div v-if="formData.partnerRule === 1">:1</div>
|
|
|
+ <div v-if="formData.partnerRule === 1">%</div>
|
|
|
+ <div v-else-if="formData.leadersRule === 2">元</div>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="间接合伙人规则" prop="partnerInMoney">
|
|
|
<el-input v-model="formData.partnerInMoney" placeholder="请输入间接合伙人规则" style="width: 150px;">
|
|
|
<template #append>
|
|
|
- <div v-if="formData.partnerRule === 1">:1</div>
|
|
|
+ <div v-if="formData.partnerRule === 1">%</div>
|
|
|
+ <div v-else-if="formData.leadersRule === 2">元</div>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -171,11 +175,11 @@ export default {
|
|
|
activityId: res.data.activityId || '',
|
|
|
activityType: res.data.activityType || '',
|
|
|
leadersRule: res.data.leadersRule || '',
|
|
|
- leadersMoney: res.data.leadersMoney,
|
|
|
- leadersInMoney: res.data.leadersInMoney,
|
|
|
+ leadersMoney: (res.data.leadersRule === 1) && (typeof res.data.leadersMoney === 'number') ? res.data.leadersMoney * 100 : res.data.leadersMoney,
|
|
|
+ leadersInMoney: (res.data.leadersRule === 1) && (typeof res.data.leadersInMoney === 'number') ? res.data.leadersInMoney * 100 : res.data.leadersInMoney,
|
|
|
partnerRule: res.data.partnerRule || '',
|
|
|
- partnerMoney: res.data.partnerMoney,
|
|
|
- partnerInMoney: res.data.partnerInMoney,
|
|
|
+ partnerMoney: (res.data.partnerRule === 1) && (typeof res.data.partnerMoney === 'number') ? res.data.partnerMoney * 100 : res.data.partnerMoney,
|
|
|
+ partnerInMoney: (res.data.partnerRule === 1) && (typeof res.data.partnerInMoney === 'number') ? res.data.partnerInMoney * 100 : res.data.partnerInMoney,
|
|
|
sourceType: res.data.sourceType || ''
|
|
|
})
|
|
|
this.$nextTick(() => {
|
|
@@ -190,8 +194,12 @@ export default {
|
|
|
if (valid) {
|
|
|
const loading = this.$loading({ text: '提交中,请稍候……' })
|
|
|
try {
|
|
|
- const { ...otps } = this.formData
|
|
|
+ const { leadersRule, partnerRule, leadersMoney, leadersInMoney, partnerMoney, partnerInMoney, ...otps } = this.formData
|
|
|
const params = {
|
|
|
+ leadersMoney: leadersRule === 1 ? leadersMoney / 100 : leadersMoney,
|
|
|
+ leadersInMoney: leadersRule === 1 ? leadersInMoney / 100 : leadersInMoney,
|
|
|
+ partnerMoney: partnerRule === 1 ? partnerMoney / 100 : partnerMoney,
|
|
|
+ partnerInMoney: partnerRule === 1 ? partnerInMoney / 100 : partnerInMoney,
|
|
|
...otps
|
|
|
}
|
|
|
this.formData.ruleId ? await priceControlUpdatePlan(params) : await savePlatformBeeRule(params)
|