|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<el-card class="card1" style="margin-bottom: 0.5vh;"> |
|
|
|
<el-card style="margin-bottom: 0.5vh;"> |
|
|
|
<el-col style="margin-bottom: 1vh"> |
|
|
|
<div class="select"> |
|
|
|
<div class="selectRow"> |
|
|
@ -47,12 +47,12 @@ |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-card> |
|
|
|
<el-card class="card2"> |
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="待审核" name="wait" v-if="hasrechargeWait && hasrechargeWaitShow"></el-tab-pane> |
|
|
|
<el-card> |
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="待审核" name="wait" v-if="hasrechargeWait&&hasrechargeWaitShow"></el-tab-pane> |
|
|
|
<el-tab-pane label="已通过" name="pass" v-if="hasrechargeThrough"></el-tab-pane> |
|
|
|
<el-tab-pane label="已驳回" name="reject" v-if="hasrechargeReject"></el-tab-pane> |
|
|
|
<div class="goldStatistics"> |
|
|
|
<div> |
|
|
|
|
|
|
|
<!-- 总条数:{{ format3(stats.totalNum) }}条 --> |
|
|
|
充值新币:{{ format3(stats.permanentGolds) }}新币 |
|
|
@ -119,8 +119,7 @@ |
|
|
|
{{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="activeName === 'wait' && (hasrechargeWaitThough || hasrechargeWaitReject) && hasrechargeWaitShow" |
|
|
|
fixed="right" prop="operation" label="操作" width="150px"> |
|
|
|
<el-table-column v-if="activeName === 'wait'&&(hasrechargeWaitThough||hasrechargeWaitReject)&&hasrechargeWaitShow" fixed="right" prop="operation" label="操作" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div class="operation"> |
|
|
|
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)"> |
|
|
@ -136,8 +135,7 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<el-button v-if="hasrechargeWaitReject" :disabled="clicked || cancelClicked" type="primary" text |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
<el-button v-if="hasrechargeWaitReject" :disabled="clicked || cancelClicked" type="primary" text @click="showRejectDialog(scope.row)"> |
|
|
|
驳回 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -191,7 +189,7 @@ const hasrechargeWaitThough = ref(false) // 充值审核通过 |
|
|
|
const hasrechargeWaitReject = ref(false) // 充值审核驳回 |
|
|
|
|
|
|
|
// 初始化权限状态 |
|
|
|
const initPermissions = async () => { |
|
|
|
const initPermissions = async() => { |
|
|
|
if (!menuTree.value || !menuTree.value.length) return; |
|
|
|
hasrechargeThrough.value = hasMenuPermission(menuTree.value, permissionMapping.rechargeThrough); |
|
|
|
hasrechargeReject.value = hasMenuPermission(menuTree.value, permissionMapping.rechargeReject); |
|
|
@ -356,7 +354,7 @@ const getRecharge = async function (val) { |
|
|
|
} |
|
|
|
|
|
|
|
const getStats = async () => { |
|
|
|
if (!hasrechargeWaitShow) { |
|
|
|
if (!hasrechargeWaitShow) { |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
@ -482,21 +480,21 @@ const adminReject = async function () { |
|
|
|
const handleClick = function (tab, event) { |
|
|
|
activeName.value = tab.props.name |
|
|
|
if (tab.props.name === 'wait') { |
|
|
|
if (!hasrechargeWait) { |
|
|
|
if(!hasrechargeWait){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if (hasrechargeWaitShow) { |
|
|
|
if(hasrechargeWaitShow){ |
|
|
|
adminWait() |
|
|
|
} |
|
|
|
} else if (tab.props.name === 'pass') { |
|
|
|
if (!hasrechargeThrough) { |
|
|
|
if(!hasrechargeThrough){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
adminPass() |
|
|
|
} else if (tab.props.name === 'reject') { |
|
|
|
if (!hasrechargeReject) { |
|
|
|
if(!hasrechargeReject){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
@ -527,35 +525,35 @@ const handlePagination = (type, val) => { |
|
|
|
const clicked = ref(false); |
|
|
|
// 处理通过操作 |
|
|
|
const handleApprove = async (row) => { |
|
|
|
if (!hasrechargeWaitThough) { |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!hasrechargeWaitThough){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
clicked.value = true |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: row.orderCode, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 1, |
|
|
|
rejectReason: '' |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: row.orderCode, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 1, |
|
|
|
rejectReason: '' |
|
|
|
} |
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
await getRecharge() |
|
|
|
clicked.value = false |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('审核通过失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
|
} |
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
await getRecharge() |
|
|
|
clicked.value = false |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('审核通过失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
const showRejectDialog = (row) => { |
|
|
|
if (!hasrechargeWaitReject) { |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!hasrechargeWaitReject){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
currentRecord.value = row |
|
|
|
rejectReason.value = '' |
|
|
|
rejectDialogVisible.value = true |
|
|
@ -564,34 +562,34 @@ const showRejectDialog = (row) => { |
|
|
|
const cancelClicked = ref(false) |
|
|
|
// 处理驳回操作 |
|
|
|
const handleReject = async () => { |
|
|
|
if (!hasrechargeWaitReject) { |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!hasrechargeWaitReject){ |
|
|
|
ElMessage.error('暂无权限') |
|
|
|
return |
|
|
|
} |
|
|
|
cancelClicked.value = true |
|
|
|
|
|
|
|
if (!rejectReason.value.trim()) { |
|
|
|
ElMessage.warning('请输入驳回理由') |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: currentRecord.value.orderCode, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 2, |
|
|
|
rejectReason: rejectReason.value |
|
|
|
if (!rejectReason.value.trim()) { |
|
|
|
ElMessage.warning('请输入驳回理由') |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: currentRecord.value.orderCode, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 2, |
|
|
|
rejectReason: rejectReason.value |
|
|
|
} |
|
|
|
|
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('驳回操作成功') |
|
|
|
rejectDialogVisible.value = false |
|
|
|
await getRecharge() |
|
|
|
cancelClicked.value = false |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('驳回操作失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
|
} |
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('驳回操作成功') |
|
|
|
rejectDialogVisible.value = false |
|
|
|
await getRecharge() |
|
|
|
cancelClicked.value = false |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('驳回操作失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
|
} |
|
|
|
} |
|
|
|
// 处理排序事件 |
|
|
|
const handleSortChange = (column) => { |
|
|
@ -702,11 +700,11 @@ const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' |
|
|
|
// 挂载 |
|
|
|
onMounted(async function () { |
|
|
|
await initPermissions() |
|
|
|
if (hasrechargeWaitShow.value) { |
|
|
|
if(hasrechargeWaitShow.value){ |
|
|
|
rechargeAudit.value.auditStatus = '0' |
|
|
|
} else if (hasrechargeThrough.value) { |
|
|
|
}else if(hasrechargeThrough.value){ |
|
|
|
rechargeAudit.value.auditStatus = '1' |
|
|
|
} else if (hasrechargeReject) { |
|
|
|
}else if(hasrechargeReject){ |
|
|
|
rechargeAudit.value.auditStatus = '2' |
|
|
|
} |
|
|
|
await getActivity() |
|
|
@ -718,7 +716,6 @@ onMounted(async function () { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
// 分页器样式 |
|
|
|
.pagination { |
|
|
|
display: flex; |
|
|
|
margin-top: 0.5vh; |
|
|
@ -728,56 +725,6 @@ onMounted(async function () { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索的卡片样式 |
|
|
|
.card1 { |
|
|
|
background: #F3FAFE; |
|
|
|
} |
|
|
|
|
|
|
|
// 表单的卡片样式 |
|
|
|
.card2 { |
|
|
|
background: #E7F4FD; |
|
|
|
} |
|
|
|
|
|
|
|
// 充值新币总数等等 |
|
|
|
.goldStatistics { |
|
|
|
margin-left: 1vw; |
|
|
|
margin-bottom: 1vh; |
|
|
|
color: #000000; |
|
|
|
font-family: "PingFang SC"; |
|
|
|
font-size: 16px; |
|
|
|
font-style: normal; |
|
|
|
font-weight: 700; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表头/表体 wrapper 与 table body 单元格 */ |
|
|
|
// 注释掉的应该都是冗余的 |
|
|
|
// :deep(.el-table__body), |
|
|
|
// :deep(.el-table__header), |
|
|
|
// :deep(.el-table__body tbody), |
|
|
|
// :deep(.el-table__body tr), |
|
|
|
// :deep(.el-table__row), |
|
|
|
:deep(.el-table__header-wrapper), |
|
|
|
:deep(.el-table__body-wrapper), |
|
|
|
:deep(.el-table__cell), |
|
|
|
|
|
|
|
/* 表格 */ |
|
|
|
:deep(.el-table__body td) { |
|
|
|
background-color: #F3FAFE !important; |
|
|
|
} |
|
|
|
|
|
|
|
/* 表头 */ |
|
|
|
:deep(.el-table__header th) { |
|
|
|
background-color: #F3FAFE !important; |
|
|
|
} |
|
|
|
|
|
|
|
/* 鼠标悬停 */ |
|
|
|
:deep(.el-table__row:hover > .el-table__cell) { |
|
|
|
background-color: #E5EBFE !important; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.select { |
|
|
|
display: flex; |
|
|
|
|
|
|
|