Browse Source

Merge branch 'lihuilin/feature-20250623164044-金币前端' into milestone-20250623-金币前端

lihui/feature-20250623144029-金币前端lihui
lihuilin 2 days ago
parent
commit
ba32b86392
  1. 96
      src/views/audit/rechargeAudit.vue
  2. 1
      src/views/audit/refundAudit.vue

96
src/views/audit/rechargeAudit.vue

@ -1,4 +1,4 @@
<!-- 合计数 -->
<!-- 支付凭证 -->
<template>
<el-row>
<el-col>
@ -60,10 +60,11 @@
<el-tab-pane label="已驳回" name="reject"></el-tab-pane>
<div>
总条数{{ }}&nbsp;&nbsp;&nbsp;&nbsp;
总金币数{{ }}金币&nbsp;&nbsp;&nbsp;&nbsp;
永久金币{{ }}金币&nbsp;&nbsp;&nbsp;&nbsp;
免费金币{{ }}金币
总条数{{ stats.totalNum }}&nbsp;&nbsp;&nbsp;&nbsp;
退款总金币数{{ stats.permanentGolds + stats.freeGolds + stats.taskGolds }}金币&nbsp;&nbsp;&nbsp;&nbsp;
永久金币{{ stats.permanentGolds }}金币&nbsp;&nbsp;&nbsp;&nbsp;
免费金币{{ stats.freeGolds }}金币&nbsp;&nbsp;&nbsp;&nbsp;
任务金币{{ stats.taskGolds }}金币
</div>
</el-tabs>
@ -87,7 +88,7 @@
<template #default="scope">{{ scope.row.permanentGold / 100 }}</template>
</el-table-column>
<el-table-column prop="freeGold" label="免费金币" sortable="custom" width="110px">
<template #default="scope">{{ scope.row.freeGold / 100 }}</template>
<template #default="scope">{{ (scope.row.freeJune + scope.row.freeDecember) / 100 }}</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
@ -104,8 +105,7 @@
<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" />
<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') }}
@ -116,18 +116,24 @@
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column v-if="activeName === 'wait'"
fixed="right" prop="operation" label="操作" width="150px">
<el-table-column v-if="activeName !== 'wait'" prop="auditTime" sortable="custom" label="审核时间" width="200px">
<template #default="scope">
{{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column v-if="activeName === 'wait'" fixed="right" prop="operation" label="操作" width="150px">
<template #default="scope">
<div class="operation">
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)">
<template #reference>
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" text>
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary"
text>
通过
</el-button>
</template>
</el-popconfirm>
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" text @click="showRejectDialog(scope.row)">
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" text
@click="showRejectDialog(scope.row)">
驳回
</el-button>
</div>
@ -149,7 +155,8 @@
<el-dialog v-model="rejectDialogVisible" title="驳回理由" width="500px">
<el-form>
<el-form-item label="驳回理由">
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200" show-word-limit />
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200"
show-word-limit />
</el-form-item>
</el-form>
<template #footer>
@ -166,7 +173,7 @@ 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'
//
const trimJwCode = () => {
if (rechargeAudit.value.jwcode) {
@ -182,7 +189,7 @@ const tableData = ref([])
//
const rechargeAudit = ref({
jwcode: null, //
jwcode: "", //
activity: "", //
payModel: "", //
startTime: "", //
@ -224,13 +231,14 @@ const payModel = [
// ref
const Ref = ref(null)
//
//
//
const rejectedCount = ref(0)
//
const rejectedGold = ref(0)
const rejectedRGold = ref(0)
const rejectedFGold = ref(0)
const stats = ref({
totalNum: 0,
totalCoins: 0,
permanentGolds: 0,
freeGolds: 0,
taskGolds: 0
})
//
const sortField = ref('')
@ -288,26 +296,31 @@ const getRecharge = async function (val) {
tableData.value = result.list
//
total.value = result.total
console.log('搜索结果', result.list)
//
const rechargeVo1 = { ...rechargeAudit.value }
delete rechargeVo1.sortField
delete rechargeVo1.sortOrder
delete rechargeVo1.auditStatus
const result2 = await request({
} catch (error) {
console.log('请求失败', error)
}
}
const getStats = async () => {
try {
const params = {
pageNum: getObj.value.pageNum,
pageSize: getObj.value.pageSize,
rechargeAudit: rechargeAudit.value
}
const res = await API({
url: '/audit/sumRechargeGold',
data: rechargeVo1
data: params
})
console.log('搜索对象', getObj.value)
console.log('tableData', tableData.value)
console.log('total', total.value)
stats.value.totalNum = res.totalNum
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)
} catch (error) {
console.log('请求失败', error)
}
}
//
const handleSearch = function () {
trimJwCode();
@ -390,7 +403,8 @@ const adminWait = async function () {
rechargeAudit.value.auditStatus = "0"
getObj.value.pageNum = 1
await getRecharge()
console.log('adminWait')
await getStats()
console.log('adminWait,这是点击待审核调用')
}
//
@ -398,7 +412,8 @@ const adminPass = async function () {
rechargeAudit.value.auditStatus = "1"
getObj.value.pageNum = 1
await getRecharge()
console.log('adminPass')
await getStats()
console.log('adminWait,这是点击已通过调用')
}
//
@ -406,7 +421,8 @@ const adminReject = async function () {
rechargeAudit.value.auditStatus = "2"
getObj.value.pageNum = 1
await getRecharge()
console.log('adminReject')
await getStats()
console.log('adminWait,这是点击已驳回调用')
}
const handleClick = function (tab, event) {
@ -516,7 +532,6 @@ const handleSortChange = (column) => {
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
getRecharge()
}
//
const previewImage = (imageUrl) => {
// 使 element-plus el-image
@ -546,13 +561,14 @@ const previewImage = (imageUrl) => {
});
};
//
onMounted(async function () {
// await getAdminData()
await getActivity()
await getMarket()
await getRecharge()
console.log('111')
await getStats()
})
</script>

1
src/views/audit/refundAudit.vue

@ -83,7 +83,6 @@
{{ row.sumGold / 100 }}
</template>
</el-table-column>
<!-- 修正这部分代码 -->
<el-table-column prop="permanentGold" label="永久金币" width="120" sortable="custom">
<template #default="{ row }">
{{ row.permanentGold / 100 }}

Loading…
Cancel
Save