|
@@ -1,20 +1,8 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- :visible.sync="visible"
|
|
|
- v-bind="modalOptions"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="formData"
|
|
|
- :model="formData"
|
|
|
- :rules="formRules"
|
|
|
- size="mini"
|
|
|
- label-suffix=":"
|
|
|
- label-width="150px"
|
|
|
- >
|
|
|
+ <el-dialog :visible.sync="visible" v-bind="modalOptions">
|
|
|
+ <el-form ref="formData" :model="formData" :rules="formRules" size="mini" label-suffix=":" label-width="150px">
|
|
|
<el-form-item label="关联平台组合活动" prop="composeId">
|
|
|
- <el-select
|
|
|
- v-model="formData.composeId" size="mini" placeholder="请选择关联平台组合活动" filterable
|
|
|
- >
|
|
|
+ <el-select v-model="formData.composeId" size="mini" placeholder="请选择关联平台组合活动" filterable>
|
|
|
<el-option
|
|
|
v-for="(item, index) in activityList" :key="item.composeId"
|
|
|
:label="`${item.composeName}(${item.composeId})`" :value="item.composeId"
|
|
@@ -22,7 +10,10 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="活动配置类型" prop="configType">
|
|
|
- <el-select v-model="formData.configType" clearable size="mini" placeholder="请选择活动类型">
|
|
|
+ <el-select
|
|
|
+ v-model="formData.configType" clearable size="mini" placeholder="请选择活动类型"
|
|
|
+ @change="formData.roleType = formData.ruleId = formData.joinRule = formData.joinMoney = ''"
|
|
|
+ >
|
|
|
<el-option label="升级角色" :value="1" />
|
|
|
<el-option label="分佣" :value="2" />
|
|
|
<el-option label="社区服务" :value="3" />
|
|
@@ -31,24 +22,47 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否参与" prop="joinRole">
|
|
|
- <el-select v-model="formData.joinRole" clearable size="mini" placeholder="请选择是否参与">
|
|
|
+ <el-select
|
|
|
+ v-model="formData.joinRole" clearable size="mini" placeholder="请选择是否参与"
|
|
|
+ @change="formData.roleType = formData.ruleId = formData.joinRule = formData.joinMoney = ''"
|
|
|
+ >
|
|
|
<el-option label="是" :value="1" />
|
|
|
<el-option label="否" :value="2" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="规则" prop="joinRule">
|
|
|
- <el-select v-model="formData.joinRule" clearable size="mini" placeholder="请选择规则">
|
|
|
- <el-option label="金额" :value="1" />
|
|
|
- <el-option label="比例" :value="2" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="升级类型" prop="roleType">
|
|
|
+ <el-form-item
|
|
|
+ v-if="[ 1 ].includes(formData.configType) && (formData.joinRole === 1)" label="升级类型"
|
|
|
+ prop="roleType"
|
|
|
+ >
|
|
|
<el-select v-model="formData.roleType" clearable size="mini" placeholder="请选择升级类型">
|
|
|
<el-option label="团长" :value="1" />
|
|
|
<el-option label="合伙人" :value="2" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="参与值" prop="joinMoney">
|
|
|
+ <el-form-item
|
|
|
+ v-if="[1, 2].includes(formData.configType) && (formData.joinRole === 1)" label="关联佣金配置"
|
|
|
+ prop="ruleId"
|
|
|
+ >
|
|
|
+ <el-select v-model="formData.ruleId" clearable size="mini" placeholder="请选择关联佣金配置" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in ruleList" :key="item.ruleId"
|
|
|
+ :label="`${item.activityName || '--'}(${item.ruleId})`" :value="item.ruleId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="[2, 3, 4, 5].includes(formData.configType) && (formData.joinRole === 1)" label="规则"
|
|
|
+ prop="joinRule"
|
|
|
+ >
|
|
|
+ <el-select v-model="formData.joinRule" clearable size="mini" placeholder="请选择规则">
|
|
|
+ <el-option label="金额" :value="1" />
|
|
|
+ <el-option label="比例" :value="2" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="[2, 3, 4, 5].includes(formData.configType) && (formData.joinRole === 1)" label="参与值"
|
|
|
+ prop="joinMoney"
|
|
|
+ >
|
|
|
<el-input v-model="formData.joinMoney" placeholder="请输入参与值" style="width: 250px;">
|
|
|
<template #append>
|
|
|
<div v-if="formData.joinRule === 1">元</div>
|
|
@@ -56,16 +70,6 @@
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="关联佣金配置" prop="ruleId">
|
|
|
- <el-select
|
|
|
- v-model="formData.ruleId" clearable size="mini" placeholder="请选择关联佣金配置" filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in ruleList" :key="item.ruleId"
|
|
|
- :label="`${item.activityName || '--'}(${item.ruleId})`" :value="item.ruleId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
@@ -170,6 +174,7 @@ export default {
|
|
|
const { joinRule, joinMoney, ...otps } = this.formData
|
|
|
const params = {
|
|
|
joinMoney: joinRule === 2 ? joinMoney / 100 : joinMoney,
|
|
|
+ joinRule,
|
|
|
...otps
|
|
|
}
|
|
|
this.formData.configId ? await updatePlatformComposeConfig(params) : await savePlatformComposeConfig(params)
|
|
@@ -191,4 +196,3 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|