|
@@ -3,8 +3,8 @@
|
|
|
* @version: 1.0
|
|
|
* @Author: zzx
|
|
|
* @Date: 2024-11-09 16:08:16
|
|
|
- * @LastEditors: zzx
|
|
|
- * @LastEditTime: 2024-11-19 16:08:16
|
|
|
+ * @LastEditors: zzx tigerzouzx@foxmail.com
|
|
|
+ * @LastEditTime: 2024-11-20 18:00
|
|
|
-->
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
@@ -41,7 +41,7 @@
|
|
|
<el-card class="operate-container" shadow="hover">
|
|
|
<i class="el-icon-tickets"></i>
|
|
|
<span>数据列表</span>
|
|
|
- <span style="font-size: 14px;color: red;margin-left: 20px;">注:设置为分销员后后台账号为手机号,默认密码为123456</span>
|
|
|
+ <span class="tips">注:设置分销权限后后台账号为手机号,默认密码为123456</span>
|
|
|
</el-card>
|
|
|
<div class="table-container">
|
|
|
<el-table ref="adminTable" :data="list" style="width: 100%" v-loading="listLoading" border>
|
|
@@ -64,13 +64,13 @@
|
|
|
<span v-if="isAdmin == 0">
|
|
|
<el-button v-if="scope.row.type==1" size="mini" type="success" plain
|
|
|
@click="get_settingType(scope.$index, scope.row)">
|
|
|
- 设为一级分销员
|
|
|
+ 设为一级分销
|
|
|
</el-button>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- <el-button v-if="isAdmin==2" size="mini" type="warning" plain
|
|
|
+ <el-button v-if="isAdmin==2 && scope.row.type!=3" size="mini" type="warning" plain
|
|
|
@click="get_settingType(scope.$index, scope.row)">
|
|
|
- 设为二级分销员
|
|
|
+ 设为二级分销
|
|
|
</el-button>
|
|
|
</span>
|
|
|
<el-button size="mini" v-if="scope.row.type != 1 && scope.row.type != null" type="primary" plain
|
|
@@ -90,8 +90,16 @@
|
|
|
<el-dialog title="查看绑定用户" :visible.sync="forbiddenDialogVisible" width="60%" :before-close="handleClose">
|
|
|
<el-table ref="adminTable" :data="dialogList" style="width: 100%" v-loading="dialogListLoading" border>
|
|
|
<el-table-column label="序号" width="100" align="center" prop="id"></el-table-column>
|
|
|
- <el-table-column label="姓名" align="center" prop="nickName"></el-table-column>
|
|
|
- <el-table-column label="手机号" align="center" prop="phone"></el-table-column>
|
|
|
+ <el-table-column label="姓名" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.nickName||'--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="手机号" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.phone||'--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div style="margin-top: 20px;text-align: right;">
|
|
|
<el-pagination background @size-change="handleSizeChangeDialog"
|
|
@@ -109,7 +117,7 @@ import { formatDate } from "@/utils/date";
|
|
|
const defaultListQuery = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- admin_user_id: null,
|
|
|
+ userId: null,
|
|
|
nickName: null,
|
|
|
phone: null,
|
|
|
registerStartTime: '',
|
|
@@ -118,7 +126,7 @@ const defaultListQuery = {
|
|
|
const dialogDefaultListQuery = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- admin_user_id: null,
|
|
|
+ userId: null,
|
|
|
};
|
|
|
export default {
|
|
|
name: "userList",
|
|
@@ -164,6 +172,7 @@ export default {
|
|
|
methods: {
|
|
|
// 设置分销
|
|
|
get_settingType(idnex, row) {
|
|
|
+ if(row.phone===null) return this.$message.warning("手机号为空,不可设置");
|
|
|
this.$confirm("是否确认?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -191,8 +200,8 @@ export default {
|
|
|
|
|
|
// 查看绑定用户
|
|
|
checkBindUser(index, row) {
|
|
|
- this.listQuery.admin_user_id = row.id;
|
|
|
- this.dialogListQuery.admin_user_id = row.id;
|
|
|
+ this.listQuery.userId = row.id;
|
|
|
+ this.dialogListQuery.userId = row.id;
|
|
|
this.forbiddenDialogVisible = true;
|
|
|
this.getList();
|
|
|
},
|
|
@@ -200,7 +209,7 @@ export default {
|
|
|
this.listQuery = Object.assign({}, defaultListQuery);
|
|
|
},
|
|
|
handleSearchList() {
|
|
|
- this.listQuery.admin_user_id = null
|
|
|
+ this.listQuery.userId = null
|
|
|
this.listQuery.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
@@ -227,11 +236,11 @@ export default {
|
|
|
handleClose() {
|
|
|
this.forbiddenDialogVisible = false;
|
|
|
this.dialogListQuery.pageNum = 1;
|
|
|
- this.listQuery.admin_user_id = null
|
|
|
+ this.listQuery.userId = null
|
|
|
},
|
|
|
|
|
|
getList() {
|
|
|
- if (this.listQuery.admin_user_id == null) {
|
|
|
+ if (this.listQuery.userId == null) {
|
|
|
this.listLoading = true;
|
|
|
userList(this.listQuery).then((response) => {
|
|
|
this.listLoading = false;
|
|
@@ -251,8 +260,9 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-.icon {
|
|
|
- width: 60px;
|
|
|
- height: 60px;
|
|
|
+.tips{
|
|
|
+ font-size: 14px;
|
|
|
+ color: red;
|
|
|
+ margin-left: 20px;
|
|
|
}
|
|
|
</style>
|