新增 用户信息-客服/赠送 VIP-客服
This commit is contained in:
@@ -31,4 +31,12 @@ export const vipSendSend = query => {
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 赠送VIP接口 - 客服
|
||||
export const vipSendSendCustomerSend = query => {
|
||||
return request({
|
||||
url: '/vipSend/customerSend',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
18
src/api/users/UserInformationCustomer.js
Normal file
18
src/api/users/UserInformationCustomer.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取用户充值等级列表
|
||||
export const getUserCheckAdmin = query => {
|
||||
return request({
|
||||
url: '/admin/userCheckAdmin/getUser',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 修改用户等级
|
||||
export const changeUserExpChange = query => {
|
||||
return request({
|
||||
url: '/userExpChange/change',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
225
src/views/users/UserInformationCustomer.vue
Normal file
225
src/views/users/UserInformationCustomer.vue
Normal file
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>用户ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<!-- 表格数据 -->
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||
<el-table-column prop="erbanNo" align="center" label="财富等级" >
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.userLevelVo.experLevelName + '(' + scope.row.userLevelVo.experAmount + ')'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="魅力等级" >
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.userLevelVo.charmLevelName + '(' + scope.row.userLevelVo.charmAmount + ')'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" >
|
||||
<template v-slot="scope">
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
detailPageFun(scope.row);
|
||||
"
|
||||
size="default"
|
||||
>编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 弹窗 -->
|
||||
<el-dialog v-model="remarkDialog" title="编辑" width="25%" center>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex;align-items: center;">
|
||||
<span
|
||||
style="display: inline-block;"
|
||||
class="col-sm-3 control-label"
|
||||
>财富等级:</span
|
||||
>
|
||||
{{experLevelName}}
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-left: 30px;"
|
||||
@click="
|
||||
changePageFun(2);
|
||||
"
|
||||
>编辑</el-button>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex;align-items: center;">
|
||||
<span
|
||||
style="display: inline-block;"
|
||||
class="col-sm-3 control-label"
|
||||
>魅力等级:</span
|
||||
>
|
||||
{{charmLevelName}}
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-left: 30px;"
|
||||
@click="
|
||||
changePageFun(1);
|
||||
"
|
||||
>编辑</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="remarkDialog = false">取消</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 填写弹窗 -->
|
||||
<el-dialog v-model="changeDialog" :title="typeChange == 2?'财富等级修改':'魅力等级修改'" width="25%" center>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex;align-items: center;">
|
||||
<span
|
||||
style="display: inline-block;"
|
||||
class="col-sm-3 control-label"
|
||||
>当前等级:</span
|
||||
>
|
||||
{{typeChange == 2?experLevelName:charmLevelName}}
|
||||
</div>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-3 control-label"
|
||||
>更改等级</span
|
||||
>
|
||||
<el-input
|
||||
v-model="newLevelSeq"
|
||||
placeholder="请输入"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="changeDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmChangeFun()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "UserInformationCustomer",
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { getUserCheckAdmin,changeUserExpChange} from "@/api/users/UserInformationCustomer.js"
|
||||
|
||||
const formData = reactive({
|
||||
erbanNo: "",
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
const remarkDialog = ref(false);
|
||||
const charmLevelName = ref('');
|
||||
const experLevelName = ref('');
|
||||
const typeChange = ref(0);
|
||||
const changeDialog = ref(false);
|
||||
const newLevelSeq = ref('');
|
||||
const uid = ref('');
|
||||
|
||||
// 查询
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
getUserCheckAdmin(formData).then((res) => {
|
||||
if (res.code == 200) {
|
||||
tableData.data.push(res.data);
|
||||
tableData.total = res.data.total;
|
||||
tableData.loading = false;
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
const detailPageFun = (row) => {
|
||||
experLevelName.value =row.userLevelVo.experLevelName + '(' +row.userLevelVo.experAmount + ')';
|
||||
charmLevelName.value =row.userLevelVo.charmLevelName + '(' +row.userLevelVo.charmAmount + ')';
|
||||
remarkDialog.value =true;
|
||||
uid.value =row.uid;
|
||||
};
|
||||
const changePageFun = (val) => {
|
||||
typeChange.value = val;
|
||||
changeDialog.value =true;
|
||||
};
|
||||
const confirmChangeFun = () => {
|
||||
changeUserExpChange({
|
||||
uid:uid.value,type:typeChange.value,newLevelSeq:newLevelSeq.value
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
message: "修改成功",
|
||||
type: "success",
|
||||
});
|
||||
changeDialog.value =false;
|
||||
remarkDialog.value =false;
|
||||
newLevelSeq.value = '';
|
||||
tableData.data = [];
|
||||
getData();
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.selectBoxImg {
|
||||
height: 150px;
|
||||
}
|
||||
</style>
|
370
src/views/vip/VipGiveCustomer.vue
Normal file
370
src/views/vip/VipGiveCustomer.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>ID</span>
|
||||
<el-input
|
||||
v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询
|
||||
</el-button>
|
||||
<el-button class="primary" type="primary" @click="editDialog = true"
|
||||
>赠送VIP
|
||||
</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="erbanNo" align="center" label="平台号" />
|
||||
<el-table-column prop="nick" align="center" label="昵称" />
|
||||
<el-table-column
|
||||
prop="registerTime"
|
||||
align="center"
|
||||
label="用户注册时间"
|
||||
/>
|
||||
<el-table-column prop="createTime" align="center" label="赠送贵族时间" />
|
||||
<el-table-column prop="vipLevel" align="center" label="赠送贵族等级">
|
||||
<template v-slot="scope">VIP{{ scope.row.vipLevel }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adminName" align="center" label="操作人" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 赠送VIP弹窗 -->
|
||||
<el-dialog
|
||||
v-model="editDialog"
|
||||
title="赠送VIP(点击确认直接赠送,请认真核对谨慎操作!!)"
|
||||
width="36%"
|
||||
center
|
||||
>
|
||||
<!-- 赠送用户平台ID -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>赠送用户平台ID</span
|
||||
>
|
||||
<el-input
|
||||
v-model="editObj.userId"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请输入赠送用户平台ID"
|
||||
@input="inputFun()"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 赠送等级 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>赠送VIP等级</span
|
||||
>
|
||||
<el-select v-model="editObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in editObj.options"
|
||||
:key="item.vipLevel"
|
||||
:label="item.vipName"
|
||||
:value="item.vipLevel"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 赠送天数 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>赠送天数</span
|
||||
>
|
||||
<el-select v-model="editObj.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in editObj.options2"
|
||||
:key="item.day"
|
||||
:label="item.dayName"
|
||||
:value="item.day"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- 用户昵称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>用户昵称</span
|
||||
>
|
||||
<el-input
|
||||
v-model="editObj.nick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请先输入用户平台id"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 用户地区 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>用户地区</span
|
||||
>
|
||||
<el-input
|
||||
v-model="editObj.region"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请先输入用户平台id"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 用户注册时间 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>用户注册时间</span
|
||||
>
|
||||
<el-input
|
||||
v-model="editObj.time"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请先输入用户平台id"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="editDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="editDialogClick()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getByErbanNo,
|
||||
listAll,
|
||||
pageRecord,
|
||||
vipSendSendCustomerSend,
|
||||
} from "@/api/VipGive/VipGive";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "VipGiveCustomer",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
userId: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 赠送VIP
|
||||
editDialog: false,
|
||||
timeout: "",
|
||||
editObj: {
|
||||
userId: "",
|
||||
value: "",
|
||||
options: [
|
||||
{
|
||||
vipLevel: 1,
|
||||
vipName: "VIP1",
|
||||
},
|
||||
{
|
||||
vipLevel: 2,
|
||||
vipName: "VIP2",
|
||||
},
|
||||
{
|
||||
vipLevel: 3,
|
||||
vipName: "VIP3",
|
||||
},
|
||||
{
|
||||
vipLevel: 4,
|
||||
vipName: "VIP4",
|
||||
},
|
||||
{
|
||||
vipLevel: 5,
|
||||
vipName: "VIP5",
|
||||
},
|
||||
],
|
||||
value2: "",
|
||||
options2: [
|
||||
{
|
||||
dayName: "1天",
|
||||
day: 1,
|
||||
},
|
||||
{
|
||||
dayName: "3天",
|
||||
day: 3,
|
||||
},
|
||||
{
|
||||
dayName: "5天",
|
||||
day: 5,
|
||||
},
|
||||
{
|
||||
dayName: "7天",
|
||||
day: 7,
|
||||
},
|
||||
{
|
||||
dayName: "15天",
|
||||
day: 15,
|
||||
},
|
||||
{
|
||||
dayName: "30天",
|
||||
day: 30,
|
||||
},
|
||||
],
|
||||
nick: "",
|
||||
time: "",
|
||||
region: "",
|
||||
uid: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
// listAll().then((res) => {
|
||||
// this.editObj.options = res.data;
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
pageRecord({
|
||||
erbanNo: this.inquire.userId,
|
||||
current: this.currentPage,
|
||||
size: this.pageSize,
|
||||
ads: 1,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 监听弹窗用户id输入
|
||||
inputFun() {
|
||||
var than = this;
|
||||
clearTimeout(than.timeout);
|
||||
than.timeout = setTimeout(function () {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "查询中~",
|
||||
type: "warning",
|
||||
});
|
||||
getByErbanNo({
|
||||
erbanNo: than.editObj.userId,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
than.editObj.nick = res.data.nick;
|
||||
than.editObj.region = res.data.partitionName;
|
||||
than.editObj.time = res.data.createTime;
|
||||
than.editObj.uid = res.data.uid;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "查询成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
// 赠送按钮
|
||||
editDialogClick() {
|
||||
vipSendSendCustomerSend({
|
||||
uid: this.editObj.uid,
|
||||
vipLevel: this.editObj.value,
|
||||
days: this.editObj.value2,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "赠送成功",
|
||||
type: "success",
|
||||
});
|
||||
this.editDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user