feat: 银行端

This commit is contained in:
FlowerWater
2025-12-20 12:43:50 +08:00
parent 9591234e70
commit 06df763ed4
21 changed files with 3473 additions and 230 deletions

111
src/pagesBank/mock/index.ts Normal file
View File

@@ -0,0 +1,111 @@
import type {
BankStats,
AuditItem,
BankCustomer,
WithdrawAuditDetail
} from '@/typings/bank'
import { AuditStatus, AuditType } from '@/typings/bank'
// 统计数据 Mock
export const mockBankStats: BankStats = {
pendingAuditStore: 5,
pendingAuditWithdraw: 12,
todayApprovedCount: 8,
totalLoanAmount: 12850000.00,
activeCustomerCount: 156
}
// 审核记录 Mock
export const mockAuditList: AuditItem[] = [
{
id: 'W001',
merchantId: 'M1001',
merchantName: '广州酷玩玩具城',
type: AuditType.WITHDRAW,
amount: 5000.00,
status: AuditStatus.PENDING,
applyTime: '2024-12-19 10:30:00',
remark: '年终结算提现'
},
{
id: 'W002',
merchantId: 'M1002',
merchantName: '深圳特粉专卖店',
type: AuditType.WITHDRAW,
amount: 12800.00,
status: AuditStatus.PENDING,
applyTime: '2024-12-19 09:15:00'
},
{
id: 'C001',
merchantId: 'M1003',
merchantName: '珠海智悦贸易有限公司',
type: AuditType.CREDIT,
amount: 500000.00,
status: AuditStatus.PENDING,
applyTime: '2024-12-18 16:45:00',
remark: '扩大经营,申请提高授信额度'
}
]
// 客户列表 Mock
export const mockCustomerList: BankCustomer[] = [
{
id: 'C1001',
merchantId: 'M1001',
merchantName: '广州酷玩玩具城',
creditLimit: 500000.00,
usedLimit: 125000.00,
balance: 375000.00,
status: 'normal',
contactName: '张三',
contactPhone: '138****8888',
joinTime: '2024-05-20'
},
{
id: 'C1002',
merchantId: 'M1002',
merchantName: '深圳特粉专卖店',
creditLimit: 200000.00,
usedLimit: 180000.00,
balance: 20000.00,
status: 'warning',
contactName: '李四',
contactPhone: '139****9999',
joinTime: '2024-06-15'
}
]
// 审核详情 Mock
export function getMockWithdrawDetail(id: string): WithdrawAuditDetail {
return {
id,
merchantId: 'M1001',
merchantName: '广州酷玩玩具城',
type: AuditType.WITHDRAW,
amount: 5000.00,
status: AuditStatus.PENDING,
applyTime: '2024-12-19 10:30:00',
bankName: '中国工商银行',
bankAccount: '6222 **** **** 8888',
memberLevel: 'V3',
transactionCount: 156,
remark: '年终结算提现'
}
}
// 交易流水 Mock
export const mockTransactions = [
{ id: 'T001', type: 'income', amount: 500.00, time: '2024-12-19 14:30', title: '商品销售收入-订单#1001' },
{ id: 'T002', type: 'expend', amount: 200.00, time: '2024-12-19 12:00', title: '退款支出-订单#0998' },
{ id: 'T003', type: 'income', amount: 1200.00, time: '2024-12-18 18:20', title: '商品销售收入-订单#0999' },
{ id: 'T004', type: 'withdraw', amount: 5000.00, time: '2024-12-18 10:00', title: '提现申请' },
{ id: 'T005', type: 'income', amount: 350.50, time: '2024-12-17 15:45', title: '商品销售收入-订单#0997' },
]
// 提现记录 Mock (复用 AuditItem 结构部分字段或定义新结构,这里简化复用)
export const mockWithdrawHistory = [
{ id: 'W001', amount: 5000.00, status: AuditStatus.PENDING, time: '2024-12-19 10:30', bank: '工商银行(8888)' },
{ id: 'W005', amount: 10000.00, status: AuditStatus.APPROVED, time: '2024-12-01 09:00', bank: '工商银行(8888)' },
{ id: 'W008', amount: 2000.00, status: AuditStatus.REJECTED, time: '2024-11-20 16:20', bank: '工商银行(8888)', reason: '账户信息有误' },
]