[游戏管理]玩家钱包流水
This commit is contained in:
33
web/src/lang/backend/en/game/walletRecord.ts
Normal file
33
web/src/lang/backend/en/game/walletRecord.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export default {
|
||||
id: 'Record ID',
|
||||
user_id: 'User ID',
|
||||
'game_user__username': 'Username',
|
||||
'channel__name': 'Channel',
|
||||
biz_type: 'Biz type',
|
||||
direction: 'Direction',
|
||||
amount: 'Amount',
|
||||
balance_before: 'Balance before',
|
||||
balance_after: 'Balance after',
|
||||
ref_type: 'Ref type',
|
||||
ref_id: 'Ref ID',
|
||||
idempotency_key: 'Idempotency key',
|
||||
'operator_admin__username': 'Operator',
|
||||
remark: 'Remark',
|
||||
create_time: 'Created at',
|
||||
'quick Search Fields': 'ID, biz type, ref type, remark, idempotency key',
|
||||
'direction in': 'Credit',
|
||||
'direction out': 'Debit',
|
||||
'biz deposit': 'Deposit',
|
||||
'biz withdraw': 'Withdraw',
|
||||
'biz withdraw_freeze': 'Withdraw freeze',
|
||||
'biz withdraw_unfreeze': 'Withdraw unfreeze',
|
||||
'biz platform_in': 'Platform credit',
|
||||
'biz platform_out': 'Platform debit',
|
||||
'biz admin_credit': 'Admin credit',
|
||||
'biz admin_deduct': 'Admin debit',
|
||||
'biz bet': 'Bet',
|
||||
'biz payout': 'Payout',
|
||||
'biz fee': 'Fee',
|
||||
'biz void_refund': 'Void refund',
|
||||
'biz adjust': 'Adjustment',
|
||||
}
|
||||
33
web/src/lang/backend/zh-cn/game/walletRecord.ts
Normal file
33
web/src/lang/backend/zh-cn/game/walletRecord.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export default {
|
||||
id: '流水ID',
|
||||
user_id: '用户ID',
|
||||
'game_user__username': '用户名',
|
||||
'channel__name': '渠道',
|
||||
biz_type: '业务类型',
|
||||
direction: '方向',
|
||||
amount: '变动额',
|
||||
balance_before: '变动前余额',
|
||||
balance_after: '变动后余额',
|
||||
ref_type: '关联类型',
|
||||
ref_id: '关联ID',
|
||||
idempotency_key: '幂等键',
|
||||
'operator_admin__username': '操作管理员',
|
||||
remark: '备注',
|
||||
create_time: '创建时间',
|
||||
'quick Search Fields': 'ID、业务类型、关联类型、备注、幂等键',
|
||||
'direction in': '入金',
|
||||
'direction out': '出金',
|
||||
'biz deposit': '充值入账',
|
||||
'biz withdraw': '提现出账',
|
||||
'biz withdraw_freeze': '提现冻结',
|
||||
'biz withdraw_unfreeze': '提现解冻',
|
||||
'biz platform_in': '平台划入',
|
||||
'biz platform_out': '平台划出',
|
||||
'biz admin_credit': '管理员加币',
|
||||
'biz admin_deduct': '管理员扣币',
|
||||
'biz bet': '下注扣款',
|
||||
'biz payout': '派彩',
|
||||
'biz fee': '手续费',
|
||||
'biz void_refund': '作废退款',
|
||||
'biz adjust': '其他调账',
|
||||
}
|
||||
180
web/src/views/backend/game/walletRecord/index.vue
Normal file
180
web/src/views/backend/game/walletRecord/index.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<div class="default-main ba-table-box">
|
||||
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info" show-icon />
|
||||
|
||||
<TableHeader
|
||||
:buttons="['refresh', 'comSearch', 'quickSearch', 'columnDisplay']"
|
||||
:quick-search-placeholder="t('Quick search placeholder', { fields: t('game.walletRecord.quick Search Fields') })"
|
||||
></TableHeader>
|
||||
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, provide, useTemplateRef } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { baTableApi } from '/@/api/common'
|
||||
import TableHeader from '/@/components/table/header/index.vue'
|
||||
import Table from '/@/components/table/index.vue'
|
||||
import baTableClass from '/@/utils/baTable'
|
||||
|
||||
defineOptions({
|
||||
name: 'game/walletRecord',
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
const tableRef = useTemplateRef('tableRef')
|
||||
|
||||
function formatAmount(_row: anyObj, _column: any, cellValue: unknown) {
|
||||
if (cellValue === null || cellValue === undefined || cellValue === '') {
|
||||
return '-'
|
||||
}
|
||||
const s = String(cellValue).trim().replace(',', '.')
|
||||
const n = parseFloat(s)
|
||||
if (!Number.isFinite(n)) {
|
||||
return String(cellValue)
|
||||
}
|
||||
return n.toFixed(4)
|
||||
}
|
||||
|
||||
const bizReplace = {
|
||||
deposit: t('game.walletRecord.biz deposit'),
|
||||
withdraw: t('game.walletRecord.biz withdraw'),
|
||||
withdraw_freeze: t('game.walletRecord.biz withdraw_freeze'),
|
||||
withdraw_unfreeze: t('game.walletRecord.biz withdraw_unfreeze'),
|
||||
platform_in: t('game.walletRecord.biz platform_in'),
|
||||
platform_out: t('game.walletRecord.biz platform_out'),
|
||||
admin_credit: t('game.walletRecord.biz admin_credit'),
|
||||
admin_deduct: t('game.walletRecord.biz admin_deduct'),
|
||||
bet: t('game.walletRecord.biz bet'),
|
||||
payout: t('game.walletRecord.biz payout'),
|
||||
fee: t('game.walletRecord.biz fee'),
|
||||
void_refund: t('game.walletRecord.biz void_refund'),
|
||||
adjust: t('game.walletRecord.biz adjust'),
|
||||
}
|
||||
|
||||
const dirReplace = {
|
||||
'1': t('game.walletRecord.direction in'),
|
||||
'2': t('game.walletRecord.direction out'),
|
||||
}
|
||||
|
||||
const baTable = new baTableClass(
|
||||
new baTableApi('/admin/game.UserWalletRecord/'),
|
||||
{
|
||||
pk: 'id',
|
||||
column: [
|
||||
{ label: t('game.walletRecord.id'), prop: 'id', align: 'center', width: 100, operator: 'RANGE', sortable: 'custom' },
|
||||
{
|
||||
label: t('game.walletRecord.user_id'),
|
||||
prop: 'user_id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
operator: 'RANGE',
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.game_user__username'),
|
||||
prop: 'gameUser.username',
|
||||
align: 'center',
|
||||
minWidth: 110,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
operator: 'LIKE',
|
||||
render: 'tags',
|
||||
comSearchRender: 'string',
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.channel__name'),
|
||||
prop: 'channel.name',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
operator: 'LIKE',
|
||||
render: 'tags',
|
||||
comSearchRender: 'string',
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.biz_type'),
|
||||
prop: 'biz_type',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
replaceValue: bizReplace,
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.direction'),
|
||||
prop: 'direction',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
replaceValue: dirReplace,
|
||||
},
|
||||
{ label: t('game.walletRecord.amount'), prop: 'amount', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{ label: t('game.walletRecord.balance_before'), prop: 'balance_before', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{ label: t('game.walletRecord.balance_after'), prop: 'balance_after', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{
|
||||
label: t('game.walletRecord.ref_type'),
|
||||
prop: 'ref_type',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
showOverflowTooltip: true,
|
||||
operator: 'LIKE',
|
||||
},
|
||||
{ label: t('game.walletRecord.ref_id'), prop: 'ref_id', align: 'center', width: 100, operator: 'RANGE' },
|
||||
{
|
||||
label: t('game.walletRecord.idempotency_key'),
|
||||
prop: 'idempotency_key',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
showOverflowTooltip: true,
|
||||
operator: 'LIKE',
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.operator_admin__username'),
|
||||
prop: 'operatorAdmin.username',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
operator: 'LIKE',
|
||||
render: 'tags',
|
||||
comSearchRender: 'string',
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.remark'),
|
||||
prop: 'remark',
|
||||
align: 'center',
|
||||
minWidth: 140,
|
||||
showOverflowTooltip: true,
|
||||
operator: 'LIKE',
|
||||
},
|
||||
{
|
||||
label: t('game.walletRecord.create_time'),
|
||||
prop: 'create_time',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
sortable: 'custom',
|
||||
width: 160,
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
],
|
||||
},
|
||||
{}
|
||||
)
|
||||
|
||||
provide('baTable', baTable)
|
||||
|
||||
onMounted(() => {
|
||||
baTable.table.ref = tableRef.value
|
||||
baTable.mount()
|
||||
baTable.getData()?.then(() => {
|
||||
baTable.initSort()
|
||||
baTable.dragSort()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
Reference in New Issue
Block a user