diff --git a/src/api/modules/capital/withdraw.ts b/src/api/modules/capital/withdraw.ts
index 527c765..906878c 100644
--- a/src/api/modules/capital/withdraw.ts
+++ b/src/api/modules/capital/withdraw.ts
@@ -60,4 +60,17 @@ export const getWithdrawReviewList = (params: {
// 提现审核操作(通过/驳回)
export const withdrawReviewOrder = (params: { id: number; status: number }) => {
return request.post('/withdraw/withdrawReviewOrder', params)
+}
+
+// 获取取款订单列表
+export const getWithdrawOrderList = (params: {
+ page: number
+ page_size: number
+ order_no?: string
+ start_time?: string
+ end_time?: string
+ status?: number
+ user_name?: string
+}) => {
+ return request.get('/withdraw/withdrawOrderList', params as any)
}
\ No newline at end of file
diff --git a/src/components/common/Table.vue b/src/components/common/Table.vue
index 0f12c14..5219091 100644
--- a/src/components/common/Table.vue
+++ b/src/components/common/Table.vue
@@ -38,6 +38,9 @@
{{ formatDecimalTruncate(row[column.prop]) }}
+
+ {{ getOptionLabel(column.options, row[column.prop]) }}
+
@@ -61,6 +64,13 @@ import { ref, watch } from 'vue'
import type { TableInstance } from 'element-plus'
import { formatDecimalTruncate } from '@/utils/formatDecimal'
+// 根据选项配置获取标签
+const getOptionLabel = (options: { label: string; value: string | number }[], value: any): string => {
+ if (value === null || value === undefined) return ''
+ const option = options.find((opt) => opt.value === value)
+ return option?.label || String(value)
+}
+
// 定义表格列配置接口
interface TableColumn {
prop?: string
@@ -71,6 +81,7 @@ interface TableColumn {
slotName?: string // 具名插槽名称
sortable?: boolean // 是否可排序
isNumber?: boolean // 是否为数字类型(自动截取小数位)
+ options?: { label: string; value: string | number }[] // 选项配置(用于状态映射等)
}
// 定义表格组件属性接口
diff --git a/src/views/order/withdraw/index.vue b/src/views/order/withdraw/index.vue
index edd84d9..3960eb6 100644
--- a/src/views/order/withdraw/index.vue
+++ b/src/views/order/withdraw/index.vue
@@ -10,145 +10,179 @@
-
-
+
+
-
+
diff --git a/src/views/order/withdraw/options.ts b/src/views/order/withdraw/options.ts
index 1245400..0f69ce8 100644
--- a/src/views/order/withdraw/options.ts
+++ b/src/views/order/withdraw/options.ts
@@ -1,38 +1,66 @@
// 提现订单搜索项:按截图保留订单号、开始时间、结束时间。
export const search = [
{
- prop: 'orderNo',
- label: '订单号',
+ prop: 'user_name',
+ label: '账户持有人',
type: 'input' as const,
- placeholder: '请输入流水号',
- width: '210px',
+ placeholder: '请输入账户持有人',
+ width: '210',
},
{
prop: 'startTime',
label: '开始时间',
type: 'date' as const,
- dateType: 'date' as const,
- valueFormat: 'YYYY-MM-DD',
+ dateType: 'datetime' as const,
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择开始时间',
- width: '150px',
+ width: '200',
},
{
prop: 'endTime',
label: '结束时间',
type: 'date' as const,
- dateType: 'date' as const,
- valueFormat: 'YYYY-MM-DD',
+ dateType: 'datetime' as const,
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择结束时间',
- width: '150px',
+ width: '200',
},
]
// 提现订单表格列:对应截图中的列表表头。
export const tableColumns = [
- { prop: 'orderNo', label: '订单号', align: 'center' as const },
- { prop: 'currency', label: '提现币种', align: 'center' as const },
- { prop: 'amount', label: '金额', align: 'center' as const, isNumber: true },
- { prop: 'statusText', label: '状态', align: 'center' as const },
- { prop: 'withdrawTime', label: '提现时间', align: 'center' as const },
- { prop: 'withdrawAccount', label: '提现账号', align: 'center' as const },
+ { prop: 'trade_id', label: '订单号', align: 'center' as const, width: 200 },
+ { prop: 'user_name', label: '账户持有人', width: 160, align: 'center' as const },
+ { prop: 'withdraw_currency_symbol', label: '取款币种', align: 'center' as const, width: 100 },
+ { prop: 'withdraw_amount', label: '取款金额', align: 'center' as const, width: 120, isNumber: true },
+ { prop: 'real_currency_symbol', label: '到账币种', align: 'center' as const, width: 100 },
+ { prop: 'real_amount', label: '到账金额', align: 'center' as const, width: 120, isNumber: true },
+ { prop: 'rate', label: '汇率', align: 'center' as const, width: 100 },
+ { prop: 'channel_name', label: '渠道', align: 'center' as const, width: 140 },
+ { prop: 'withdraw_service_fee', label: '服务费', align: 'center' as const, width: 100, isNumber: true },
+ { prop: 'withdraw_head_fee', label: '总部手续费', align: 'center' as const, width: 120, isNumber: true },
+ { prop: 'withdraw_fee_handle', label: '代理手续费', align: 'center' as const, width: 120, isNumber: true },
+ { prop: 'withdraw_point_diff', label: '点差', align: 'center' as const, width: 100, isNumber: true },
+ { prop: 'withdraw_risk_fee', label: '风控费', width: 140, align: 'center' as const, isNumber: true },
+ { prop: 'withdraw_address', label: '提现地址', width: 140, align: 'center' as const },
+ {
+ prop: 'status', label: '状态', align: 'center' as const, width: 140, options: [{
+ label: '未审核',
+ value: 1
+ },
+ {
+ label: '审核成功',
+ value: 2
+ },
+ {
+ label: '已提交',
+ value: 3
+ },
+ {
+ label: '驳回',
+ value: 4
+ },]
+ },
+ { prop: 'created_at', label: '申请时间', width: 240, align: 'center' as const }
]
+