|
|
@ -7,32 +7,6 @@ import axios from 'axios' |
|
|
|
import request from '@/util/http' |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
// 变量 |
|
|
|
// 这是动态表头, |
|
|
|
const columnOptions = ref([ |
|
|
|
{ prop: 'username', label: '姓名', width: 125 }, |
|
|
|
{ prop: 'jwcode', label: '精网号', width: 125 }, |
|
|
|
{ prop: 'area', label: '所属地区', width: 125 }, |
|
|
|
{ prop: 'activityName', label: '活动名称', width: 150 }, |
|
|
|
{ prop: 'rechargeGold', label: '充值金额', width: 125, sortable: true }, |
|
|
|
{ prop: 'rechargeWay', label: '充值方式', width: 125 }, |
|
|
|
{ prop: 'paidGold', label: '永久金币', width: 125, sortable: true }, |
|
|
|
{ prop: 'freeGold', label: '免费金币', width: 125, sortable: true }, |
|
|
|
{ prop: 'remark', label: '备注', width: 200, showOverflowTooltip: true }, |
|
|
|
{ prop: 'payWay', label: '支付方式', width: 125 }, |
|
|
|
{ prop: 'rechargeVoucher', label: '支付凭证', width: 125 }, |
|
|
|
{ prop: 'name', label: '提交人', width: 125 }, |
|
|
|
{ prop: 'status', label: '审核状态', width: 125 }, |
|
|
|
{ prop: 'reson', label: '驳回理由', width: 200 }, |
|
|
|
{ prop: 'rechargeTime', label: '交款时间', width: 200, sortable: true }, |
|
|
|
{ prop: 'createTime', label: '提交时间', width: 200, sortable: true }, |
|
|
|
{ prop: 'auditTime', label:'审核时间', width:200, sortable:true} |
|
|
|
]) |
|
|
|
|
|
|
|
// 默认显示 |
|
|
|
const defaultColumns = ['username', 'jwcode', 'area', 'activityName', 'rechargeGold', 'rechargeWay', 'paidGold', 'freeGold', |
|
|
|
'remark', 'payWay', 'rechargeVoucher', 'name', 'status', 'reson', 'rechargeTime', 'createTime', 'auditTime'] |
|
|
|
const selectedColumns = ref([...defaultColumns]) |
|
|
|
//这是获取用户信息的接口 |
|
|
|
const adminData = ref({}) |
|
|
|
const getAdminData = async function () { |
|
|
@ -42,7 +16,6 @@ const getAdminData = async function () { |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
adminData.value = result |
|
|
|
console.log('请求成功', result) |
|
|
|
console.log('用户信息', adminData.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
@ -52,7 +25,6 @@ const getAdminData = async function () { |
|
|
|
// 充值明细表格 |
|
|
|
const tableData = ref([]) |
|
|
|
// 搜索====================================== |
|
|
|
// 搜索rechargeVo |
|
|
|
const rechargeVo = ref({ |
|
|
|
rechargeWay: '客服充值' |
|
|
|
}) |
|
|
@ -67,22 +39,16 @@ const total = ref(100) |
|
|
|
const getTime = ref([]) |
|
|
|
// 搜索活动列表 |
|
|
|
const activity = ref([]) |
|
|
|
// 所有信息 |
|
|
|
const allData = ref([]) |
|
|
|
// 搜索地区列表 |
|
|
|
const area = ref([]) |
|
|
|
|
|
|
|
// 编辑====================================== |
|
|
|
// 驳回弹出框 |
|
|
|
const rejectVisible = ref(false) |
|
|
|
// 驳回对象 |
|
|
|
const rejectObj = ref({}) |
|
|
|
// 通过对象 |
|
|
|
const passObj = ref({}) |
|
|
|
|
|
|
|
//标签页默认高亮选项 |
|
|
|
const activeName = ref('all') |
|
|
|
|
|
|
|
//标签页默认是待审批 |
|
|
|
const activeName = ref('wait') |
|
|
|
// 支付方式选项 |
|
|
|
const payWay = [ |
|
|
|
{ |
|
|
@ -106,23 +72,16 @@ const payWay = [ |
|
|
|
label: '借记卡' |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
// //表格高度 |
|
|
|
// const tableHeight = computed(function () { |
|
|
|
// return (getObj.value.pageSize + 2) * 60 + "px"; |
|
|
|
// }); |
|
|
|
|
|
|
|
// 表单验证ref |
|
|
|
const Ref = ref(null) |
|
|
|
|
|
|
|
// 方法 |
|
|
|
// 合计数存储 |
|
|
|
// 统计合计数 |
|
|
|
const trueGold = ref(0) |
|
|
|
const trueCount = ref(0) |
|
|
|
const trueRGold = ref(0) |
|
|
|
const trueFGold = ref(0) |
|
|
|
// 转化一下,保留两位小数,展示时填充转化后的变量名 |
|
|
|
// 保留两位小数 |
|
|
|
const formattedTrueGold = computed(() => trueGold.value.toFixed(2)) |
|
|
|
const formattedTrueRGold = computed(() => trueRGold.value.toFixed(2)) |
|
|
|
const formattedTrueFGold = computed(() => trueFGold.value.toFixed(2)) |
|
|
@ -144,15 +103,12 @@ const rejectedCount = ref(0) |
|
|
|
const rejectedGold = ref(0) |
|
|
|
const rejectedRGold = ref(0) |
|
|
|
const rejectedFGold = ref(0) |
|
|
|
// 搜索============================================================== |
|
|
|
// 搜索方法 |
|
|
|
const get = async function (val) { |
|
|
|
try { |
|
|
|
// 地区赋值 |
|
|
|
if (adminData.value.area === '泰国') { |
|
|
|
rechargeVo.value.areas = ['泰国', '越南'] |
|
|
|
} else if (adminData.value.area !== '总部') { |
|
|
|
rechargeVo.value.area = adminData.value.area |
|
|
|
} |
|
|
|
// 搜索参数页码赋值 |
|
|
|
if (typeof val === 'number') { |
|
|
@ -171,7 +127,6 @@ const get = async function (val) { |
|
|
|
rechargeVo.value.sortField = sortField.value |
|
|
|
rechargeVo.value.sortOrder = sortOrder.value |
|
|
|
console.log('搜索参数', getObj.value) |
|
|
|
// 发送POST请求 |
|
|
|
const result = await request({ |
|
|
|
url: '/recharge/recharge', |
|
|
|
data: { |
|
|
@ -181,16 +136,15 @@ const get = async function (val) { |
|
|
|
} |
|
|
|
}) |
|
|
|
// 合计数的接口 |
|
|
|
// 复制一份 rechargeVo.value 并移除排序字段和排序方式 |
|
|
|
const detailWithoutSort = { ...rechargeVo.value } |
|
|
|
delete detailWithoutSort.sortField |
|
|
|
delete detailWithoutSort.sortOrder |
|
|
|
delete detailWithoutSort.status |
|
|
|
// 复制一份rechargeVo.value,去掉排序和状态 |
|
|
|
const rechargeVo1 = { ...rechargeVo.value } |
|
|
|
delete rechargeVo1.sortField |
|
|
|
delete rechargeVo1.sortOrder |
|
|
|
delete rechargeVo1.status |
|
|
|
const result2 = await request({ |
|
|
|
url: '/recharge/recharge/RechargeA', |
|
|
|
data: detailWithoutSort |
|
|
|
data: rechargeVo1 |
|
|
|
}) |
|
|
|
// 做一个判断,如果result2.data[i].flag="待审核",那么 totalData.value = result2.data[i],否则就赋值为0 |
|
|
|
// 统计合计数 |
|
|
|
if (result2.data) { |
|
|
|
result2.data.forEach((item) => { |
|
|
@ -220,16 +174,11 @@ const get = async function (val) { |
|
|
|
} |
|
|
|
|
|
|
|
trueGold.value = pendingGold.value + approvedGold.value + rejectedGold.value |
|
|
|
trueCount.value = |
|
|
|
pendingCount.value + approvedCount.value + rejectedCount.value |
|
|
|
trueRGold.value = |
|
|
|
pendingRGold.value + approvedRGold.value + rejectedRGold.value |
|
|
|
trueFGold.value = |
|
|
|
pendingFGold.value + approvedFGold.value + rejectedFGold.value |
|
|
|
trueCount.value = pendingCount.value + approvedCount.value + rejectedCount.value |
|
|
|
trueRGold.value = pendingRGold.value + approvedRGold.value + rejectedRGold.value |
|
|
|
trueFGold.value = pendingFGold.value + approvedFGold.value + rejectedFGold.value |
|
|
|
|
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log('请求成功', result) |
|
|
|
console.log('这是分页', getObj.value) |
|
|
|
console.log('搜索对象', getObj.value) |
|
|
|
// 存储表格数据 |
|
|
|
tableData.value = result.data.list |
|
|
|
console.log('tableData', tableData.value) |
|
|
@ -238,7 +187,6 @@ const get = async function (val) { |
|
|
|
console.log('total', total.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
} |
|
|
|
// 搜索 |
|
|
@ -309,13 +257,6 @@ const get7Days = function () { |
|
|
|
console.log('getTime', getTime.value) |
|
|
|
get() |
|
|
|
} |
|
|
|
//全部充值明细 |
|
|
|
const adminAll = function () { |
|
|
|
console.log('adminAll') |
|
|
|
rechargeVo.value.status = '' |
|
|
|
getObj.value.pageNum = 1 |
|
|
|
get() |
|
|
|
} |
|
|
|
//待审核充值明细 |
|
|
|
const adminWait = async function () { |
|
|
|
rechargeVo.value.status = 0 |
|
|
@ -349,11 +290,9 @@ const adminReject = async function () { |
|
|
|
trueRGold.value = rejectedRGold.value |
|
|
|
trueFGold.value = rejectedFGold.value |
|
|
|
} |
|
|
|
//点击标签页 |
|
|
|
|
|
|
|
const handleClick = function (tab, event) { |
|
|
|
if (tab.props.name === 'all') { |
|
|
|
adminAll() |
|
|
|
} else if (tab.props.name === 'wait') { |
|
|
|
if (tab.props.name === 'wait') { |
|
|
|
adminWait() |
|
|
|
} else if (tab.props.name === 'pass') { |
|
|
|
adminPass() |
|
|
@ -361,67 +300,30 @@ const handleClick = function (tab, event) { |
|
|
|
adminReject() |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取活动名称 |
|
|
|
|
|
|
|
const getActivity = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await request({ |
|
|
|
url: '/recharge/activity/select', |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
|
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log('请求成功', result) |
|
|
|
// 存储表格数据 |
|
|
|
activity.value = result.data |
|
|
|
console.log('activity', activity.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取地区 |
|
|
|
// 地区下拉框 |
|
|
|
const getArea = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await request({ |
|
|
|
url: '/recharge/user/search', |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log('请求成功', result) |
|
|
|
// 存储地区信息 |
|
|
|
area.value = result.data |
|
|
|
console.log('地区', area.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
} |
|
|
|
// 验证跳转输入框的数字是否合法 |
|
|
|
const checkNumber = function () { |
|
|
|
if (typeof parseInt(getObj.value.pageNum) === 'number') { |
|
|
|
console.log('总共有多少页' + Math.ceil(total.value / getObj.value.pageSize)) |
|
|
|
if ( |
|
|
|
getObj.value.pageNum > 0 && |
|
|
|
getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize) |
|
|
|
) { |
|
|
|
console.log('输入的数字合法') |
|
|
|
getObj.value.pageNum = parseInt(getObj.value.pageNum) |
|
|
|
get() |
|
|
|
} else { |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请检查输入内容' |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请检查输入内容' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
const handlePageSizeChange = function (val) { |
|
|
@ -462,10 +364,7 @@ const passConfirm = async function () { |
|
|
|
url: '/audit/audit/goldedit', |
|
|
|
data: passObj.value |
|
|
|
}) |
|
|
|
|
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log('请求成功', result) |
|
|
|
// 刷新表格数据 |
|
|
|
get() |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
@ -512,24 +411,17 @@ const rejectConfirm = async function () { |
|
|
|
url: '/audit/audit/goldedit', |
|
|
|
data: rejectObj.value |
|
|
|
}) |
|
|
|
|
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log('请求成功', result) |
|
|
|
// 刷新表格数据 |
|
|
|
get() |
|
|
|
// 关闭弹出框 |
|
|
|
closeRejectVisible() |
|
|
|
//提示 |
|
|
|
closeRejectVisible()// 关闭弹出框 |
|
|
|
ElMessage({ |
|
|
|
type: 'success', |
|
|
|
message: '驳回成功!' |
|
|
|
}) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
} else { |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请检查输入内容' |
|
|
@ -539,7 +431,6 @@ const rejectConfirm = async function () { |
|
|
|
} |
|
|
|
|
|
|
|
// 表单验证 |
|
|
|
|
|
|
|
const rules = reactive({ |
|
|
|
reson: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }] |
|
|
|
}) |
|
|
@ -568,7 +459,7 @@ const handleSortChange = (column) => { |
|
|
|
sortField.value = 'create_time' |
|
|
|
} else if (column.prop === 'paidGold') { |
|
|
|
sortField.value = 'paid_gold' |
|
|
|
}else if (column.prop === 'auditTime') { |
|
|
|
} else if (column.prop === 'auditTime') { |
|
|
|
sortField.value = 'audit_time' |
|
|
|
} |
|
|
|
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC' |
|
|
@ -586,35 +477,27 @@ const trimJwCode = () => { |
|
|
|
<template> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-card style="margin-bottom: 20px"> |
|
|
|
<el-row style="margin-bottom: 10px"> |
|
|
|
<el-card style="margin-bottom: 5px"> |
|
|
|
<el-row style="margin-bottom: 5px"> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">精网号:</el-text> |
|
|
|
<el-text size="large">精网号:</el-text> |
|
|
|
<el-input v-model="rechargeVo.jwcode" placeholder="请输入精网号" style="width: 240px" clearable /> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">活动名称:</el-text> |
|
|
|
<el-select v-model="rechargeVo.activityId" placeholder="请选择活动名称" style="width: 240px" |
|
|
|
clearable> |
|
|
|
<el-option v-for="item in activity" :key="item.activityId" :label="item.activityName" |
|
|
|
:value="item.activityId" /> |
|
|
|
<el-text size="large">活动名称:</el-text> |
|
|
|
<el-select v-model="rechargeVo.activityId" placeholder="请选择活动名称" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in activity" :key="item.activityId" :label="item.activityName" :value="item.activityId" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">支付方式:</el-text> |
|
|
|
<el-text size="large">支付方式:</el-text> |
|
|
|
<el-select v-model="rechargeVo.payWay" placeholder="请选择支付方式" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in payWay" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="head-card-element" v-if="adminData.area == '总部'"> |
|
|
|
<el-text class="mx-1" size="large">所属地区:</el-text> |
|
|
|
<el-text size="large">所属地区:</el-text> |
|
|
|
<el-select v-model="rechargeVo.area" placeholder="请选择所属地区" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in area" :key="item" :label="item" :value="item" /> |
|
|
|
</el-select> |
|
|
@ -622,38 +505,22 @@ const trimJwCode = () => { |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="16"> |
|
|
|
<div class="time-controls"> |
|
|
|
<div class="time-group"> |
|
|
|
<el-text class="mx-1" size="large">充值时间:</el-text> |
|
|
|
<el-date-picker |
|
|
|
v-model="getTime" |
|
|
|
type="datetimerange" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="起始时间" |
|
|
|
end-placeholder="结束时间" |
|
|
|
style="width: 400px" |
|
|
|
/> |
|
|
|
<el-button @click="getToday()" style="margin-left: 10px"> 今 </el-button> |
|
|
|
<el-button @click="getYesterday()" style="margin-left: 10px"> 昨 </el-button> |
|
|
|
<el-button @click="get7Days()" style="margin-left: 10px"> 近7天 </el-button> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="time-controls"> |
|
|
|
<div class="time-group"> |
|
|
|
<el-text size="large">添加时间:</el-text> |
|
|
|
<el-date-picker v-model="getTime" type="datetimerange" range-separator="至" start-placeholder="起始时间" |
|
|
|
end-placeholder="结束时间" style="width: 400px" /> |
|
|
|
<el-button @click="getToday()" style="margin-left: 10px"> 今 </el-button> |
|
|
|
<el-button @click="getYesterday()" style="margin-left: 10px"> 昨 </el-button> |
|
|
|
<el-button @click="get7Days()" style="margin-left: 10px"> 近7天 </el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
|
<el-button @click="reset()" type="success" style="margin-right: 10px">重置</el-button> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-button @click="reset()" type="success">重置</el-button> |
|
|
|
<el-button type="primary" @click="search()">查询</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="21"> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-text class="mx-1" size="large">请选择您想看到的数据:</el-text> |
|
|
|
<el-select v-model="selectedColumns" multiple placeholder="请选择您想看到的数据" size="large" style="width: 800px"> |
|
|
|
<el-option v-for="item in columnOptions" :key="item.prop" :label="item.label" :value="item.prop" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
@ -662,71 +529,49 @@ const trimJwCode = () => { |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-card> |
|
|
|
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="全部" name="all"></el-tab-pane> |
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="待审核" name="wait"></el-tab-pane> |
|
|
|
<el-tab-pane label="已通过" name="pass"></el-tab-pane> |
|
|
|
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> |
|
|
|
|
|
|
|
<div> |
|
|
|
总条数:{{ trueCount }}条,总金币数:{{ |
|
|
|
formattedTrueGold |
|
|
|
}}金币,永久金币:{{ formattedTrueRGold }}金币,免费金币:{{ formattedTrueFGold }}金币 |
|
|
|
总条数:{{ trueCount }}条 |
|
|
|
总金币数:{{ formattedTrueGold }}金币 |
|
|
|
永久金币:{{ formattedTrueRGold }}金币 |
|
|
|
免费金币:{{ formattedTrueFGold }}金币 |
|
|
|
</div> |
|
|
|
</el-tabs> |
|
|
|
<div style="height: 540px; overflow-y: auto"> |
|
|
|
<el-table :data="tableData" style="width: 100%" height="540px" @sort-change="handleSortChange" :row-style="{ height: '50px' }"> |
|
|
|
<el-table-column type="index" label="序号" width="100px" fixed="left"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize |
|
|
|
}}</span> |
|
|
|
<span>{{ scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- 动态列 --> |
|
|
|
<template v-for="col in columnOptions" :key="col.prop"> |
|
|
|
<el-table-column v-if="selectedColumns.includes(col.prop)" :prop="col.prop" :label="col.label" |
|
|
|
:width="col.width" :sortable="col.sortable ? 'custom' : false" |
|
|
|
:show-overflow-tooltip="true" > |
|
|
|
<template #default="scope"> |
|
|
|
<!-- 特殊列模板 --> |
|
|
|
<template v-if="col.prop === 'rechargeTime'"> |
|
|
|
{{ moment(scope.row.rechargeTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
<template v-else-if="col.prop === 'createTime'"> |
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
<template v-else-if="col.prop === 'auditTime'"> |
|
|
|
{{ scope.row.auditTime ? moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') : '----' }} |
|
|
|
</template> |
|
|
|
<template v-else-if="col.prop === 'remark'"> |
|
|
|
<span>{{ scope.row[col.prop] }}</span> |
|
|
|
</template> |
|
|
|
<template v-else-if="col.prop === 'rechargeVoucher'"> |
|
|
|
<el-image :src="scope.row.rechargeVoucher" style="width: 50px; height: 50px" /> |
|
|
|
</template> |
|
|
|
<template v-else-if="col.prop === 'status'"> |
|
|
|
<div class="status"> |
|
|
|
<span :class="{ |
|
|
|
'green-dot': scope.row.status === 1, |
|
|
|
'grey-dot': scope.row.status === 0, |
|
|
|
'red-dot': scope.row.status === 2 |
|
|
|
}"></span> |
|
|
|
<span>{{ |
|
|
|
scope.row.status === 1 ? '已通过' : |
|
|
|
scope.row.status === 0 ? '待审核' : '已驳回' |
|
|
|
}}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template v-else-if="['paidGold', 'freeGold'].includes(col.prop)"> |
|
|
|
{{ scope.row[col.prop] / 100 }} |
|
|
|
</template> |
|
|
|
<span v-else> |
|
|
|
{{ scope.row[col.prop] }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
<el-table-column fixed="left" prop="username" label="姓名" width="150px" /> |
|
|
|
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px" /> |
|
|
|
<el-table-column prop="area" label="所属地区" width="100px" /> |
|
|
|
<el-table-column prop="refundType" label="活动名称" width="100px" /> |
|
|
|
<el-table-column prop="refundGoods" label="充值金额" width="100px" /> |
|
|
|
<el-table-column prop="rechargeCoin" label="永久金币" width="110px" sortable="custom"> |
|
|
|
<template #default="scope">{{ scope.row.rechargeCoin }}</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="freeCoin" label="免费金币" sortable="custom" width="110px"> |
|
|
|
<template #default="scope">{{ scope.row.freeCoin }}</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="freeCoin" label="支付凭证" width="110px" /> |
|
|
|
<el-table-column prop="adminName" label="提交人" width="100px" /> |
|
|
|
<el-table-column prop="status" label="付款时间" width="200px" > |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</template> |
|
|
|
<el-table-column prop="createTime" sortable="custom" label="提交时间" width="200px"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="right" prop="operation" label="操作" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div class="operation"> |
|
|
@ -741,9 +586,7 @@ const trimJwCode = () => { |
|
|
|
</template> |
|
|
|
<template #actions="{ confirm, cancel }"> |
|
|
|
<el-button size="small" @click="cancel">取消</el-button> |
|
|
|
<el-button type="primary" size="small" @click="confirm"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" @click="confirm">确定</el-button> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<el-button :disabled="scope.row.status === 1 || scope.row.status === 2 |
|
|
@ -758,7 +601,6 @@ const trimJwCode = () => { |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 分页 --> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" |
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange" |
|
|
@ -768,7 +610,6 @@ const trimJwCode = () => { |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 驳回弹出框 --> |
|
|
|
<el-dialog v-model="rejectVisible" title="驳回理由" width="500" :before-close="closeRejectVisible"> |
|
|
|
<template #footer> |
|
|
|
<el-form :model="rejectObj" ref="Ref" :rules="rules" label-width="auto" style="max-width: 600px"> |
|
|
@ -825,17 +666,23 @@ const trimJwCode = () => { |
|
|
|
|
|
|
|
.status { |
|
|
|
display: flex; |
|
|
|
align-items: center; /* 确保子元素垂直居中对齐 */ |
|
|
|
gap: 6px; /* 设置圆点和文字之间的间距 */ |
|
|
|
align-items: center; |
|
|
|
/* 确保子元素垂直居中对齐 */ |
|
|
|
gap: 6px; |
|
|
|
/* 设置圆点和文字之间的间距 */ |
|
|
|
} |
|
|
|
|
|
|
|
.green-dot, .grey-dot, .red-dot { |
|
|
|
.green-dot, |
|
|
|
.grey-dot, |
|
|
|
.red-dot { |
|
|
|
display: inline-block; |
|
|
|
width: 8px; |
|
|
|
height: 8px; |
|
|
|
border-radius: 50%; |
|
|
|
flex-shrink: 0; /* 防止圆点在空间不足时缩小 */ |
|
|
|
margin: 0; /* 移除原有的 margin-right */ |
|
|
|
flex-shrink: 0; |
|
|
|
/* 防止圆点在空间不足时缩小 */ |
|
|
|
margin: 0; |
|
|
|
/* 移除原有的 margin-right */ |
|
|
|
} |
|
|
|
|
|
|
|
/* 备注列样式 */ |
|
|
@ -846,6 +693,7 @@ const trimJwCode = () => { |
|
|
|
text-overflow: ellipsis; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
|
|
|
|
/* 设置单元格内容溢出隐藏 */ |
|
|
|
.el-table .el-table__cell { |
|
|
|
overflow: hidden; |
|
|
|