|
|
@ -6,25 +6,25 @@ |
|
|
|
<el-row style="margin-bottom: 5px"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text size="large">精网号:</el-text> |
|
|
|
<el-input v-model="rechargeAudit.jwcode" placeholder="请输入精网号" style="width: 240px" clearable /> |
|
|
|
<el-input v-model="rechargeAudit.jwcode" placeholder="请输入精网号" style="width: 240px" clearable/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text size="large">活动名称:</el-text> |
|
|
|
<el-select v-model="rechargeAudit.activity" placeholder="请选择活动名称" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in activity" :key="item" :label="item" :value="item" /> |
|
|
|
<el-option v-for="item in activity" :key="item" :label="item" :value="item"/> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text size="large">充值方式:</el-text> |
|
|
|
<el-select v-model="rechargeAudit.payModel" placeholder="请选择充值方式" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value"/> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text size="large">所属地区:</el-text> |
|
|
|
<el-select v-model="rechargeAudit.market" placeholder="请选择所属地区" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in market" :key="item" :label="item" :value="item" /> |
|
|
|
<el-option v-for="item in market" :key="item" :label="item" :value="item"/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
@ -35,7 +35,7 @@ |
|
|
|
<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" /> |
|
|
|
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> |
|
|
@ -47,7 +47,7 @@ |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
@ -65,23 +65,23 @@ |
|
|
|
退款总金币数:{{ (stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2) }}金币 |
|
|
|
永久金币:{{ stats.permanentGolds.toFixed(2) }}金币 |
|
|
|
免费金币:{{ stats.freeGolds.toFixed(2) }}金币 |
|
|
|
<!-- 任务金币:{{ stats.taskGolds.toFixed(2) }}金币--> |
|
|
|
<!-- 任务金币:{{ stats.taskGolds.toFixed(2) }}金币--> |
|
|
|
</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' }"> |
|
|
|
: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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="left" prop="name" label="姓名" width="150px" /> |
|
|
|
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px" /> |
|
|
|
<el-table-column prop="market" label="所属地区" width="100px" /> |
|
|
|
<el-table-column prop="activity" label="活动名称" width="100px" show-overflow-tooltip /> |
|
|
|
<el-table-column fixed="left" prop="name" label="姓名" width="150px"/> |
|
|
|
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px"/> |
|
|
|
<el-table-column prop="market" label="所属地区" width="100px"/> |
|
|
|
<el-table-column prop="activity" label="活动名称" width="100px" show-overflow-tooltip/> |
|
|
|
<el-table-column prop="money" label="充值金额" sortable="custom" width="110px"> |
|
|
|
<template #default="scope">{{ scope.row.permanentGold / 100 }}</template> |
|
|
|
</el-table-column> |
|
|
@ -91,9 +91,9 @@ |
|
|
|
<el-table-column prop="freeGold" label="免费金币" sortable="custom" width="110px"> |
|
|
|
<template #default="scope">{{ (scope.row.freeGold) / 100 }}</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip/> |
|
|
|
|
|
|
|
<el-table-column prop="payModel" label="支付方式" width="110px" /> |
|
|
|
<el-table-column prop="payModel" label="支付方式" width="110px"/> |
|
|
|
<el-table-column prop="voucher" label="支付凭证" width="110px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div v-if="scope.row.voucher" style="cursor: pointer;" @click="previewImage(scope.row.voucher)"> |
|
|
@ -102,10 +102,10 @@ |
|
|
|
<div v-else>--</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="adminName" label="提交人" width="100px" /> |
|
|
|
<el-table-column prop="adminName" label="提交人" width="100px"/> |
|
|
|
<el-table-column prop="rejectReason" v-if="activeName === 'reject'" label="驳回理由" width="200px" |
|
|
|
show-overflow-tooltip /> |
|
|
|
<el-table-column v-if="activeName !== 'wait'" prop="auditName" label="审核人" width="100px" /> |
|
|
|
show-overflow-tooltip/> |
|
|
|
<el-table-column v-if="activeName !== 'wait'" prop="auditName" label="审核人" width="100px"/> |
|
|
|
<el-table-column prop="payTime" sortable="custom" label="付款时间" width="200px"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.payTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
@ -127,13 +127,13 @@ |
|
|
|
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)"> |
|
|
|
<template #reference> |
|
|
|
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" |
|
|
|
text> |
|
|
|
text> |
|
|
|
通过 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" text |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
驳回 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -144,9 +144,9 @@ |
|
|
|
|
|
|
|
<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="handlePagination('size', $event)" |
|
|
|
@current-change="handlePagination('page', $event)"></el-pagination> |
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" |
|
|
|
@size-change="handlePagination('size', $event)" |
|
|
|
@current-change="handlePagination('page', $event)"></el-pagination> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
@ -156,7 +156,7 @@ |
|
|
|
<el-form> |
|
|
|
<el-form-item label="驳回理由"> |
|
|
|
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200" |
|
|
|
show-word-limit /> |
|
|
|
show-word-limit/> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<template #footer> |
|
|
@ -169,8 +169,8 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { computed, onMounted, reactive, ref } from 'vue' |
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
import {computed, onMounted, reactive, ref} from 'vue' |
|
|
|
import {ElMessage} from 'element-plus' |
|
|
|
import request from '@/util/http' |
|
|
|
import moment from 'moment' |
|
|
|
import API from '@/util/http' |
|
|
@ -287,7 +287,7 @@ const sortOrder = ref('') |
|
|
|
|
|
|
|
// 表单验证 |
|
|
|
const rules = reactive({ |
|
|
|
rejectReason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }] |
|
|
|
rejectReason: [{required: true, message: '请输入驳回理由', trigger: 'blur'}] |
|
|
|
}) |
|
|
|
|
|
|
|
const getAdminData = async function () { |
|
|
@ -341,6 +341,7 @@ const getRecharge = async function (val) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const getStats = async () => { |
|
|
|
try { |
|
|
|
const params = { |
|
|
@ -357,7 +358,7 @@ const getStats = async () => { |
|
|
|
stats.value.permanentGolds = res.permanentGolds / 100 |
|
|
|
stats.value.freeGolds = res.freeGolds / 100 |
|
|
|
stats.value.taskGolds = res.taskGolds / 100 |
|
|
|
console.log('see see stats和搜索对象', stats.value,params) |
|
|
|
console.log('see see stats和搜索对象', stats.value, params) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
@ -367,6 +368,7 @@ const handleSearch = function () { |
|
|
|
trimJwCode(); |
|
|
|
getObj.value.pageNum = 1 |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 重置 |
|
|
@ -382,24 +384,26 @@ const resetSearch = function () { |
|
|
|
} |
|
|
|
getTime.value = [] |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 今天 |
|
|
|
const getToday = function () { |
|
|
|
const today = new Date() |
|
|
|
const startTime = new Date( |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() |
|
|
|
) |
|
|
|
const endTime = new Date( |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() + 1 |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() + 1 |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
console.log('getTime', getTime.value) |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 昨天 |
|
|
@ -407,36 +411,38 @@ const getYesterday = function () { |
|
|
|
const yesterday = new Date() |
|
|
|
yesterday.setDate(yesterday.getDate() - 1) |
|
|
|
const startTime = new Date( |
|
|
|
yesterday.getFullYear(), |
|
|
|
yesterday.getMonth(), |
|
|
|
yesterday.getDate() |
|
|
|
yesterday.getFullYear(), |
|
|
|
yesterday.getMonth(), |
|
|
|
yesterday.getDate() |
|
|
|
) |
|
|
|
const endTime = new Date( |
|
|
|
yesterday.getFullYear(), |
|
|
|
yesterday.getMonth(), |
|
|
|
yesterday.getDate() + 1 |
|
|
|
yesterday.getFullYear(), |
|
|
|
yesterday.getMonth(), |
|
|
|
yesterday.getDate() + 1 |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
console.log('getTime', getTime.value) |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 近7天 |
|
|
|
const get7Days = function () { |
|
|
|
const today = new Date() |
|
|
|
const startTime = new Date( |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() - 6 |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() - 6 |
|
|
|
) |
|
|
|
const endTime = new Date( |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() + 1 |
|
|
|
today.getFullYear(), |
|
|
|
today.getMonth(), |
|
|
|
today.getDate() + 1 |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
console.log('getTime', getTime.value) |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 待审核充值明细 |
|
|
@ -511,6 +517,7 @@ const handlePagination = (type, val) => { |
|
|
|
getObj.value.pageNum = val |
|
|
|
} |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 处理通过操作 |
|
|
@ -518,13 +525,14 @@ const handleApprove = async (row) => { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: row.orderCode, |
|
|
|
auditId: 1, // todo 替换为实际审核人ID |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 1, |
|
|
|
rejectReason: '' |
|
|
|
} |
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
await request({url: '/audit/audit', data: params}) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
getRecharge() |
|
|
|
await getRecharge() |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('审核通过失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
@ -547,16 +555,17 @@ const handleReject = async () => { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: currentRecord.value.orderCode, |
|
|
|
auditId: 1, // todo 替换为实际审核人ID |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 2, |
|
|
|
rejectReason: rejectReason.value |
|
|
|
} |
|
|
|
|
|
|
|
await request({ url: '/audit/audit', data: params }) |
|
|
|
await request({url: '/audit/audit', data: params}) |
|
|
|
|
|
|
|
ElMessage.success('驳回操作成功') |
|
|
|
rejectDialogVisible.value = false |
|
|
|
getRecharge() |
|
|
|
await getRecharge() |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error('驳回操作失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
@ -570,19 +579,20 @@ const handleSortChange = (column) => { |
|
|
|
|
|
|
|
if (column.prop === 'money') { |
|
|
|
sortField.value = 'permanent_gold' |
|
|
|
}else if (column.prop === 'permanentGold') { |
|
|
|
} else if (column.prop === 'permanentGold') { |
|
|
|
sortField.value = 'permanent_gold' |
|
|
|
}else if (column.prop === 'freeGold') { |
|
|
|
} else if (column.prop === 'freeGold') { |
|
|
|
sortField.value = 'free_gold' |
|
|
|
} else if (column.prop === 'createTime') { |
|
|
|
sortField.value = 'create_time' |
|
|
|
}else if (column.prop === 'payTime') { |
|
|
|
} else if (column.prop === 'payTime') { |
|
|
|
sortField.value = 'pay_time' |
|
|
|
}else if (column.prop === 'auditTime') { |
|
|
|
} else if (column.prop === 'auditTime') { |
|
|
|
sortField.value = 'audit_time' |
|
|
|
} |
|
|
|
sortOrder.value = column.order === 'ascending' ? 'asc' : 'desc' |
|
|
|
getRecharge() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
// 预览图片函数 |
|
|
|
const previewImage = (imageUrl) => { |
|
|
@ -615,7 +625,7 @@ const previewImage = (imageUrl) => { |
|
|
|
|
|
|
|
// 挂载 |
|
|
|
onMounted(async function () { |
|
|
|
// await getAdminData() |
|
|
|
await getAdminData() |
|
|
|
await getActivity() |
|
|
|
await getMarket() |
|
|
|
await getRecharge() |
|
|
|