<template>
|
<!--
|
作者:
|
时间:2025-11-18
|
描述:插件中心-VIP专区-VIP用户
|
-->
|
<div class="table-wrap">
|
<div class="table-search">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form-item label="用户昵称">
|
<el-input v-model="formInline.nick_name" placeholder="用户昵称"></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
</el-form-item>
|
</el-form>
|
</div>
|
<div class="table-content">
|
<el-table :data="list.data" style="width: 100%">
|
<el-table-column prop="user.nickName" label="用户信息">
|
<template slot-scope="scope">
|
<div class="d-s-c">
|
<div class="head-img mr10">
|
<img :src="scope.row.user.avatarUrl" width="30" height="30" />
|
</div>
|
<div>
|
<p>{{ scope.row.user.nickName }}</p>
|
<p class="gray9">ID: {{ scope.row.user_id }}</p>
|
</div>
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="grade.name" label="会员等级"> </el-table-column>
|
<el-table-column prop="money" label="可提现金额">
|
<template slot-scope="scope">
|
<span class="orange">¥{{ scope.row.money }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="freeze_money" label="提现冻结金额">
|
<template slot-scope="scope">
|
<span class="orange">¥{{ scope.row.freeze_money }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="total_money" label="已提现金额">
|
<template slot-scope="scope">
|
<span class="orange">¥{{ scope.row.total_money }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="referee.nickName" label="推荐人"> </el-table-column>
|
<el-table-column prop="create_time" label="成为时间" width="140"> </el-table-column>
|
<el-table-column fixed="right" label="操作" width="120">
|
<template slot-scope="scope">
|
<el-button @click="openSubUser(scope.row)" type="text" size="small" >下级用户</el-button>
|
<el-button @click="detailedClick(scope.row)" type="text" size="small">提现明细</el-button>
|
<el-button @click="editClick(scope.row)" type="text" size="small">修改</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!--分页-->
|
<div class="pagination">
|
<el-pagination
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
:current-page="curPage"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="list.total"
|
>
|
</el-pagination>
|
</div>
|
|
<!--编辑用户-->
|
<Edit :open_edit="open_edit" :userModel="userModel" @close="closeEditFunc"></Edit>
|
<!--查看下级用户-->
|
<SubUser :open_dialog="open_dialog" :userModel="userModel" @close="closeFunc"></SubUser>
|
</div>
|
</template>
|
|
<script>
|
import vipApi from '@/api/plus/vip.js';
|
import Edit from './dialog/Edit';
|
import SubUser from './dialog/SubUser.vue';
|
|
export default {
|
data() {
|
return {
|
formInline: {
|
nick_name: ''
|
},
|
/*列表*/
|
list: [],
|
/*分页*/
|
curPage: 1,
|
pageSize: 10,
|
/*是否打开编辑*/
|
open_edit: false,
|
open_dialog: false,
|
/*当前编辑的用户模型*/
|
userModel: {}
|
};
|
},
|
components: {
|
SubUser,
|
Edit
|
},
|
created() {
|
this.getData();
|
},
|
methods: {
|
/*获取数据*/
|
getData() {
|
let self = this;
|
let params = {
|
list_rows: self.pageSize,
|
page: self.curPage,
|
nick_name: self.formInline.nick_name
|
};
|
vipApi.user(params, true)
|
.then(data => {
|
self.list = data.data.list;
|
})
|
.catch(() => {});
|
},
|
|
/*查询*/
|
onSubmit() {
|
this.curPage = 1;
|
this.getData();
|
},
|
|
/*分页*/
|
handleSizeChange(val) {
|
this.pageSize = val;
|
this.getData();
|
},
|
handleCurrentChange(val) {
|
this.curPage = val;
|
this.getData();
|
},
|
|
/*提现明细*/
|
detailedClick(item) {
|
this.$router.push({
|
path: '/plus/vip/cash/index',
|
query: {
|
user_id: item.user_id
|
}
|
});
|
},
|
/*打开下级用户弹窗*/
|
openSubUser(e){
|
this.userModel=e;
|
this.open_dialog=true;
|
},
|
|
/*关闭下级用户弹窗*/
|
closeFunc(){
|
this.open_dialog=false;
|
},
|
|
/*修改点击*/
|
editClick(item) {
|
this.userModel = item;
|
this.open_edit = true;
|
},
|
|
/*关闭弹窗*/
|
closeEditFunc(e) {
|
this.open_edit = false;
|
if (e && e.type == 'success') {
|
this.getData();
|
}
|
}
|
}
|
};
|
</script>
|
|
<style>
|
</style>
|