mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 08:25:52 +08:00
分销结构优化
This commit is contained in:
@@ -53,6 +53,11 @@ export const getDistributionCash = (params) => {
|
||||
export const auditDistributionCash = (id,params) => {
|
||||
return postRequest(`/distribution/cash/audit/${id}`, params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//分销会员列表
|
||||
export const getDistributionMember = (id,params) => {
|
||||
return getRequest(`/distribution/distribution/memberList/${id}`, params)
|
||||
}
|
||||
//查看分销团队列表
|
||||
export const getDistributionGroup = (id,params) => {
|
||||
return getRequest(`/distribution/distribution/groupList/${id}`, params)
|
||||
}
|
||||
|
||||
@@ -276,7 +276,19 @@ export const otherRouter = {
|
||||
title: "查看直播",
|
||||
name: "live-detail",
|
||||
component: () => import("@/views/promotions/live/live-detail.vue")
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "group-list",
|
||||
title: "分销团队",
|
||||
name: "group-list",
|
||||
component: () => import("@/views/distribution/distributionGroup.vue")
|
||||
},
|
||||
{
|
||||
path: "distribution-member",
|
||||
title: "分销会员列表",
|
||||
name: "distribution-member",
|
||||
component: () => import("@/views/distribution/distributionMember.vue")
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -90,19 +90,23 @@ export default {
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
minWidth: 120,
|
||||
minWidth: 200,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "推广单数",
|
||||
key: "distributionOrderCount",
|
||||
minWidth: 120,
|
||||
width: 150,
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
title: "推广人数",
|
||||
key: "peopleNum",
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
title: "分销金额",
|
||||
key: "rebateTotal",
|
||||
width: 150,
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} );
|
||||
@@ -110,9 +114,9 @@ export default {
|
||||
|
||||
},
|
||||
{
|
||||
title: "可用金额",
|
||||
title: "可提现金额",
|
||||
key: "canRebate",
|
||||
width: 150,
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} );
|
||||
@@ -121,7 +125,7 @@ export default {
|
||||
{
|
||||
title: "冻结金额",
|
||||
key: "commissionFrozen",
|
||||
width: 150,
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} );
|
||||
@@ -130,7 +134,7 @@ export default {
|
||||
{
|
||||
title: "状态",
|
||||
key: "distributionStatus",
|
||||
width: 150,
|
||||
minWidth: 200,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionStatus == "PASS") {
|
||||
@@ -149,7 +153,7 @@ export default {
|
||||
key: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 140,
|
||||
minWidth: 200,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
@@ -159,7 +163,42 @@ export default {
|
||||
justifyContent: "center",
|
||||
},
|
||||
},
|
||||
[
|
||||
[h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.memberList(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"下级用户"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.groupList(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"团队列表"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
@@ -214,6 +253,14 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//团队列表
|
||||
groupList(row){
|
||||
this.$router.push({ name: "group-list", query: { id: row.id } });
|
||||
},
|
||||
memberList(row){
|
||||
this.$router.push({ name: "distribution-member", query: { id: row.id } });
|
||||
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
|
||||
@@ -102,11 +102,6 @@ export default {
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
title: "库存",
|
||||
key: "quantity",
|
||||
minWidth: 80,
|
||||
},
|
||||
{
|
||||
title: "添加时间",
|
||||
key: "createTime",
|
||||
|
||||
103
manager/src/views/distribution/distributionGroup.vue
Normal file
103
manager/src/views/distribution/distributionGroup.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
|
||||
<Row type="flex" justify="end" class="page padding-row">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDistributionGroup
|
||||
} from "@/api/distribution";
|
||||
import {cashStatusList} from './dataJson'
|
||||
export default {
|
||||
name: "distributionGroup",
|
||||
data() {
|
||||
return {
|
||||
id: "",//分销员id
|
||||
cashStatusList, // 状态列表
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
result: 'FAIL_AUDITING', // 是否通过
|
||||
searchForm: { // 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
handleStatus:'edit',// 判断是编辑还是查看
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
memberName: "",
|
||||
price: "",
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
columns: [
|
||||
{
|
||||
title: "昵称",
|
||||
key: "memberName",
|
||||
minWidth: 200
|
||||
},
|
||||
{
|
||||
title: "销售额",
|
||||
key: "distributionOrderPrice",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "订单量",
|
||||
key: "distributionOrderCount",
|
||||
minWidth: 120
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
console.log(this.id);
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionGroup(this.id,this.searchForm).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.$route.query.id;
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
114
manager/src/views/distribution/distributionMember.vue
Normal file
114
manager/src/views/distribution/distributionMember.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
|
||||
<Row type="flex" justify="end" class="page padding-row">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDistributionCash,
|
||||
auditDistributionCash, getDistributionMember
|
||||
} from "@/api/distribution";
|
||||
import {cashStatusList} from './dataJson'
|
||||
export default {
|
||||
name: "distributionMember",
|
||||
data() {
|
||||
return {
|
||||
id: "",//分销员id
|
||||
cashStatusList, // 状态列表
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
result: 'FAIL_AUDITING', // 是否通过
|
||||
searchForm: { // 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
handleStatus:'edit',// 判断是编辑还是查看
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
memberName: "",
|
||||
price: "",
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
columns: [
|
||||
{
|
||||
title: "客户昵称",
|
||||
key: "nickName",
|
||||
minWidth: 200
|
||||
},
|
||||
{
|
||||
title: "成交额",
|
||||
key: "orderPrice",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "佣金总额",
|
||||
key: "rebatePrice",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "orderNum",
|
||||
minWidth: 130
|
||||
},
|
||||
{
|
||||
title: "最近下单时间",
|
||||
key: "lastLoginDate",
|
||||
minWidth: 130
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
console.log(this.id);
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionMember(this.id,this.searchForm).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.$route.query.id;
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -11,7 +11,7 @@
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="分销商" prop="distributionName">
|
||||
<Form-item label="分销员" prop="distributionName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.distributionName"
|
||||
@@ -104,7 +104,7 @@
|
||||
},
|
||||
|
||||
{
|
||||
title: "分销商",
|
||||
title: "分销员",
|
||||
key: "distributionName",
|
||||
tooltip: true,
|
||||
minWidth:80,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div style="background-color: #fff;">
|
||||
|
||||
<Form ref="form" :model="form" :rules="formRule" :label-width="120" style="padding: 10px;">
|
||||
<Form ref="form" :model="form" :label-width="120" style="padding: 10px;">
|
||||
|
||||
<Divider orientation="left">分销设置</Divider>
|
||||
<FormItem label="是否开启分销" prop="isOpen">
|
||||
@@ -10,12 +10,110 @@
|
||||
<span slot="close">关闭</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
<FormItem label="分销关系绑定天数" prop="distributionDay">
|
||||
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.distributionDay"></InputNumber>
|
||||
<FormItem label="分销层级" prop="level">
|
||||
<RadioGroup v-model="form.level" size="large">
|
||||
<Radio label="1">1级</Radio>
|
||||
<Radio label="2">2级</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="分销结算天数" prop="cashDay">
|
||||
<InputNumber :min="0" :max="365" style="width:100px;" v-model="form.cashDay"></InputNumber>
|
||||
<FormItem label="分销模式" prop="mode">
|
||||
<RadioGroup v-model="form.mode" size="large">
|
||||
<Radio label="1">指定分销</Radio>
|
||||
<Radio label="2">人人分销</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="分销关系绑定" prop="binding">
|
||||
<RadioGroup v-model="form.binding" size="large">
|
||||
<Radio label="ALL">所有用户</Radio>
|
||||
<Radio label="NEW">新用户</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="分销绑定模式" prop="validity">
|
||||
<RadioGroup v-model="form.validity" size="large">
|
||||
<Radio label="FOREVER">永久</Radio>
|
||||
<Radio label="EXP">有效期</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="有效期天数" prop="validityDay">
|
||||
<InputNumber :min="1" :max="365" style="width:200px;" v-model="form.validityDay"></InputNumber>
|
||||
</FormItem>
|
||||
|
||||
<Divider orientation="left">返佣设置</Divider>
|
||||
<FormItem label="佣金模式" prop="commissionModel">
|
||||
<RadioGroup v-model="form.commissionModel" size="large">
|
||||
<Radio label="1">平台承担</Radio>
|
||||
<Radio label="2">商户承担</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="一级佣金比例" prop="firstCommission">
|
||||
<InputNumber :min="0" :max="100"
|
||||
v-model="form.firstCommission"
|
||||
:formatter="value => `${value}%`"
|
||||
:parser="value => value.replace('%', '')">
|
||||
</InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="二级佣金比例" prop="secondaryCommission">
|
||||
<InputNumber :min="0"
|
||||
:max="100"
|
||||
v-model="form.secondaryCommission"
|
||||
:formatter="value => `${value}%`"
|
||||
:parser="value => value.replace('%', '')">
|
||||
</InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="自购返佣" prop="selfCommission">
|
||||
<RadioGroup v-model="form.selfCommission" size="large">
|
||||
<Radio label="1">开启</Radio>
|
||||
<Radio label="2">关闭</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="推广返佣" prop="promotion">
|
||||
<RadioGroup v-model="form.promotion" size="large">
|
||||
<Radio label="1">开启</Radio>
|
||||
<Radio label="2">关闭</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="每日最大推广数量" prop="maxPromotionNum">
|
||||
<InputNumber :min="0" :max="1000" style="width:200px;" v-model="form.maxPromotionNum"></InputNumber>
|
||||
</FormItem>
|
||||
|
||||
<!-- <Divider orientation="left">提现设置</Divider>-->
|
||||
<!-- <FormItem label="佣金模式" prop="withdrawalType">-->
|
||||
<!-- <RadioGroup v-model="form.withdrawalType" type="button" button-style="solid">-->
|
||||
<!-- <Radio label="1">线下转账</Radio>-->
|
||||
<!-- <Radio label="2">微信零钱</Radio>-->
|
||||
<!-- </RadioGroup>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="提现最低金额" prop="minPrice">-->
|
||||
<!-- <Input type="number" style="width:200px;" v-model="form.minPrice">-->
|
||||
<!-- </Input>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="提现最高金额" prop="maxPrice">-->
|
||||
<!-- <Input type="number" style="width:200px;" v-model="form.maxPrice">-->
|
||||
<!-- </Input>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="提现手续费" prop="fee">-->
|
||||
<!-- <Input type="number" style="width:200px;" v-model="form.fee">-->
|
||||
<!-- </Input>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="是否支持银行卡" prop="withdrawalBank">-->
|
||||
<!-- <i-switch size="large" v-model="form.withdrawalBank" :true-value="true" :false-value="false">-->
|
||||
<!-- <span slot="open">开启</span>-->
|
||||
<!-- <span slot="close">关闭</span>-->
|
||||
<!-- </i-switch>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="是否支持微信" prop="withdrawalWechat">-->
|
||||
<!-- <i-switch size="large" v-model="form.withdrawalWechat" :true-value="true" :false-value="false">-->
|
||||
<!-- <span slot="open">开启</span>-->
|
||||
<!-- <span slot="close">关闭</span>-->
|
||||
<!-- </i-switch>-->
|
||||
<!-- </FormItem>-->
|
||||
<!-- <FormItem label="是否支持支付宝" prop="withdrawalAli">-->
|
||||
<!-- <i-switch size="large" v-model="form.withdrawalAli" :true-value="true" :false-value="false">-->
|
||||
<!-- <span slot="open">开启</span>-->
|
||||
<!-- <span slot="close">关闭</span>-->
|
||||
<!-- </i-switch>-->
|
||||
<!-- </FormItem>-->
|
||||
<FormItem>
|
||||
<Button type="primary" @click="submit">保存</Button>
|
||||
</FormItem>
|
||||
@@ -24,8 +122,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setSetting, getSetting } from "@/api/index";
|
||||
import { regular } from "@/utils";
|
||||
import {getSetting, setSetting} from "@/api/index";
|
||||
|
||||
export default {
|
||||
name: "distributionSetting",
|
||||
data() {
|
||||
@@ -33,20 +131,36 @@ export default {
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
isOpen: true,
|
||||
distributionDay: 0, //分销关系绑定天数
|
||||
cashDay: 0, //分销结算天数
|
||||
level: 1, //分销层级
|
||||
mode: 0, //分销模式(指定分销/人人分销)
|
||||
binding: "NEW", //分销关系绑定(新用户/所有用户)
|
||||
validity: "FOREVER", //分销绑定模式(有效期/永久)
|
||||
validityDay: 0, //有效期天数
|
||||
commissionModel: 0, //佣金模式(平台承担/商户承担)
|
||||
firstCommission: 0, //一级佣金比例
|
||||
secondaryCommission: 0, //二级佣金比例
|
||||
selfCommission: 0, //自购返佣
|
||||
promotion: 0, //推广返佣
|
||||
maxPromotionNum: 0, //每日最大推广数量
|
||||
// withdrawalType: 0, //提现方式(线下转账/微信零钱)
|
||||
// minPrice: 0, //提现最低金额
|
||||
// maxPrice: 0, //提现最高金额
|
||||
// fee: 0, //提现手续费
|
||||
// withdrawalBank: false, //是否支持银行卡
|
||||
// withdrawalWechat: false, //是否支持微信
|
||||
// withdrawalAli: false, //是否支持支付宝
|
||||
},
|
||||
formRule: {
|
||||
isOpen: [
|
||||
regular.REQUIRED
|
||||
],
|
||||
distributionDay: [
|
||||
regular.REQUIRED
|
||||
],
|
||||
cashDay: [
|
||||
regular.REQUIRED
|
||||
],
|
||||
}
|
||||
// formRule: {
|
||||
// isOpen: [
|
||||
// regular.REQUIRED
|
||||
// ],
|
||||
// distributionDay: [
|
||||
// regular.REQUIRED
|
||||
// ],
|
||||
// cashDay: [
|
||||
// regular.REQUIRED
|
||||
// ],
|
||||
// }
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user