From f8f1159666ec37f880474b43ace520b8840782bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8?= Date: Wed, 13 May 2026 14:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/capital/withdraw.ts | 47 + src/i18n/locales/en-US/index.ts | 53 +- src/i18n/locales/zh-CN/index.ts | 53 +- .../withdraw/components/WithdrawDialog.vue | 812 ++++++++++++++++++ src/views/capital/withdraw/index.vue | 408 +++------ src/views/capital/withdraw/options.ts | 66 +- 6 files changed, 1084 insertions(+), 355 deletions(-) create mode 100644 src/api/modules/capital/withdraw.ts create mode 100644 src/views/capital/withdraw/components/WithdrawDialog.vue diff --git a/src/api/modules/capital/withdraw.ts b/src/api/modules/capital/withdraw.ts new file mode 100644 index 0000000..e8285a2 --- /dev/null +++ b/src/api/modules/capital/withdraw.ts @@ -0,0 +1,47 @@ +import { request } from '@/api' + +// 获取用户钱包信息 +export const getWalletCapital = () => { + return request.get('/user/getWalletCapital') +} + +// 获取取款渠道列表 (role_id >= 5 使用) +export const getWithdrawChannel = () => { + return request.get('/withdraw/withdrawChannel') +} + +// 获取代理取款渠道列表 (role_id < 5 使用) +export const getAgentWithdrawChannel = () => { + return request.get('/withdraw/agentWithdrawChannel') +} + +// 代理取款 (role_id < 5) +export const agentWithdraw = (params: { + channel_id: number + amount: string + withdraw_fee_handle: string + withdraw_point_diff: string + withdraw_service_fee: string + withdraw_head_fee: string + withdraw_risk_fee: string + withdraw_address: string +}) => { + return request.post('/withdraw/agentWithdraw', params) +} + +// 用户取款 (role_id >= 5) +export const withdraw = (params: { + channel_id: number + amount: string + withdraw_fee_handle: string + withdraw_point_diff: string + withdraw_blance: string + withdraw_address: string + beneficiary_name: string + beneficiary_bank_name: string + swift_bic_code: string + beneficiary_bank_address: string + beneficiary_bank_account: string +}) => { + return request.post('/withdraw/withdraw', params) +} \ No newline at end of file diff --git a/src/i18n/locales/en-US/index.ts b/src/i18n/locales/en-US/index.ts index 9154ab6..ea38bb1 100644 --- a/src/i18n/locales/en-US/index.ts +++ b/src/i18n/locales/en-US/index.ts @@ -98,5 +98,56 @@ export default { 5: 'Agent', 6: 'User' } - } + }, + // Withdraw + withdraw: { + pageTitle: 'Withdraw', + withdraw: 'Withdraw', + dialog: { + title1: 'Withdraw', + title2: 'Confirm Withdraw Information', + amount: 'Withdraw Amount', + amountPlaceholder: 'Please enter withdraw amount', + walletBalance: 'Wallet Balance', + deductionDetails: 'Deduction Details', + type: 'Type', + originalBalance: 'Original Balance', + deductedAmount: 'Deducted Amount', + remaining: 'Remaining', + totalDeducted: 'Total Deducted', + channel: 'Channel', + withdrawAmount: 'Withdraw Amount', + walletAddress: 'Wallet Address', + walletAddressPlaceholder: 'Please enter wallet address', + beneficiaryName: 'Beneficiary Name', + beneficiaryNamePlaceholder: 'Please enter beneficiary name', + bankName: 'Bank Name', + bankNamePlaceholder: 'Please enter bank name', + swiftCode: 'SWIFT Code', + swiftCodePlaceholder: 'Please enter SWIFT code', + bankAddress: 'Bank Address', + bankAddressPlaceholder: 'Please enter bank address', + bankAccount: 'Bank Account', + bankAccountPlaceholder: 'Please enter bank account', + nextStep: 'Next Step', + confirmWithdraw: 'Confirm Withdraw', + submitSuccess: 'Withdraw application submitted', + }, + wallet: { + feeHandling: 'Fee Handling', + pointDiff: 'Point Diff', + service: 'Service', + risk: 'Risk', + profit: 'Head Position', + headPosition: 'Head Position', + available: 'Available', + }, + table: { + channelName: 'Channel Name', + channelFee: 'Channel Fee', + apiUrl: 'API URL', + apiAppid: 'API Appid', + status: 'Status', + }, + }, } diff --git a/src/i18n/locales/zh-CN/index.ts b/src/i18n/locales/zh-CN/index.ts index a2bf894..8d1f77a 100644 --- a/src/i18n/locales/zh-CN/index.ts +++ b/src/i18n/locales/zh-CN/index.ts @@ -98,5 +98,56 @@ export default { 5: '代理', 6: '用户' } - } + }, + // 取款 + withdraw: { + pageTitle: '取款', + withdraw: '取款', + dialog: { + title1: '取款', + title2: '确认取款信息', + amount: '取款金额', + amountPlaceholder: '请输入取款金额', + walletBalance: '钱包余额', + deductionDetails: '扣除明细', + type: '类型', + originalBalance: '原余额', + deductedAmount: '扣除金额', + remaining: '剩余', + totalDeducted: '合计扣除', + channel: '渠道', + withdrawAmount: '取款金额', + walletAddress: '钱包地址', + walletAddressPlaceholder: '请输入钱包地址', + beneficiaryName: '收款人姓名', + beneficiaryNamePlaceholder: '请输入收款人姓名', + bankName: '银行名称', + bankNamePlaceholder: '请输入银行名称', + swiftCode: 'SWIFT代码', + swiftCodePlaceholder: '请输入SWIFT代码', + bankAddress: '银行地址', + bankAddressPlaceholder: '请输入银行地址', + bankAccount: '银行账号', + bankAccountPlaceholder: '请输入银行账号', + nextStep: '下一步', + confirmWithdraw: '确认取款', + submitSuccess: '取款申请已提交', + }, + wallet: { + feeHandling: '手续费', + pointDiff: '点差佣金', + service: '服务费', + risk: '风险金', + profit: '头寸', + headPosition: '头寸', + available: '可用余额', + }, + table: { + channelName: '渠道名称', + channelFee: '渠道费用', + apiUrl: '接口地址', + apiAppid: '接口appid', + status: '状态', + }, + }, } diff --git a/src/views/capital/withdraw/components/WithdrawDialog.vue b/src/views/capital/withdraw/components/WithdrawDialog.vue new file mode 100644 index 0000000..411e62b --- /dev/null +++ b/src/views/capital/withdraw/components/WithdrawDialog.vue @@ -0,0 +1,812 @@ + + + + + diff --git a/src/views/capital/withdraw/index.vue b/src/views/capital/withdraw/index.vue index 0ab090b..ed1b0da 100644 --- a/src/views/capital/withdraw/index.vue +++ b/src/views/capital/withdraw/index.vue @@ -1,330 +1,120 @@ diff --git a/src/views/capital/withdraw/options.ts b/src/views/capital/withdraw/options.ts index 0b30aa0..3d5da07 100644 --- a/src/views/capital/withdraw/options.ts +++ b/src/views/capital/withdraw/options.ts @@ -1,45 +1,23 @@ -// 取款页面的基础信息:当前先用本地静态数据,后续可替换成接口返回值。 -export const withdrawBaseInfo = { - channelName: '取款渠道名称', - withdrawAccount: '只能总钱包出账', - currency: 'USD', -} - -// 快捷金额按钮:用于快速回填输入框。 -export const withdrawQuickAmounts = ['100.00', '500.00', '1000.00', '2000.00', '5000.00'] - -// 第二步收款信息字段:统一由配置驱动,便于后续扩展或替换文案。 -export const withdrawReceiveFields = [ - { - label: '收款银行名称', - prop: 'bankName', - }, - { - label: '银行收款地址', - prop: 'bankAddress', - }, - { - label: 'SWIFT', - prop: 'swift', - }, - { - label: '收款人名称', - prop: 'receiverName', - }, - { - label: '收款人账号', - prop: 'receiverAccount', - }, - { - label: '货币类型', - prop: 'currencyType', - }, - { - label: '收款人地址', - prop: 'receiverAddress', - }, - { - label: '备注', - prop: 'remark', - }, +// 取款页面表格列配置 +export const tableColumns = [ + // 序号 + { label: '序号', type: 'index', width: 60, align: 'center' as const }, + // 渠道名称 + { label: '渠道名称', prop: 'name' }, + // 渠道费用 + { label: '渠道费用', prop: 'channel_fee' }, + { + label: '出金货币', + prop: 'currency.symbol', + type: 'select', + placeholder: '请选择入金货币', + }, + // 接口地址 + { label: '接口地址', prop: 'api_url' }, + // 接口appid + { label: '接口appid', prop: 'api_appid' }, + // 状态 + { label: '状态', prop: 'statusStr' }, + // 操作 + { label: '操作', prop: 'action', width: 100, slotName: 'action' as const }, ]