添加:管理后台 - 代理中心 - 基本配置

This commit is contained in:
wuhui_zzw 2024-01-31 14:46:23 +08:00
parent b9ca6cf089
commit e61e8f74f3
2 changed files with 428 additions and 15 deletions

View File

@ -768,7 +768,14 @@ export function getEditInfo(data) {
export function agentList(data) {
return request.get(`marketing/agent/list`,data)
}
// 代理中心 - 配置提交
export function setAgentConfig(data) {
return request.post(`marketing/agent/config`,data)
}
// 代理中心 - 配置提交
export function getAgentConfig() {
return request.get(`marketing/agent/config`)
}
// 代理中心 - 佣金明细
export function commissionList(data) {
return request.get(`marketing/agent/commission_list`,data)
@ -791,3 +798,4 @@ export function commissionList(data) {

View File

@ -1,26 +1,431 @@
<template>
<div class="mainContent">
配置信息
<div class="divBox">
<el-card class="box-card">
<el-form ref="config" :model="config" :rules="rules" label-width="200px" class="demo-config">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="人员入驻设置" name="pay_money">
<el-alert type="warning" show-icon :closable="false">
<template slot="title">费用及佣金说明</template>
1费用为该角色加入时需要支付的金额例如发起人邀请省公司加入则省公司需要支付成为省公司费用所设置的金额<br />
2费用设置为0时则无需支付推荐奖励佣金设置将失效无奖励佣金<br />
3奖励仅邀请人归属的上级可得例如合伙人加入且支付后邀请该合伙人的运营商可获得奖励邀请该运营商的外勤可获得奖励邀请该外勤的省公司可获得奖励邀请该省公司的发起人可获得奖励<br />
</el-alert>
<el-divider content-position="left">省公司费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="province_money">
<span slot="label">成为省公司费用</span>
<el-input v-model="config.province_money" :precision="2" :step="0.01" :min="0" type="number" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.province_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.province_money > 0">
<el-form-item prop="province_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.province_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.province_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">外勤费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="field_staff_money">
<span slot="label">成为外勤费用</span>
<el-input v-model="config.field_staff_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.field_staff_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.field_staff_money">
<el-form-item prop="field_staff_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.field_staff_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.field_staff_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.field_staff_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">内勤费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="internal_staff_money">
<span slot="label">成为内勤费用</span>
<el-input v-model="config.internal_staff_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.internal_staff_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.internal_staff_money > 0">
<el-form-item prop="internal_staff_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.internal_staff_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.internal_staff_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.internal_staff_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">运营商费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="operator_money">
<span slot="label">成为运营商费用</span>
<el-input v-model="config.operator_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.operator_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.operator_money > 0">
<el-form-item prop="operator_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.operator_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.operator_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.operator_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.operator_money_field_staff" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">外勤奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">合伙人费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="partner_money">
<span slot="label">成为合伙人费用</span>
<el-input v-model="config.partner_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.partner_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.partner_money > 0">
<el-form-item prop="partner_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.partner_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.partner_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.partner_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.partner_money_field_staff" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">外勤奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.partner_money_operator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">运营商奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">餐厅费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="mer_money">
<span slot="label">成为餐厅费用</span>
<el-input v-model="config.mer_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.mer_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.mer_money > 0">
<el-form-item prop="mer_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.mer_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.mer_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.mer_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.mer_money_field_staff" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">外勤奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.mer_money_operator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">运营商奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.mer_money_partner" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">合伙人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">配送费用及佣金</el-divider>
<el-row :gutter="24" class="ml20">
<el-col :span="24">
<el-form-item prop="delivery_money">
<span slot="label">成为配送商费用</span>
<el-input v-model="config.delivery_money" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item>
<span slot="label">是否需要审核</span>
<el-radio-group v-model="config.delivery_process">
<el-radio :label="0">需要审核</el-radio>
<el-radio :label="1">无需审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="config.delivery_money > 0">
<el-form-item prop="delivery_money_commission">
<span slot="label">推荐奖励佣金</span>
<el-col :span="8">
<el-input v-model="config.delivery_money_platform" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">平台奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.delivery_money_initiator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">发起人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.delivery_money_province" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">省公司奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.delivery_money_field_staff" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">外勤奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.delivery_money_operator" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">运营商奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
<el-col :span="8">
<el-input v-model="config.delivery_money_partner" :precision="2" :step="0.01" :min="0" class="selWidth">
<template slot="prepend">合伙人奖励</template>
<template slot="append"></template>
</el-input>
</el-col>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<!-- 提交按钮 -->
<el-form-item>
<el-button type="primary" @click="setConfig('config')">保存</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
import {getAgentConfig, setAgentConfig} from "@/api/marketing";
export default {
name: "mainContent",
components: { },
name: 'Index',
data() {
return {};
return {
//
activeName: 'pay_money',
config: {
province_money: 0.00,
province_process: 0,
field_staff_money: 0.00,
field_staff_process: 0,
internal_staff_money: 0.00,
internal_staff_process: 0,
operator_money: 0.00,
operator_process: 0,
partner_money: 0.00,
partner_process: 0,
mer_money: 0.00,
mer_process: 0,
delivery_money: 0.00,
delivery_process: 0,
},
//
rules: {
province_money: [{ required: true, message: '请输入成为省公司费用', trigger: 'change'}],
field_staff_money: [{ required: true, message: '请输入成为外勤费用', trigger: 'change'}],
internal_staff_money: [{ required: true, message: '请输入成为内勤费用', trigger: 'change'}],
operator_money: [{ required: true, message: '请输入成为成为运营商费用', trigger: 'change'}],
partner_money: [{ required: true, message: '请输入成为合伙人费用', trigger: 'change'}],
mer_money: [{ required: true, message: '请输入成为餐厅费用', trigger: 'change'}],
delivery_money: [{ required: true, message: '请输入成为配送商费用', trigger: 'change'}],
}
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {}
};
mounted() {
this.getConfig();
},
methods: {
// tab
handleClick(tab, event){},
//
setConfig(){
let _this = this;
setAgentConfig(_this.config).then((res) => {
_this.$message.success(res.message);
}).catch((res) => {
_this.$message.error(res.message);
});
},
//
getConfig(){
let _this = this;
getAgentConfig().then((res) => {
_this.config = res.data || {};
}).catch((res) => {
_this.$message.error(res.message);
});
}
}
}
</script>
<style scoped lang="scss">
.selWidth{
margin-bottom: 10px!important;
}
</style>