diff --git a/src/api/modules/system/rechargeOrder.ts b/src/api/modules/system/rechargeOrder.ts new file mode 100644 index 0000000..a27cfff --- /dev/null +++ b/src/api/modules/system/rechargeOrder.ts @@ -0,0 +1,6 @@ +import { request } from '@/api'; + +// 获取充值订单列表 +export const getRechargeOrderListApi = (params: any) => { + return request.get('/user/rechargeList', { ...params }) +} diff --git a/src/views/capital/rechange/index.vue b/src/views/capital/rechange/index.vue index 8955b4d..9e2ae08 100644 --- a/src/views/capital/rechange/index.vue +++ b/src/views/capital/rechange/index.vue @@ -1,7 +1,327 @@ - - - 存款 + + + 存款 + + + + + + 存款 + + + + + + + + + + {{ rechangeForm.channelName || '存款渠道名称' }} + + + + + + 存款账户 + + + + + + + 支持币种 + + {{ rechangeForm.supportedCurrency }} + + + + + 存款金额 + + + + {{ rechangeForm.amountCurrency }} + + + + + + {{ amount }} + + + + + + + + 上一步 + 确认支付 + + + - + + + diff --git a/src/views/capital/rechange/options.ts b/src/views/capital/rechange/options.ts new file mode 100644 index 0000000..bc51d7b --- /dev/null +++ b/src/views/capital/rechange/options.ts @@ -0,0 +1,12 @@ +// 存款列表表格列配置:当前页面仍然保留列表 + 行内操作按钮的结构。 +export const rechangeTableColumns = [ + { prop: 'depositChannel', label: '存款渠道', align: 'center' as const }, + { prop: 'channelName', label: '渠道名称', align: 'center' as const }, + { prop: 'supportedCurrency', label: '支持货币', align: 'center' as const }, + { prop: 'processingTime', label: '预计处理时间', align: 'center' as const }, + { prop: 'singleAmount', label: '单笔存款金额', align: 'center' as const }, + { label: '操作', slotName: 'action', align: 'center' as const, width: 120 }, +] + +// 存款弹窗快捷金额:点击后直接回填到金额输入框。 +export const rechangeQuickAmounts = ['100.00', '500.00', '1000.00', '2000.00', '5000.00'] diff --git a/src/views/capital/rechangeCheck/index.vue b/src/views/capital/rechangeCheck/index.vue index 6baf5c7..4f73744 100644 --- a/src/views/capital/rechangeCheck/index.vue +++ b/src/views/capital/rechangeCheck/index.vue @@ -1,28 +1,36 @@ + + 驳回 通过 导出 + + + + {{ (currentPage - 1) * pageSize + scope.$index + 1 }} + + @@ -35,6 +43,7 @@ import RechangeSearch from '@/components/common/Search.vue' import RechangePagination from '@/components/common/Pagination.vue' import { rechangeCheckSearch, rechangeCheckTableColumns } from './options' +// 表格单行数据结构 interface TableRow { id: number account: string @@ -55,6 +64,7 @@ interface TableRow { userType: number } +// mock 数据:当前仅用于页面展示,后续接接口时可直接替换为接口返回结果 const mockTableData: TableRow[] = [ { id: 1, @@ -210,21 +220,25 @@ const mockTableData: TableRow[] = [ }, ] +// 搜索配置和表格配置 const searchOptions = ref(rechangeCheckSearch) const searchForm = ref({ account: '', userType: 1, }) +// 表格、勾选状态和 loading 状态 const tableColumns = computed(() => rechangeCheckTableColumns) const tableData = ref([]) const selectedRows = ref([]) const loading = ref(false) +// 分页状态 const total = ref(0) const currentPage = ref(1) const pageSize = ref(10) +// 根据搜索条件过滤 mock 数据,并做前端分页切片 const applyFilters = () => { const keyword = searchForm.value.account.trim().toLowerCase() const filtered = mockTableData.filter((item) => { @@ -239,6 +253,8 @@ const applyFilters = () => { tableData.value = filtered.slice(start, end) } +// 获取列表数据 +// 当前阶段用 mock 数据模拟加载态,后续接接口时可在这里替换为真实请求 const getList = () => { loading.value = true selectedRows.value = [] @@ -248,15 +264,18 @@ const getList = () => { }, 120) } +// 页面初始化时加载一次列表 onMounted(() => { getList() }) +// 搜索:回到第一页再重新筛选 const handleSearch = () => { currentPage.value = 1 getList() } +// 重置:恢复默认搜索条件 const handleReset = () => { searchForm.value = { account: '', @@ -266,10 +285,12 @@ const handleReset = () => { getList() } +// 表格勾选变化 const handleSelectionChange = (rows: TableRow[]) => { selectedRows.value = rows } +// 审核通过:当前保留前端提示,等待后续接接口 const handleApprove = () => { if (!selectedRows.value.length) { ElMessage.warning('请先选择要通过的记录') @@ -278,6 +299,7 @@ const handleApprove = () => { ElMessage.success('页面已完成,接口后续接入') } +// 审核驳回:当前保留前端提示,等待后续接接口 const handleReject = () => { if (!selectedRows.value.length) { ElMessage.warning('请先选择要驳回的记录') @@ -286,10 +308,12 @@ const handleReject = () => { ElMessage.success('页面已完成,接口后续接入') } +// 导出:当前保留前端提示,等待后续接接口 const handleExport = () => { ElMessage.success('页面已完成,接口后续接入') } +// 分页变化:更新页码和每页条数后重新切片数据 const handlePaginationChange = (page: { currentPage: number; pageSize: number }) => { currentPage.value = page.currentPage pageSize.value = page.pageSize @@ -303,6 +327,7 @@ const handlePaginationChange = (page: { currentPage: number; pageSize: number }) padding-bottom: 70px; box-sizing: border-box; + // 覆盖公共搜索组件默认的弹性拉伸,让当前页搜索项宽度按配置展示 :deep(.search-container .el-form) { flex-wrap: wrap; align-items: center; @@ -317,6 +342,7 @@ const handlePaginationChange = (page: { currentPage: number; pageSize: number }) width: 100%; } + // 表格容器高度预留给顶部搜索区和底部分页 .table-wrapper { height: calc(100vh - 210px); background: #fff; diff --git a/src/views/capital/rechangeCheck/options.ts b/src/views/capital/rechangeCheck/options.ts index 9467d36..44a6bc2 100644 --- a/src/views/capital/rechangeCheck/options.ts +++ b/src/views/capital/rechangeCheck/options.ts @@ -1,5 +1,7 @@ +// 搜索区域配置 export const rechangeCheckSearch = [ { + // 存款账户关键词 prop: 'account', label: '存款账户', type: 'input' as const, @@ -7,6 +9,7 @@ export const rechangeCheckSearch = [ width: '220px' }, { + // 客户类型:1=客户,2=代理 prop: 'userType', label: '客户类型', type: 'select' as const, @@ -19,8 +22,7 @@ export const rechangeCheckSearch = [ } ] - - +// 表格列配置 export const rechangeCheckTableColumns = [ { prop: 'account', label: '账户', align: 'center' as const, width: 140 }, { prop: 'agentName', label: '所属代理', align: 'center' as const, width: 140 }, diff --git a/src/views/capital/withdraw/index.vue b/src/views/capital/withdraw/index.vue index 8b0fc0d..5e08a04 100644 --- a/src/views/capital/withdraw/index.vue +++ b/src/views/capital/withdraw/index.vue @@ -1,7 +1,334 @@ - - - 取款 + + + + {{ withdrawBaseInfo.channelName }} + + + + + + 取款账户 + + + + + + + 支持币种 + + {{ withdrawForm.currency }} + + + + + 取款金额 + + + + {{ withdrawForm.currency }} + + + + + + {{ amount }} + + + + + + + 确认 + + + + + + + + + + + + {{ field.label }} + + + + + + + + 取消 + 确定 + + + + - + + + diff --git a/src/views/capital/withdraw/options.ts b/src/views/capital/withdraw/options.ts new file mode 100644 index 0000000..0b30aa0 --- /dev/null +++ b/src/views/capital/withdraw/options.ts @@ -0,0 +1,45 @@ +// 取款页面的基础信息:当前先用本地静态数据,后续可替换成接口返回值。 +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', + }, +] diff --git a/src/views/capital/withdrawCheck/index.vue b/src/views/capital/withdrawCheck/index.vue index a4b989f..2bd7f1a 100644 --- a/src/views/capital/withdrawCheck/index.vue +++ b/src/views/capital/withdrawCheck/index.vue @@ -1,7 +1,353 @@ - - - 取款审核 + + + + + + 通过 + 驳回 + 导出 + + + + + + + + + + + + + {{ (currentPage - 1) * pageSize + scope.$index + 1 }} + + + + + + + + + + + - + + + diff --git a/src/views/capital/withdrawCheck/options.ts b/src/views/capital/withdrawCheck/options.ts new file mode 100644 index 0000000..3ec909c --- /dev/null +++ b/src/views/capital/withdrawCheck/options.ts @@ -0,0 +1,42 @@ +// 搜索区域配置 +export const withdrawCheckSearch = [ + { + // 取款账户关键词 + prop: 'account', + label: '取款账户', + type: 'input' as const, + placeholder: '请输入取款账户', + width: '220px' + }, + { + // 客户类型:1=客户,2=代理 + prop: 'userType', + label: '客户类型', + type: 'select' as const, + placeholder: '请选择客户类型', + width: '180px', + options: [ + { label: '客户', value: 1 }, + { label: '代理', value: 2 } + ] + } +] + +// 表格列配置 +export const withdrawCheckTableColumns = [ + { prop: 'account', label: '账户', align: 'center' as const, width: 140 }, + { prop: 'agentName', label: '所属代理', align: 'center' as const, width: 140 }, + { prop: 'walletAddress', label: '钱包地址', align: 'center' as const, width: 220 }, + { prop: 'walletType', label: '钱包类型', align: 'center' as const, width: 120 }, + { prop: 'holderName', label: '账户持有人姓名', align: 'center' as const, width: 160 }, + { prop: 'bankName', label: '银行名称', align: 'center' as const, width: 160 }, + { prop: 'bankCode', label: '银行识别代码', align: 'center' as const, width: 160 }, + { prop: 'bankAddress', label: '银行地址', align: 'center' as const, width: 200 }, + { prop: 'withdrawAmount', label: '取款金额', align: 'center' as const, width: 120 }, + { prop: 'deductAmount', label: '取款扣除金额', align: 'center' as const, width: 140 }, + { prop: 'withdrawCurrency', label: '取款币种', align: 'center' as const, width: 120 }, + { prop: 'arrivalAmount', label: '到账金额', align: 'center' as const, width: 120 }, + { prop: 'arrivalCurrency', label: '到账币种', align: 'center' as const, width: 120 }, + { prop: 'feeAmount', label: '手续费', align: 'center' as const, width: 100 }, + { prop: 'positionAmount', label: '头寸', align: 'center' as const, width: 100 } +] diff --git a/src/views/order/rechange/index.vue b/src/views/order/rechange/index.vue index d484388..807d2ac 100644 --- a/src/views/order/rechange/index.vue +++ b/src/views/order/rechange/index.vue @@ -1,7 +1,200 @@ - - - 充值订单 + + + + + + + + + + - + + + diff --git a/src/views/order/rechange/options.ts b/src/views/order/rechange/options.ts new file mode 100644 index 0000000..4cf3d75 --- /dev/null +++ b/src/views/order/rechange/options.ts @@ -0,0 +1,60 @@ +// 充值订单搜索项:按接口参数保留订单号、用户名称、状态、结束时间、开始时间。 +export const search = [ + { + prop: 'orderNo', + label: '订单号', + type: 'input' as const, + placeholder: '请输入流水号', + width: '210px', + }, + { + prop: 'userName', + label: '用户名称', + type: 'input' as const, + placeholder: '请输入用户名', + width: '190px', + }, + { + prop: 'status', + label: '状态', + type: 'select' as const, + placeholder: '请选择状态', + width: '140px', + options: [ + { label: '未审核', value: '1' }, + { label: '未付款', value: '2' }, + { label: '已付款', value: '3' }, + { label: '驳回', value: '4' }, + ], + }, + { + prop: 'startTime', + label: '开始时间', + type: 'date' as const, + dateType: 'date' as const, + valueFormat: 'YYYY-MM-DD', + placeholder: '请选择开始时间', + width: '150px', + }, + { + prop: 'endTime', + label: '结束时间', + type: 'date' as const, + dateType: 'date' as const, + valueFormat: 'YYYY-MM-DD', + placeholder: '请选择结束时间', + width: '150px', + }, + +] + +// 充值订单表格列:对应接口数据映射后的列表字段。 +export const tableColumns = [ + { prop: 'orderNo', label: '订单号', align: 'center' as const }, + { prop: 'currency', label: '充值币种', align: 'center' as const }, + { prop: 'amount', label: '金额', align: 'center' as const }, + { prop: 'statusText', label: '状态', align: 'center' as const }, + { prop: 'rechangeTime', label: '充值时间', align: 'center' as const }, + { prop: 'rechangeAccount', label: '充值账号', align: 'center' as const }, +] + diff --git a/src/views/order/withdraw/index.vue b/src/views/order/withdraw/index.vue index 3b91fb0..5b176c4 100644 --- a/src/views/order/withdraw/index.vue +++ b/src/views/order/withdraw/index.vue @@ -1,7 +1,176 @@ - - - 提现 + + + + + + 导出 + + + + + + + + + + - + + + diff --git a/src/views/order/withdraw/options.ts b/src/views/order/withdraw/options.ts new file mode 100644 index 0000000..9ba1635 --- /dev/null +++ b/src/views/order/withdraw/options.ts @@ -0,0 +1,38 @@ +// 提现订单搜索项:按截图保留订单号、开始时间、结束时间。 +export const search = [ + { + prop: 'orderNo', + label: '订单号', + type: 'input' as const, + placeholder: '请输入流水号', + width: '210px', + }, + { + prop: 'startTime', + label: '开始时间', + type: 'date' as const, + dateType: 'date' as const, + valueFormat: 'YYYY-MM-DD', + placeholder: '请选择开始时间', + width: '150px', + }, + { + prop: 'endTime', + label: '结束时间', + type: 'date' as const, + dateType: 'date' as const, + valueFormat: 'YYYY-MM-DD', + placeholder: '请选择结束时间', + width: '150px', + }, +] + +// 提现订单表格列:对应截图中的列表表头。 +export const tableColumns = [ + { prop: 'orderNo', label: '订单号', align: 'center' as const }, + { prop: 'currency', label: '提现币种', align: 'center' as const }, + { prop: 'amount', label: '金额', align: 'center' as const }, + { prop: 'statusText', label: '状态', align: 'center' as const }, + { prop: 'withdrawTime', label: '提现时间', align: 'center' as const }, + { prop: 'withdrawAccount', label: '提现账号', align: 'center' as const }, +]