|
|
@ -89,94 +89,138 @@ |
|
|
|
<el-form-item label="等级名称" prop="name"> |
|
|
|
<el-form-item label="等级名称" prop="name"> |
|
|
|
<el-input class="sa-w-360" v-model="form.model.name" placeholder="请输入等级名称"></el-input> |
|
|
|
<el-input class="sa-w-360" v-model="form.model.name" placeholder="请输入等级名称"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="等级徽章" prop="image"> |
|
|
|
<!-- <el-form-item label="等级徽章" prop="image">--> |
|
|
|
<sa-uploader v-model="form.model.image"></sa-uploader> |
|
|
|
<!-- <sa-uploader v-model="form.model.image"></sa-uploader>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<el-form-item label="消费门槛" prop="total_consume"> |
|
|
|
|
|
|
|
<el-input class="sa-w-360" v-model="form.model.total_consume" placeholder="请输入消费门槛"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="一级(自购)佣金比例" prop="commission_rules.commission_1" |
|
|
|
<el-form-item label="方案一" prop="coupon_rules"> |
|
|
|
:rules="form.rules.commission_rules.commission"> |
|
|
|
<el-button type="primary" link @click="onSelectCoupon1">选择商品券 |
|
|
|
<el-input class="sa-w-360" v-model="form.model.commission_rules.commission_1" type="number"> |
|
|
|
</el-button> |
|
|
|
<template #append>%</template> |
|
|
|
<template v-if="form.model.coupon_rules.programme_1.length > 0"> |
|
|
|
</el-input> |
|
|
|
<div class="header sa-flex"> |
|
|
|
</el-form-item> |
|
|
|
<div class="key">券名称</div> |
|
|
|
<el-form-item label="二级佣金比例" prop="commission_rules.commission_2" |
|
|
|
<div class="oper">操作</div> |
|
|
|
:rules="form.rules.commission_rules.commission"> |
|
|
|
</div> |
|
|
|
<el-input class="sa-w-360" v-model="form.model.commission_rules.commission_2" type="number"> |
|
|
|
<div class="item" v-for="(element, index) in form.model.coupon_rules.programme_1" :key="element"> |
|
|
|
<template #append>%</template> |
|
|
|
<div class="key"> |
|
|
|
</el-input> |
|
|
|
<div class="goods-title sa-m-b-6">{{ element.name }}</div> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<el-form-item label="三级佣金比例" prop="commission_rules.commission_3" |
|
|
|
<div class="oper"> |
|
|
|
:rules="form.rules.commission_rules.commission"> |
|
|
|
<el-button type="danger" link @click="onDeleteCoupon1(index)"> |
|
|
|
<el-input class="sa-w-360" v-model="form.model.commission_rules.commission_3" type="number"> |
|
|
|
移除 |
|
|
|
<template #append>%</template> |
|
|
|
</el-button> |
|
|
|
</el-input> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<template v-if="form.model.level != 1"> |
|
|
|
<el-form-item label="方案二" prop="form.model.coupon_rules.programme_2"> |
|
|
|
<div class="sa-title is-line">添加升级条件</div> |
|
|
|
<el-button type="primary" link @click="onSelectCoupon2">选择商品券 |
|
|
|
<el-form-item label="升级方式" prop="upgrade_rules"> |
|
|
|
</el-button> |
|
|
|
<div> |
|
|
|
<template v-if="form.model.coupon_rules.programme_2.length > 0"> |
|
|
|
<el-radio-group class="mb-2" v-model="form.model.upgrade_type"> |
|
|
|
<div class="header sa-flex"> |
|
|
|
<el-radio :label="0">满足以下任意条件</el-radio> |
|
|
|
<div class="key">券名称</div> |
|
|
|
<el-radio :label="1">满足以下全部条件</el-radio> |
|
|
|
<div class="oper">操作</div> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div class="item" v-for="(element, index) in form.model.coupon_rules.programme_2" :key="element"> |
|
|
|
<div class="sa-flex sa-flex-wrap condition-group" v-for="group in upgradeCondition" |
|
|
|
<div class="key"> |
|
|
|
:key="group"> |
|
|
|
<div class="goods-title sa-m-b-6">{{ element.name }}</div> |
|
|
|
<div :class="[ |
|
|
|
</div> |
|
|
|
'item', |
|
|
|
<div class="oper"> |
|
|
|
'condition-item', |
|
|
|
<el-button type="danger" link @click="onDeleteCoupon2(index)"> |
|
|
|
Object.keys(form.model.upgrade_rules).includes(key) ? 'is-active' : '', |
|
|
|
移除 |
|
|
|
]" v-for="(item, key) in group" :key="item" |
|
|
|
</el-button> |
|
|
|
@click="onSelectUpgradeCondition(key)"> |
|
|
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<template v-for="(group, gkey) in upgradeCondition" :key="group"> |
|
|
|
|
|
|
|
<template v-for="(item, key) in group" :key="item"> |
|
|
|
|
|
|
|
<el-form-item :label="item.name" |
|
|
|
|
|
|
|
v-if="Object.keys(form.model.upgrade_rules).includes(key)" |
|
|
|
|
|
|
|
:prop="`upgrade_rules.${key}`" :rules="form.rules.upgrade_rules_inner.rules"> |
|
|
|
|
|
|
|
<template v-if="gkey != 'agent_level'"> |
|
|
|
|
|
|
|
<el-input class="w-120" v-model="form.model.upgrade_rules[key]" type="number"> |
|
|
|
|
|
|
|
<template #append> {{ initUnit(key) }}</template> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-button class="delete" type="danger" link @click="onDeleteRules(key)"> |
|
|
|
|
|
|
|
删除 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div v-if="gkey == 'agent_level'"> |
|
|
|
|
|
|
|
<div class="sa-flex sa-flex-wrap mb-4" |
|
|
|
|
|
|
|
v-for="(al, index) in form.model.upgrade_rules[key]" :key="al"> |
|
|
|
|
|
|
|
<el-form-item :prop="`upgrade_rules.${key}.${index}.level`" |
|
|
|
|
|
|
|
:rules="form.rules.upgrade_rules_inner.level"> |
|
|
|
|
|
|
|
<el-select class="w-120" v-model="al.level" placeholder="请选择分销商等级"> |
|
|
|
|
|
|
|
<template v-for="item in level.select" :key="item"> |
|
|
|
|
|
|
|
<el-option v-if="item.level < form.model.level" |
|
|
|
|
|
|
|
:label="item.name" :value="item.level+''"></el-option> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
<span class="ml-2 mr-2">满</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :prop="`upgrade_rules.${key}.${index}.count`" |
|
|
|
|
|
|
|
:rules="form.rules.upgrade_rules_inner.rules"> |
|
|
|
|
|
|
|
<el-input class="w-120" v-model="al.count" type="number"> |
|
|
|
|
|
|
|
<template #append>人</template> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-button class="delete" type="danger" link |
|
|
|
|
|
|
|
@click="onDeleteRules(key, index)"> |
|
|
|
|
|
|
|
删除 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-button type="primary" link size="small" @click="onAddUpgradeRules(key)"> |
|
|
|
|
|
|
|
+ 添加</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="一级(自购)佣金比例" prop="commission_rules.commission_1"--> |
|
|
|
|
|
|
|
<!-- :rules="form.rules.commission_rules.commission">--> |
|
|
|
|
|
|
|
<!-- <el-input class="sa-w-360" v-model="form.model.commission_rules.commission_1" type="number">--> |
|
|
|
|
|
|
|
<!-- <template #append>%</template>--> |
|
|
|
|
|
|
|
<!-- </el-input>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- <el-form-item label="二级佣金比例" prop="commission_rules.commission_2"--> |
|
|
|
|
|
|
|
<!-- :rules="form.rules.commission_rules.commission">--> |
|
|
|
|
|
|
|
<!-- <el-input class="sa-w-360" v-model="form.model.commission_rules.commission_2" type="number">--> |
|
|
|
|
|
|
|
<!-- <template #append>%</template>--> |
|
|
|
|
|
|
|
<!-- </el-input>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- <el-form-item label="三级佣金比例" prop="commission_rules.commission_3"--> |
|
|
|
|
|
|
|
<!-- :rules="form.rules.commission_rules.commission">--> |
|
|
|
|
|
|
|
<!-- <el-input class="sa-w-360" v-model="form.model.commission_rules.commission_3" type="number">--> |
|
|
|
|
|
|
|
<!-- <template #append>%</template>--> |
|
|
|
|
|
|
|
<!-- </el-input>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- <template v-if="form.model.level != 1">--> |
|
|
|
|
|
|
|
<!-- <div class="sa-title is-line">添加升级条件</div>--> |
|
|
|
|
|
|
|
<!-- <el-form-item label="升级方式" prop="upgrade_rules">--> |
|
|
|
|
|
|
|
<!-- <div>--> |
|
|
|
|
|
|
|
<!-- <el-radio-group class="mb-2" v-model="form.model.upgrade_type">--> |
|
|
|
|
|
|
|
<!-- <el-radio :label="0">满足以下任意条件</el-radio>--> |
|
|
|
|
|
|
|
<!-- <el-radio :label="1">满足以下全部条件</el-radio>--> |
|
|
|
|
|
|
|
<!-- </el-radio-group>--> |
|
|
|
|
|
|
|
<!-- <div>--> |
|
|
|
|
|
|
|
<!-- <div class="sa-flex sa-flex-wrap condition-group" v-for="group in upgradeCondition"--> |
|
|
|
|
|
|
|
<!-- :key="group">--> |
|
|
|
|
|
|
|
<!-- <div :class="[--> |
|
|
|
|
|
|
|
<!-- 'item',--> |
|
|
|
|
|
|
|
<!-- 'condition-item',--> |
|
|
|
|
|
|
|
<!-- Object.keys(form.model.upgrade_rules).includes(key) ? 'is-active' : '',--> |
|
|
|
|
|
|
|
<!-- ]" v-for="(item, key) in group" :key="item"--> |
|
|
|
|
|
|
|
<!-- @click="onSelectUpgradeCondition(key)">--> |
|
|
|
|
|
|
|
<!-- {{ item.name }}--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- <template v-for="(group, gkey) in upgradeCondition" :key="group">--> |
|
|
|
|
|
|
|
<!-- <template v-for="(item, key) in group" :key="item">--> |
|
|
|
|
|
|
|
<!-- <el-form-item :label="item.name"--> |
|
|
|
|
|
|
|
<!-- v-if="Object.keys(form.model.upgrade_rules).includes(key)"--> |
|
|
|
|
|
|
|
<!-- :prop="`upgrade_rules.${key}`" :rules="form.rules.upgrade_rules_inner.rules">--> |
|
|
|
|
|
|
|
<!-- <template v-if="gkey != 'agent_level'">--> |
|
|
|
|
|
|
|
<!-- <el-input class="w-120" v-model="form.model.upgrade_rules[key]" type="number">--> |
|
|
|
|
|
|
|
<!-- <template #append> {{ initUnit(key) }}</template>--> |
|
|
|
|
|
|
|
<!-- </el-input>--> |
|
|
|
|
|
|
|
<!-- <el-button class="delete" type="danger" link @click="onDeleteRules(key)">--> |
|
|
|
|
|
|
|
<!-- 删除--> |
|
|
|
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
<!-- <div v-if="gkey == 'agent_level'">--> |
|
|
|
|
|
|
|
<!-- <div class="sa-flex sa-flex-wrap mb-4"--> |
|
|
|
|
|
|
|
<!-- v-for="(al, index) in form.model.upgrade_rules[key]" :key="al">--> |
|
|
|
|
|
|
|
<!-- <el-form-item :prop="`upgrade_rules.${key}.${index}.level`"--> |
|
|
|
|
|
|
|
<!-- :rules="form.rules.upgrade_rules_inner.level">--> |
|
|
|
|
|
|
|
<!-- <el-select class="w-120" v-model="al.level" placeholder="请选择分销商等级">--> |
|
|
|
|
|
|
|
<!-- <template v-for="item in level.select" :key="item">--> |
|
|
|
|
|
|
|
<!-- <el-option v-if="item.level < form.model.level"--> |
|
|
|
|
|
|
|
<!-- :label="item.name" :value="item.level+''"></el-option>--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
|
|
|
<!-- <span class="ml-2 mr-2">满</span>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- <el-form-item :prop="`upgrade_rules.${key}.${index}.count`"--> |
|
|
|
|
|
|
|
<!-- :rules="form.rules.upgrade_rules_inner.rules">--> |
|
|
|
|
|
|
|
<!-- <el-input class="w-120" v-model="al.count" type="number">--> |
|
|
|
|
|
|
|
<!-- <template #append>人</template>--> |
|
|
|
|
|
|
|
<!-- </el-input>--> |
|
|
|
|
|
|
|
<!-- <el-button class="delete" type="danger" link--> |
|
|
|
|
|
|
|
<!-- @click="onDeleteRules(key, index)">--> |
|
|
|
|
|
|
|
<!-- 删除--> |
|
|
|
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- <el-button type="primary" link size="small" @click="onAddUpgradeRules(key)">--> |
|
|
|
|
|
|
|
<!-- + 添加</el-button>--> |
|
|
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
<!-- </template>--> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</el-scrollbar> |
|
|
|
</el-scrollbar> |
|
|
|
</el-main> |
|
|
|
</el-main> |
|
|
|