添加:权重值管理相关页面

This commit is contained in:
wuhui_zzw 2023-12-27 11:46:51 +08:00
parent 34a8c5f4b5
commit 56ed57ccad
3 changed files with 245 additions and 1 deletions

View File

@ -12,3 +12,8 @@ export function platformCommissionRecordTitle(data) {
export function platformCommissionRecordList(data) {
return request.get(`marketing/platformCommission/record_list`, data)
}
// 平台抽成 - 权重值持有列表&权重值变更记录
export function platformCommissionWeightValue(data,getType = 'hold_list') {
// hold_list=持有列表change_record=变更记录
return request.get(`marketing/platformCommission/weight_value_${getType}`, data)
}

View File

@ -465,6 +465,15 @@ const marketingRouter = {
},
component: () => import('@/views/marketing/platformCommission/commissionRecord/index')
},
{
path: 'weightValue',
name: `platformCommissionWeightValue`,
meta: {
title: '权重值管理',
noCache: true
},
component: () => import('@/views/marketing/platformCommission/weightValue/index')
},
{
path: 'config',
name: `platformCommissionConfig`,
@ -473,7 +482,7 @@ const marketingRouter = {
noCache: true
},
component: () => import('@/views/marketing/platformCommission/config/index')
}
},
]
}
]

View File

@ -0,0 +1,230 @@
<template>
<div class="divBox">
<el-card class="box-card">
<!--顶部搜索栏-->
<div slot="header" class="clearfix">
<div class="container">
<el-form inline size="small" label-width="80px">
<el-form-item label="搜索:">
<el-input v-model="searchData.uid" placeholder="请输入用户ID" class="selWidth" clearable>
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="clickSearch" />
</el-input>
</el-form-item>
<el-form-item class="width100">
<!--<el-button size="small" type="primary" @click="exports">导出</el-button>-->
</el-form-item>
</el-form>
</div>
</div>
<!--选项卡-->
<el-tabs v-model="activeName" @tab-click="changeTabs">
<el-tab-pane label="持有列表" name="hold_list">
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
<el-table-column prop="id" label="ID" min-width="80" align="center"/>
<el-table-column label="用户信息" prop="nickname" min-width="280" align="left">
<template slot-scope="scope">
<div class="user-content">
<div class="user-avatar" v-if="scope.row.avatar && scope.row.avatar != 1">
<img :src="scope.row.avatar" />
</div>
<div class="user-info">
<div class="nickname">{{ scope.row.nickname }}</div>
<div class="user-id">ID{{ scope.row.uid }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="持有总数" prop="sum_quantity" min-width="200" align="center" />
<el-table-column label="操作" min-width="200" align="center">
<template slot-scope="scope">
<el-button type="primary" @click="seeChangeRecord(scope.row)">变更记录</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="变更记录" name="change_record">
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
<el-table-column prop="id" label="ID" min-width="80" align="center"/>
<el-table-column label="用户信息" prop="nickname" min-width="280" align="left">
<template slot-scope="scope">
<div class="user-content">
<div class="user-avatar" v-if="scope.row.avatar && scope.row.avatar != 1">
<img :src="scope.row.avatar" />
</div>
<div class="user-info">
<div class="nickname">{{ scope.row.nickname }}</div>
<div class="user-id">ID{{ scope.row.uid }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="分销商等级" prop="brokerage_level" min-width="80" align="center" />
<el-table-column label="变更前持有数量" prop="change_front" min-width="150" align="center" />
<el-table-column label="变更类型" min-width="150" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.change_type == 1" type="success" effect="dark">增加</el-tag>
<el-tag v-else type="danger" effect="dark">减少</el-tag>
</template>
</el-table-column>
<el-table-column label="变更数量" prop="change_quantity" min-width="150" align="center" />
<el-table-column label="变更后持有数量" prop="change_after" min-width="150" align="center" />
<el-table-column label="变更时间" prop="create_time" min-width="150" align="center" />
<el-table-column label="备注" prop="remark" min-width="200" align="center" />
</el-table>
</el-tab-pane>
</el-tabs>
<!--分页-->
<div class="block">
<el-pagination
:page-sizes="[10,20, 40, 60, 80]"
:page-size="searchData.limit"
:current-page="searchData.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
</div>
</template>
<script>
import { platformCommissionWeightValue } from '@/api/platformCommission'
export default {
name: "platformCommissionWeightValue",
components: { },
data() {
return {
listLoading: true,
//
searchData: {
page: 1,
limit: 10,
uid: ''
},
//
activeName: 'hold_list',
//
tableData: {
data: [],
total: 0,
},
};
},
watch: {},
mounted() {
this.getList('');
},
methods: {
//
getList(num) {
this.listLoading = true;
this.searchData.page = num ? num : this.searchData.page;
platformCommissionWeightValue(this.searchData,this.activeName)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.listLoading = false;
this.$message.error(res.message);
});
},
pageChange(page) {
this.searchData.page = page;
this.getList('');
},
handleSizeChange(val) {
this.searchData.limit = val;
this.getList('');
},
//
clickSearch(){
this.getList(1);
},
//
changeTabs(tab, event){
this.searchData.uid = '';
this.getList(1);
},
//
seeChangeRecord(item){
this.searchData.uid = item.uid;
this.activeName = 'change_record';
this.getList(1);
}
},
};
</script>
<style scoped lang="scss">
.selWidth {
width: 350px !important;
}
.seachTiele {
line-height: 35px;
}
.title{
margin-bottom: 16px;
color: #17233d;
font-size: 14px;
font-weight: bold;
}
.scollhide::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.user-content{
--user-content-height-: 80px;
height: var(--user-content-height-);
width: 100%;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
.user-avatar{
height: var(--user-content-height-);
width: var(--user-content-height-);
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
img{
height: 80%!important;
width: 80%!important;
border-radius: 50% !important;
}
}
.user-info{
height: var(--user-content-height-);
width: calc(100% - var(--user-content-height-)) !important;
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
.nickname{
font-size: 15px;
font-weight: bold;
line-height: calc(var(--user-content-height- * 65%)) !important;
width: 100%;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user-id{
font-size: 13px;
line-height: calc(var(--user-content-height- * 35%));
}
}
}
.rate-num{
margin-top: 10px!important;
}
</style>