内容修改

This commit is contained in:
sliverber 2024-02-06 19:25:23 +08:00
parent b066f3a307
commit 624dcf3531
2 changed files with 718 additions and 4 deletions

View File

@ -58,9 +58,9 @@
<template slot-scope="scope">
<el-button type="text" size="small" @click="edit(scope.row)" class="mr10"
v-hasPermi="['admin:channel:update']">编辑</el-button>
<el-button type="text" size="small" @click="edit(scope.row)" class="mr10"
<el-button type="text" size="small" @click="copyurl(scope.row.url)" class="mr10"
v-hasPermi="['admin:channel:update']">复制链接</el-button>
<el-button type="text" size="small" @click="edit(scope.row)" class="mr10"
<el-button type="text" size="small" @click="copyurl(scope.row)" v-show="false" class="mr10"
v-hasPermi="['admin:channel:update']">账号密码复制</el-button>
<el-button type="text" size="small" @click="showdlg(scope.row)" class="mr10"
v-hasPermi="['admin:channel:update']">查看</el-button>
@ -261,6 +261,16 @@ export default {
});
},
copyurl(url){
console.log(url);
navigator.clipboard.writeText(url)
.then(() => {
console.log('URL已成功复制到剪贴板');
})
.catch(err => {
console.error('无法复制URL到剪贴板:', err);
});
},
getuserlist(){
Listuser(this.userPrams)
.then((res) => {

View File

@ -312,8 +312,8 @@
</el-table-column>
<el-table-column label="操作" min-width="120" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="edit(scope.row)" class="mr10"
>查看用户详情</el-button>
<el-button type="text" size="small" @click="getuserinfo(scope.row.uid)" class="mr10"
>查看用户详情11</el-button>
</template>
</el-table-column>
@ -323,6 +323,154 @@
layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
@current-change="pageChange" />
</div>
<el-dialog title=""
:visible.sync="dialogVisibles"
width="1388px"
:before-close="loghandleClose">
<div class="detailbox" v-if="dialogVisibles">
<div class="titbox">
<div class="tit"
v-for="(item, index) in detaillist"
:key="index"
:class="detailindex == index ? 'act' : ''"
@click="changeindex(index)">{{ item.tit }}</div>
</div>
<div class="info_box"
v-show="detailindex == 0">
<div class="info">
<div class="infoli">用户姓名{{ userinfo.detailinfo.realName }}</div>
<div class="infoli">手机号{{ userinfo.detailinfo.phoneNumber }}</div>
<div class="infoli">邮箱{{userinfo.detailinfo.email }}</div>
<div class="infoli">身份证号{{userinfo.detailinfo.idCardNumber }}</div>
</div>
<div class="tit">
订单
</div>
<!-- <a @click="downloadAndOpenPDF" href="#">下载并打开PDF文件</a> -->
<div class="info">
<div class="infoli">总计订单{{ userinfo.detailinfo.allOrderCount }} </div>
<div class="infoli">总金额{{ userinfo.detailinfo.totalPendingRepayment }} </div>
<div class="infoli">待还金额{{ userinfo.detailinfo.allConsumeCount }} </div>
</div>
<div class="tit">
身份证照片
</div>
<div class="info">
<div class="infoimg" style="justify-content: start;">
<!-- <div class="infoimg_box">
<div class="noimg">手持身份证照片</div>
<img src=""
alt=""
v-show="false">
<div class="text">手持身份证照片</div>
</div> -->
<div class="infoimg_box" style="margin-right: 200px;">
<div class="noimg" v-show="userinfo.detailinfo.idCardFrontPhoto==null">身份证正面</div>
<img :src="userinfo.detailinfo.idCardFrontPhoto"
alt=""
v-show="userinfo.detailinfo.idCardFrontPhoto!=''">
<div class="text">身份证正面</div>
</div>
<div class="infoimg_box">
<div class="noimg" v-show="userinfo.detailinfo.idCardBackPhoto==null">身份证反面</div>
<img :src="userinfo.detailinfo.idCardBackPhoto"
alt=""
v-show="userinfo.detailinfo.idCardBackPhoto!=''">
<div class="text">身份证反面</div>
</div>
</div>
</div>
<div class="tit">
收货地址
</div>
<div class="addbox">
<div class="addli" v-for="(item,index) in userinfo.detailinfo.addresses" :key="index">
<div class="addtxt">
姓名{{ item.realName}}
</div>
<div class="addtxt">
手机号{{ item.phone}}
</div>
<div class="addtxt">
收件地址{{ item.city}} {{ item.district }}{{ item.detail }}
</div>
</div>
</div>
<div class="tit">
IP记录
</div>
<div class="info" v-for="(item,index) in userinfo.detailinfo.ips" :key="index">
<div class="infoli">{{ item.loginTime }}</div>
<div class="infoli">{{ item.ipaddr }}</div>
<!-- <div class="infoli">福建省 福鼎市</div> -->
</div>
</div>
<div class="fkbox"
v-if="detailindex == 3 && userinfo.tlxinfo && userinfo.zwxinfo" >
<div class="titbox"
style="justify-content: center;margin-top: 10px;">
<div class="tit"
:class="fkxindex == 0 ? 'act' : ''" @click="fkxindex=0">
天狼星报告
</div>
<div class="tit"
:class="fkxindex == 1 ? 'act' : ''" @click="fkxindex=1">
紫微星报告
</div>
</div>
<div v-show="fkxindex == 0">
<img :src="userinfo.tlxinfo.url" alt="" v-show="userinfo.tlxinfo.url!=null">
<div class="noreport">
<div class="tip" v-show="userinfo.tlxinfo.url==null">暂无报告</div>
<div class="btn" v-show="userinfo.tlxinfo.url==null" @click="tlxReport()">获取报告</div>
<div class="btn" v-show="userinfo.tlxinfo.url!=null" @click="tlxReport()">重新获取报告</div>
</div>
</div>
<div v-show="fkxindex == 1">
<img :src="userinfo.zwxinfo.url" alt="" v-show="userinfo.zwxinfo.url!=null">
<div class="noreport">
<div class="tip" v-show="userinfo.zwxinfo.url==null">暂无报告</div>
<div class="btn" v-show="userinfo.zwxinfo.url==null" @click="zwxReport()">获取报告</div>
<div class="btn" v-show="userinfo.zwxinfo.url!=null" @click="zwxReport()">重新获取报告</div>
</div>
</div>
</div>
<div class="zdbox" v-if="detailindex!=0 && userinfo && detailindex!=3 " style="width: 1500px;">
<el-col :span="20">
<el-table :data="tableDatas.data" style="width: 1200px;" v-loading="loading" max-height="700">
<el-table-column
:prop="item.key"
:label="item.title"
width="item.minWidth"
:show-overflow-tooltip="true"
v-for="(item, index) in columns"
:key="index"
/>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[6, 12, 18, 24]"
:page-size="tableFroms.limit"
:current-page="tableFroms.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableDatas.total"
@size-change="handleSizeChanges"
@current-change="pageChanges"
/>
</div>
</el-col>
</div>
</div>
</el-dialog>
</el-card>
<div class="card_abs" v-show="card_select_show" :style="{ top: collapse ? 570 + 'px' : 270 + 'px' }">
<template>
@ -455,6 +603,10 @@ import * as logistics from '@/api/logistics.js';
import Cookies from 'js-cookie';
import { checkPermi } from '@/utils/permission'; //
import { Debounce } from '@/utils/validate';
import { integralListApi } from '@/api/marketing';
import {
getIdentityInfos,getZwxReportCache,getTlxReportCache,infobyconditionApi,getZwxReport,getTlxReport
} from '@/api/user'
export default {
name: 'UserIndex',
components: { editFrom, userDetails, userList, levelEdit, userIdentity },
@ -476,6 +628,29 @@ export default {
spreadUid: '',
userId: '',
},
detailindex: 0,
userinfo:[
],
fkxindex: 0,
columns: [],
tableDatas: {
data: [],
total: 0,
},
detaillist: [
{ tit: '用户基础信息 ' },
{ tit: ' 订单记录 ' },
{ tit: '账单列表 ' },
{ tit: '分险报告 ' },
{ tit: '余额变动 ' },
{ tit: '好友关系 ' },
{ tit: '积分明细 ' },
{ tit: '签到记录 ' },
{ tit: '持有优惠券 ' },
],
dialogVisibles: false,
ruleInline: {},
extensionVisible: false,
userVisible: false,
@ -557,6 +732,12 @@ export default {
dynamicValidateForm: {
groupId: [],
},
tableFroms: {
page: 1,
limit: 6,
type: '0',
userId: '',
},
loading: false,
groupIdFrom: [],
selectionList: [],
@ -614,6 +795,337 @@ export default {
this.$message.info('取消输入');
});
},
handleSizeChanges(val) {
this.tableFroms.limit = val;
if(this.detailindex==6){
this.integral()
}else{
this.getInfos();
}
},
pageChanges(page) {
this.tableFroms.page = page;
if(this.detailindex==6){
this.integral()
}else{
this.getInfos();
}
},
getuserinfo(id){
console.log('idididdidi',id);
this.detailindex=0
this.uid=id
this.tableFroms.userId=id
getIdentityInfos(id)
.then((res) => {
let detailinfo={}
detailinfo= res
this.userinfo.detailinfo=detailinfo
this.dialogVisibles=true
})
.catch((res) => {
this.loading = false;
});
getTlxReportCache(id)
.then((res) => {
this.userinfo.tlxinfo=res
})
.catch((res) => {
});
getZwxReportCache(id)
.then((res) => {
this.userinfo.zwxinfo=res
})
.catch((res) => {
});
console.log(this.userinfo,'detailinfodetailinfodetailinfo');
},
changeindex(index) {
this.detailindex = index
if(index==2){
this.tableFroms.type='6'
this.getInfos()
}else if(index==1){
this.tableFroms.type='0'
this.getInfos()
}else if(index==4){
this.tableFroms.type='4'
this.getInfos()
}else if(index==5){
this.tableFroms.type='5'
this.getInfos()
}else if(index==6){
// this.tableFroms.type='2'
this.integral()
}else if(index==7){
this.tableFroms.type='2'
this.getInfos()
}else if(index==8){
this.tableFroms.type='3'
this.getInfos()
}
},
integral() {
// this.loading = true;
integralListApi({ limit: this.tableFroms.limit, page: this.tableFroms.page }, { uid: this.uid })
.then((res) => {
this.tableDatas.data = res.list;
this.tableDatas.total = res.total;
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120,
},
{
title: '积分变化',
key: 'integral',
minWidth: 120,
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120,
},
{
title: '日期',
key: 'updateTime',
minWidth: 120,
},
{
title: '备注',
key: 'mark',
minWidth: 120,
},
];
this.loading = false;
})
.catch((res) => {
this.loading = false;
});
},
getInfos(){
infobyconditionApi(this.tableFroms)
.then((res) => {
this.tableDatas.data = res.list;
this.tableDatas.total = res.total;
console.log( this.tableDatas,' this.tableDatas this.tableDatas');
switch (this.tableFroms.type) {
case '0':
this.columns = [
{
title: '订单ID',
key: 'orderId',
minWidth: 250,
},
{
title: '收货人',
key: 'realName',
minWidth: 90,
},
{
title: '商品数量',
key: 'totalNum',
minWidth: 80,
},
{
title: '商品总价',
key: 'totalPrice',
minWidth: 90,
},
{
title: '实付金额',
key: 'payPrice',
minWidth: 90,
},
{
title: '交易完成时间',
key: 'payTime',
minWidth: 160,
},
];
break;
case '2':
this.columns = [
{
title: '动作',
key: 'title',
minWidth: 120,
},
{
title: '获得积分',
key: 'number',
minWidth: 120,
},
{
title: '签到时间',
key: 'createTime',
minWidth: 120,
},
{
title: '备注',
key: 'title',
minWidth: 120,
},
];
break;
case '3':
this.columns = [
{
title: '优惠券名称',
key: 'name',
minWidth: 120,
},
{
title: '面值',
key: 'money',
minWidth: 120,
},
{
title: '有效期',
key: 'endTime',
minWidth: 120,
},
{
title: '最低消费额',
key: 'minPrice',
minWidth: 120,
},
{
title: '兑换时间',
key: 'updateTime',
minWidth: 120,
},
];
break;
case '4':
this.columns = [
{
title: '变动金额',
key: 'number',
minWidth: 120,
},
{
title: '变动后',
key: 'balance',
minWidth: 120,
},
{
title: '类型',
key: 'title',
minWidth: 120,
},
{
title: '创建时间',
key: 'add_time',
minWidth: 120,
},
{
title: '备注',
key: 'mark',
minWidth: 120,
},
];
break;
case '5':
this.columns = [
{
title: 'ID',
key: 'uid',
minWidth: 120,
},
{
title: '昵称',
key: 'nickname',
minWidth: 120,
},
{
title: '等级',
key: 'level',
minWidth: 120,
},
{
title: '加入时间',
key: 'createTime',
minWidth: 120,
},
];
break;
default:
this.columns = [
{
title: '账单ID',
key: 'id',
minWidth: 50,
},
{
title: '订单号',
key: 'orderIdStr',
minWidth: 200,
},
{
title: '期数',
key: 'installmentNumberStr',
minWidth: 30,
},
{
title: '还款时间',
key: 'repaymentDeadlineStr',
minWidth: 180,
},
{
title: '还款金额(元)',
key: 'repaymentAmount',
minWidth: 100,
},
{
title: '还款方式',
key: 'paymentMethod',
minWidth: 80,
},
{
title: '状态',
key: 'repaymentStatus',
minWidth: 80,
},
{
title: '创建时间',
key: 'createTime',
minWidth: 180,
},
];
}
})
.catch(() => {
});
},
tlxReport(){
console.log("获取天狼星报告")
getTlxReport({ userId: this.uid }).then((res) => {
// console.log("11111111111111111---------"+JSON.stringify(res))
this.userinfo.tlxinfo=res
this.$forceUpdate()
});
},
zwxReport(){
console.log("获取紫微星报告")
getZwxReport({ userId: this.uid }).then((res) => {
this.userinfo.zwxinfo=res
this.$forceUpdate()
});
},
loghandleClose() {
this.dialogVisibles = false;
},
//
clearSpread(row) {
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
@ -1093,7 +1605,199 @@ export default {
.selWidth {
width: 100% !important;
}
.detailbox::-webkit-scrollbar {
width: 10px;
}
.detailbox::-webkit-scrollbar-track {
background-color: #FFFFFF;
}
.detailbox::-webkit-scrollbar-thumb {
background-color: #EAF4FF;
border-radius: 10px;
// height: .625rem;
}
.detailbox::-webkit-scrollbar-thumb:hover {
background-color: #EAF4FF;
}
.detailbox {
padding: 10px 60px;
width: 100%;
max-height: 670px;
overflow-x: hidden;
overflow-y: auto;
min-height: 600px;
.titbox {
display: flex;
flex-wrap: nowrap;
align-items: center;
.tit {
margin-right: 20px;
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
color: #9B9B9B;
cursor: pointer;
}
.act {
color: #3D3D3D;
font-size: 24px;
}
}
.info_box {
margin-top: 25px;
width: 100%;
.info {
display: flex;
flex-wrap: wrap;
.infoli {
width: 33%;
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #3D3D3D;
line-height: 50px;
}
.infoimg {
width: 100%;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.infoimg_box {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 305px;
.noimg {
display: flex;
align-items: center;
justify-content: center;
width: 305px;
height: 181px;
background: #D8D8D8;
border-radius: 10px 10px 10px 10px;
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #959595;
}
img {
width: 305px;
height: 181px;
border-radius: 10px 10px 10px 10px;
}
.text {
margin-top: 10px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #3A3A3A;
}
}
}
}
.tit {
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
color: #3D3D3D;
line-height: 50px;
}
.addbox {
display: flex;
flex-wrap: wrap;
.addli {
display: flex;
flex-wrap: nowrap;
.addtxt {
margin-right: 20px;
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #3D3D3D;
line-height: 50px;
}
}
}
}
.fkbox {
.titbox {
display: flex;
flex-wrap: nowrap;
align-items: center;
.tit {
margin-right: 30px;
font-size: 18px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
color: #9B9B9B;
cursor: pointer;
}
.act {
color: #3D3D3D;
font-size: 22px;
}
}
img {
width: 100%;
height: auto;
}
.noreport {
display: flex;
flex-wrap: wrap;
justify-content: center;
.tip {
margin-top: 200px;
width: 100%;
font-size: 35px;
text-align: center;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #CDCDCD;
}
.btn {
margin-top: 70px;
display: flex;
align-items: center;
justify-content: center;
width: 216px;
height: 50px;
background: #468DFF;
border-radius: 10px 10px 10px 10px;
font-size: 20px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
color: #FFFFFF;
}
}
}
}
.seachTiele {
line-height: 30px;
}