更新提现相关功能,新增已批准提现列表页面及路由,优化提现和待审核提现页面的数据获取逻辑,添加过滤功能
This commit is contained in:
@@ -229,6 +229,7 @@ const local: App.I18n.Schema = {
|
|||||||
deposit_fiat: '法币充值',
|
deposit_fiat: '法币充值',
|
||||||
withdraw: '提现管理',
|
withdraw: '提现管理',
|
||||||
withdraw_fiat: '法币提现',
|
withdraw_fiat: '法币提现',
|
||||||
|
withdraw_approved: '已批准提现列表',
|
||||||
rwa: 'RWA管理',
|
rwa: 'RWA管理',
|
||||||
rwa_product: 'RWA产品',
|
rwa_product: 'RWA产品',
|
||||||
rwa_producttype: '产品类型',
|
rwa_producttype: '产品类型',
|
||||||
|
|||||||
@@ -28,5 +28,6 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
|
|||||||
user_bankcard: () => import("@/views/user/bankcard/index.vue"),
|
user_bankcard: () => import("@/views/user/bankcard/index.vue"),
|
||||||
user_list: () => import("@/views/user/list/index.vue"),
|
user_list: () => import("@/views/user/list/index.vue"),
|
||||||
user_transfer: () => import("@/views/user/transfer/index.vue"),
|
user_transfer: () => import("@/views/user/transfer/index.vue"),
|
||||||
|
withdraw_approved: () => import("@/views/withdraw/approved/index.vue"),
|
||||||
withdraw_fiat: () => import("@/views/withdraw/fiat/index.vue"),
|
withdraw_fiat: () => import("@/views/withdraw/fiat/index.vue"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -184,6 +184,15 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
order: 3
|
order: 3
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
name: 'withdraw_approved',
|
||||||
|
path: '/withdraw/approved',
|
||||||
|
component: 'view.withdraw_approved',
|
||||||
|
meta: {
|
||||||
|
title: 'withdraw_approved',
|
||||||
|
i18nKey: 'route.withdraw_approved'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'withdraw_fiat',
|
name: 'withdraw_fiat',
|
||||||
path: '/withdraw/fiat',
|
path: '/withdraw/fiat',
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ const routeMap: RouteMap = {
|
|||||||
"user_list": "/user/list",
|
"user_list": "/user/list",
|
||||||
"user_transfer": "/user/transfer",
|
"user_transfer": "/user/transfer",
|
||||||
"withdraw": "/withdraw",
|
"withdraw": "/withdraw",
|
||||||
|
"withdraw_approved": "/withdraw/approved",
|
||||||
"withdraw_fiat": "/withdraw/fiat"
|
"withdraw_fiat": "/withdraw/fiat"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
src/typings/elegant-router.d.ts
vendored
2
src/typings/elegant-router.d.ts
vendored
@@ -34,6 +34,7 @@ declare module "@elegant-router/types" {
|
|||||||
"user_list": "/user/list";
|
"user_list": "/user/list";
|
||||||
"user_transfer": "/user/transfer";
|
"user_transfer": "/user/transfer";
|
||||||
"withdraw": "/withdraw";
|
"withdraw": "/withdraw";
|
||||||
|
"withdraw_approved": "/withdraw/approved";
|
||||||
"withdraw_fiat": "/withdraw/fiat";
|
"withdraw_fiat": "/withdraw/fiat";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,6 +106,7 @@ declare module "@elegant-router/types" {
|
|||||||
| "user_bankcard"
|
| "user_bankcard"
|
||||||
| "user_list"
|
| "user_list"
|
||||||
| "user_transfer"
|
| "user_transfer"
|
||||||
|
| "withdraw_approved"
|
||||||
| "withdraw_fiat"
|
| "withdraw_fiat"
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const columns: TableBaseColumns = [
|
|||||||
key: 'id'
|
key: 'id'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Code',
|
title: '产品代码',
|
||||||
key: 'code'
|
key: 'code'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ const columns: TableBaseColumns = [
|
|||||||
key: 'name'
|
key: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '估值',
|
title: '产品估值',
|
||||||
key: 'estimatedValue'
|
key: 'estimatedValue'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -41,7 +41,7 @@ const columns: TableBaseColumns = [
|
|||||||
key: 'categoryId'
|
key: 'categoryId'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建人',
|
title: '创建人ID',
|
||||||
key: 'createdBy'
|
key: 'createdBy'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref, useTemplateRef } from 'vue';
|
import { useTemplateRef } from 'vue';
|
||||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
import { NDatePicker, useDialog, useMessage } from 'naive-ui';
|
||||||
import { client, safeClient } from '@/service/api';
|
import { client, safeClient } from '@/service/api';
|
||||||
import { DepositTypeEnum } from '@/enum';
|
|
||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
|
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
const fetchData: TableFetchData = () => {
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
return safeClient(() =>
|
return safeClient(() =>
|
||||||
client.api.admin.rwa.issuance.categories.get({
|
client.api.admin.rwa.issuance.categories.get({
|
||||||
query: {}
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -85,10 +87,22 @@ const columns: TableBaseColumns = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: 'description',
|
||||||
|
key: 'description'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'name',
|
||||||
|
key: 'name',
|
||||||
|
component: NDatePicker
|
||||||
|
}
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" :filter-columns="filterColumns" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref, useTemplateRef } from 'vue';
|
import { h, ref, useTemplateRef } from 'vue';
|
||||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
import { NDatePicker, NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { client, safeClient } from '@/service/api';
|
import { client, safeClient } from '@/service/api';
|
||||||
import { DepositTypeEnum } from '@/enum';
|
|
||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
|
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
const fetchData: TableFetchData = () => {
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
return safeClient(() =>
|
return safeClient(() =>
|
||||||
client.api.admin.bank_account.banks.get({
|
client.api.admin.bank_account.banks.get({
|
||||||
query: {}
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -107,10 +109,21 @@ const columns: TableBaseColumns = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: '银行名称',
|
||||||
|
key: 'nameCn'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'nameEn',
|
||||||
|
key: 'nameEn'
|
||||||
|
}
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
<TableBase ref="tableInst" :columns="columns" :filter-columns="filterColumns" :fetch-data="fetchData" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref, useTemplateRef } from 'vue';
|
import { useTemplateRef } from 'vue';
|
||||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
import { NDatePicker, useDialog, useMessage } from 'naive-ui';
|
||||||
import { client, safeClient } from '@/service/api';
|
import { client, safeClient } from '@/service/api';
|
||||||
import { DepositTypeEnum } from '@/enum';
|
|
||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
|
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
const fetchData: TableFetchData = () => {
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
return safeClient(() =>
|
return safeClient(() =>
|
||||||
client.api.admin.bank_account.get({
|
client.api.admin.bank_account.get({
|
||||||
query: {}
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -85,10 +87,22 @@ const columns: TableBaseColumns = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: '银行名称',
|
||||||
|
key: 'bankName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡号',
|
||||||
|
key: 'bankCode',
|
||||||
|
component: NDatePicker
|
||||||
|
}
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
<TableBase ref="tableInst" :columns="columns" :filter-columns="filterColumns" :fetch-data="fetchData" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
@@ -1,56 +1,108 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref, useTemplateRef } from 'vue';
|
import { useTemplateRef } from 'vue';
|
||||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
import { NDatePicker, useDialog, useMessage } from 'naive-ui';
|
||||||
import { client, safeClient } from '@/service/api';
|
import { client, safeClient } from '@/service/api';
|
||||||
import { DepositTypeEnum } from '@/enum';
|
|
||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
|
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
const fetchData: TableFetchData = () => {
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
return safeClient(() =>
|
return safeClient(() =>
|
||||||
client.api.admin.transfer.get({
|
client.api.admin.transfer.get({
|
||||||
query: {}
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns: TableBaseColumns = [
|
const columns: TableBaseColumns = [
|
||||||
{
|
{
|
||||||
title: 'ID',
|
title: '订单ID',
|
||||||
key: 'id'
|
key: 'id'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'orderNo',
|
title: '订单号',
|
||||||
key: 'orderNo'
|
key: 'orderNo'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'fromUserId',
|
title: '转出用户ID',
|
||||||
key: 'fromUserId'
|
key: 'fromUserId'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'toUserId',
|
title: '转入用户ID',
|
||||||
key: 'toUserId'
|
key: 'toUserId'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'assetCode',
|
title: '资产代码',
|
||||||
key: 'assetCode'
|
key: 'assetCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'amount',
|
title: '转账金额',
|
||||||
key: 'amount'
|
key: 'amount'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'fee',
|
title: '手续费',
|
||||||
key: 'fee'
|
key: 'fee'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
|
key: 'operation',
|
||||||
|
width: 160,
|
||||||
|
operations: (row: any) => [
|
||||||
|
{
|
||||||
|
contentText: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
onClick: () => {
|
||||||
|
tableInst.value?.reload();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
contentText: '删除',
|
||||||
|
type: 'error',
|
||||||
|
ghost: true,
|
||||||
|
size: 'small',
|
||||||
|
onClick: async () => {
|
||||||
|
dialog.create({
|
||||||
|
title: '提示',
|
||||||
|
positiveText: '是',
|
||||||
|
negativeText: '否',
|
||||||
|
content: '确认删除该银行信息?',
|
||||||
|
onPositiveClick: async () => {
|
||||||
|
safeClient(() =>
|
||||||
|
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||||
|
reviewNote: '管理员拒绝充值'
|
||||||
|
})
|
||||||
|
);
|
||||||
|
// tableInst.value?.reload();
|
||||||
|
message.success('删除成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: '资产代码',
|
||||||
|
key: 'assetCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '转账金额',
|
||||||
|
key: 'amount',
|
||||||
|
component: NDatePicker
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
<TableBase ref="tableInst" :columns="columns" :filter-columns="filterColumns" :fetch-data="fetchData" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
133
src/views/withdraw/approved/index.vue
Normal file
133
src/views/withdraw/approved/index.vue
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import { h, ref, useTemplateRef } from 'vue';
|
||||||
|
import { NDatePicker, NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import { client, safeClient } from '@/service/api';
|
||||||
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
|
|
||||||
|
const dialog = useDialog();
|
||||||
|
const message = useMessage();
|
||||||
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
|
return safeClient(() =>
|
||||||
|
client.api.admin.withdraw.approved.get({
|
||||||
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns: TableBaseColumns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '提现金额',
|
||||||
|
key: 'amount'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '实际到账金额',
|
||||||
|
key: 'actualAmount'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产代码',
|
||||||
|
key: 'assetCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡ID',
|
||||||
|
key: 'bankAccountId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行转账凭证',
|
||||||
|
key: 'bankTransferProof'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '现金代理ID',
|
||||||
|
key: 'cashAgentId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '现金提取时间',
|
||||||
|
key: 'cashPickedUpAt',
|
||||||
|
render(row: any) {
|
||||||
|
return h('span', {}, row.cashPickedUpAt ? dayjs(row.cashPickedUpAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '现金提取码', key: 'cashPickupCode' },
|
||||||
|
{
|
||||||
|
title: 'createdAt',
|
||||||
|
key: 'createdAt',
|
||||||
|
render(row: any) {
|
||||||
|
return h('span', {}, row.createdAt ? dayjs(row.createdAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'updatedAt',
|
||||||
|
key: 'updatedAt',
|
||||||
|
render(row: any) {
|
||||||
|
return h('span', {}, row.updatedAt ? dayjs(row.updatedAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'deletedAt',
|
||||||
|
key: 'deletedAt',
|
||||||
|
render(row: any) {
|
||||||
|
return h('span', {}, row.deletedAt ? dayjs(row.deletedAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
|
key: 'operation',
|
||||||
|
width: 160,
|
||||||
|
operations: (row: any) => [
|
||||||
|
{
|
||||||
|
contentText: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
onClick: () => {
|
||||||
|
tableInst.value?.reload();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
contentText: '删除',
|
||||||
|
type: 'error',
|
||||||
|
ghost: true,
|
||||||
|
size: 'small',
|
||||||
|
onClick: async () => {
|
||||||
|
dialog.create({
|
||||||
|
title: '提示',
|
||||||
|
positiveText: '是',
|
||||||
|
negativeText: '否',
|
||||||
|
content: '确认删除该银行信息?',
|
||||||
|
onPositiveClick: async () => {
|
||||||
|
safeClient(() =>
|
||||||
|
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||||
|
reviewNote: '管理员拒绝充值'
|
||||||
|
})
|
||||||
|
);
|
||||||
|
// tableInst.value?.reload();
|
||||||
|
message.success('删除成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: '提现金额',
|
||||||
|
key: 'amount'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<TableBase ref="tableInst" :columns="columns" :filter-columns="filterColumns" :fetch-data="fetchData" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="css" scoped></style>
|
||||||
@@ -1,13 +1,24 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useTemplateRef } from 'vue';
|
import { useTemplateRef } from 'vue';
|
||||||
|
import { NDatePicker, useDialog, useMessage } from 'naive-ui';
|
||||||
import { client, safeClient } from '@/service/api';
|
import { client, safeClient } from '@/service/api';
|
||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
import TableBase from '@/components/table/table-base.vue';
|
import TableBase from '@/components/table/table-base.vue';
|
||||||
|
|
||||||
|
const dialog = useDialog();
|
||||||
|
const message = useMessage();
|
||||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
const fetchData: TableFetchData = () => {
|
// 获取待审核的提现订单
|
||||||
return safeClient(() => client.api.admin.withdraw.pending.get());
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
|
return safeClient(() =>
|
||||||
|
client.api.admin.withdraw.pending.get({
|
||||||
|
query: {
|
||||||
|
...pagination,
|
||||||
|
...filter
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns: TableBaseColumns = [
|
const columns: TableBaseColumns = [
|
||||||
@@ -19,11 +30,36 @@ const columns: TableBaseColumns = [
|
|||||||
title: '提现金额',
|
title: '提现金额',
|
||||||
key: 'amount'
|
key: 'amount'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '资产代码',
|
||||||
|
key: 'assetCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '实际到账金额',
|
||||||
|
key: 'actualAmount'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡ID',
|
||||||
|
key: 'bankAccountId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡转账凭证',
|
||||||
|
key: 'bankTransferProof'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '现金代理ID',
|
||||||
|
key: 'cashAgentId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '现金提取时间',
|
||||||
|
key: 'cashPickedUpAt'
|
||||||
|
},
|
||||||
|
{ title: '现金提取码', key: 'cashPickupCode' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
operations: row => [
|
operations: (row: any) => [
|
||||||
{
|
{
|
||||||
contentText: '处理',
|
contentText: '处理',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -41,10 +77,28 @@ const columns: TableBaseColumns = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: 'id',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '提现金额',
|
||||||
|
key: 'amount',
|
||||||
|
component: NDatePicker
|
||||||
|
}
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TableBase :columns="columns" :fetch-data="fetchData" />
|
<TableBase
|
||||||
|
ref="tableInst"
|
||||||
|
show-header-operation
|
||||||
|
:columns="columns"
|
||||||
|
:filter-columns="filterColumns"
|
||||||
|
:fetch-data="fetchData"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user