feat(admin): 资金流水业务类型展示中文并修正筛选取值
- statusLabels 新增 walletBizTypeLabel/walletBizTypeOptions,覆盖 wallet_ledger 全部 16 种 biz_type - 资金流水表格业务类型列改为中文标签 - 筛选下拉原取值(order_freeze 等)在钱包流水中不存在,替换为真实业务类型 - 用户端钱包页复用共享映射,移除重复的本地 map
This commit is contained in:
@@ -13,7 +13,12 @@ import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { fetchAdminWalletLedger, type AdminWalletLedger } from '@/features/admin/api/adminWallet'
|
||||
import { adminPath } from '@/shared/utils/adminPath'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { balanceTypeLabel, ledgerDirectionLabel } from '@/shared/utils/statusLabels'
|
||||
import {
|
||||
balanceTypeLabel,
|
||||
ledgerDirectionLabel,
|
||||
walletBizTypeLabel,
|
||||
walletBizTypeOptions,
|
||||
} from '@/shared/utils/statusLabels'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
@@ -165,10 +170,12 @@ function directionLabel(direction: string) {
|
||||
placeholder="全部业务类型"
|
||||
class="full-control"
|
||||
>
|
||||
<el-option label="订单冻结" value="order_freeze" />
|
||||
<el-option label="订单取消释放" value="order_cancel_release" />
|
||||
<el-option label="订单结算" value="order_settlement" />
|
||||
<el-option label="押金退回" value="deposit_refund" />
|
||||
<el-option
|
||||
v-for="option in walletBizTypeOptions"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -222,7 +229,9 @@ function directionLabel(direction: string) {
|
||||
|
||||
<el-table-column label="业务类型" width="140">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" effect="plain" class="biz-tag">{{ row.biz_type }}</el-tag>
|
||||
<el-tag size="small" effect="plain" class="biz-tag">
|
||||
{{ walletBizTypeLabel(row.biz_type) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user