feat: 添加收款方式和提现订单功能,整合支付和提现组件至用户界面

This commit is contained in:
2026-01-19 18:56:12 +07:00
parent 1f4acce75a
commit 53b7f55eb7
3 changed files with 265 additions and 2 deletions

View File

@@ -3,9 +3,11 @@ import { h, useTemplateRef } from 'vue';
import { useDialog } from 'naive-ui';
import dayjs from 'dayjs';
import { client, safeClient } from '@/service/api';
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
import type { TableBaseColumns, TableFetchData, TableFilterColumns, TableInst } from '@/components/table';
import Wallet from './components/wallet.vue';
import Address from './components/address.vue';
import Payment from './components/payment.vue';
import Withdraw from './components/withdraw.vue';
const dialog = useDialog();
@@ -50,7 +52,7 @@ const columns: TableBaseColumns = [
{
key: 'operations',
title: '操作',
width: 200,
width: 300,
fixed: 'right',
operations: (row: any) => [
{
@@ -76,10 +78,49 @@ const columns: TableBaseColumns = [
content: () => h(Address, { userId: row.userId })
});
}
},
{
contentText: '收款方式',
size: 'small',
onClick: () => {
dialog.create({
title: '收款方式',
showIcon: false,
style: { width: '1000px' },
content: () => h(Payment, { userId: row.userId })
});
}
},
{
contentText: '提现订单',
size: 'small',
onClick: () => {
dialog.create({
title: '提现订单',
showIcon: false,
style: { width: '1000px' },
content: () => h(Withdraw, { userId: row.userId })
});
}
}
]
}
];
const filterColumns: TableFilterColumns = [
{
key: 'uid',
title: 'UID'
},
{
key: 'username',
title: '手机号'
},
{
key: 'name',
title: '姓名'
}
];
</script>
<template>
@@ -87,6 +128,7 @@ const columns: TableBaseColumns = [
ref="tableInst"
:fetch-data="fetchData"
:columns="columns"
:filter-columns="filterColumns"
:scroll-x="800"
:header-operations="{
add: false,