完善返利转入余额历史显示
This commit is contained in:
@@ -249,7 +249,7 @@ export interface BalanceHistoryResponse extends PaginatedResponse<BalanceHistory
|
||||
* @param id - User ID
|
||||
* @param page - Page number
|
||||
* @param pageSize - Items per page
|
||||
* @param type - Optional type filter (balance, admin_balance, concurrency, admin_concurrency, subscription)
|
||||
* @param type - Optional type filter (balance, affiliate_balance, admin_balance, concurrency, admin_concurrency, subscription)
|
||||
* @returns Paginated balance history with total_recharged
|
||||
*/
|
||||
export async function getUserBalanceHistory(
|
||||
|
||||
@@ -196,6 +196,7 @@ const totalPages = computed(() => Math.ceil(total.value / pageSize) || 1)
|
||||
const typeOptions = computed(() => [
|
||||
{ value: '', label: t('admin.users.allTypes') },
|
||||
{ value: 'balance', label: t('admin.users.typeBalance') },
|
||||
{ value: 'affiliate_balance', label: t('admin.users.typeAffiliateBalance') },
|
||||
{ value: 'admin_balance', label: t('admin.users.typeAdminBalance') },
|
||||
{ value: 'concurrency', label: t('admin.users.typeConcurrency') },
|
||||
{ value: 'admin_concurrency', label: t('admin.users.typeAdminConcurrency') },
|
||||
@@ -235,7 +236,7 @@ const loadHistory = async (page: number) => {
|
||||
const isAdminType = (type: string) => type === 'admin_balance' || type === 'admin_concurrency'
|
||||
|
||||
// Helper: check if balance type (includes admin_balance)
|
||||
const isBalanceType = (type: string) => type === 'balance' || type === 'admin_balance'
|
||||
const isBalanceType = (type: string) => type === 'balance' || type === 'admin_balance' || type === 'affiliate_balance'
|
||||
|
||||
// Helper: check if subscription type
|
||||
const isSubscriptionType = (type: string) => type === 'subscription'
|
||||
@@ -291,6 +292,8 @@ const getItemTitle = (item: BalanceHistoryItem) => {
|
||||
switch (item.type) {
|
||||
case 'balance':
|
||||
return t('redeem.balanceAddedRedeem')
|
||||
case 'affiliate_balance':
|
||||
return t('redeem.balanceAddedAffiliate')
|
||||
case 'admin_balance':
|
||||
return item.value >= 0 ? t('redeem.balanceAddedAdmin') : t('redeem.balanceDeductedAdmin')
|
||||
case 'concurrency':
|
||||
|
||||
@@ -1050,6 +1050,7 @@ export default {
|
||||
recentActivity: 'Recent Activity',
|
||||
historyWillAppear: 'Your redemption history will appear here',
|
||||
balanceAddedRedeem: 'Balance Added (Redeem)',
|
||||
balanceAddedAffiliate: 'Balance Added (Affiliate Transfer)',
|
||||
balanceAddedAdmin: 'Balance Added (Admin)',
|
||||
balanceDeductedAdmin: 'Balance Deducted (Admin)',
|
||||
concurrencyAddedRedeem: 'Concurrency Added (Redeem)',
|
||||
@@ -1834,6 +1835,7 @@ export default {
|
||||
noBalanceHistory: 'No records found for this user',
|
||||
allTypes: 'All Types',
|
||||
typeBalance: 'Balance (Redeem)',
|
||||
typeAffiliateBalance: 'Balance (Affiliate Transfer)',
|
||||
typeAdminBalance: 'Balance (Admin)',
|
||||
typeConcurrency: 'Concurrency (Redeem)',
|
||||
typeAdminConcurrency: 'Concurrency (Admin)',
|
||||
|
||||
@@ -1054,6 +1054,7 @@ export default {
|
||||
recentActivity: '最近活动',
|
||||
historyWillAppear: '您的兑换历史将显示在这里',
|
||||
balanceAddedRedeem: '余额充值(兑换)',
|
||||
balanceAddedAffiliate: '余额充值(返利转入)',
|
||||
balanceAddedAdmin: '余额充值(管理员)',
|
||||
balanceDeductedAdmin: '余额扣除(管理员)',
|
||||
concurrencyAddedRedeem: '并发增加(兑换)',
|
||||
@@ -1891,6 +1892,7 @@ export default {
|
||||
noBalanceHistory: '暂无变动记录',
|
||||
allTypes: '全部类型',
|
||||
typeBalance: '余额(兑换码)',
|
||||
typeAffiliateBalance: '余额(返利转入)',
|
||||
typeAdminBalance: '余额(管理员调整)',
|
||||
typeConcurrency: '并发(兑换码)',
|
||||
typeAdminConcurrency: '并发(管理员调整)',
|
||||
|
||||
Reference in New Issue
Block a user