Files
tydata-admin/apps/web-antd/src/views/agent/agent-withdrawal/list.vue
18278715334 1d17926c70
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
fix
2026-01-04 18:58:18 +08:00

106 lines
2.2 KiB
Vue

<script lang="ts" setup>
import { computed } from 'vue';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { Button, Space } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getAgentWithdrawalList } from '#/api/agent';
import ReviewModal from './modules/review-modal.vue';
import { useWithdrawalColumns, useWithdrawalFormSchema } from './data';
interface Props {
agentId?: number;
}
interface QueryParams {
currentPage: number;
pageSize: number;
[key: string]: any;
}
const props = defineProps<Props>();
const queryParams = computed(() => ({
...(props.agentId ? { agent_id: props.agentId } : {}),
}));
// 审核弹窗
const [ReviewDrawer, reviewDrawerApi] = useVbenDrawer({
connectedComponent: ReviewModal,
destroyOnClose: true,
});
// 操作处理
function onActionClick(e: any) {
const { code, row } = e;
switch (code) {
case 'review':
// 打开审核弹窗
reviewDrawerApi.setData(row).open();
break;
}
}
// 刷新列表
function onRefresh() {
gridApi.query();
}
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useWithdrawalFormSchema(),
submitOnChange: true,
},
gridOptions: {
columns: useWithdrawalColumns(),
proxyConfig: {
ajax: {
query: async ({
page,
}: {
page: QueryParams;
}) => {
return await getAgentWithdrawalList({
...queryParams.value,
page: page.currentPage,
pageSize: page.pageSize,
});
},
},
props: {
result: 'items',
total: 'total',
},
},
toolbarConfig: {
custom: true,
export: false,
refresh: { code: 'query' },
search: true,
zoom: true,
},
},
});
</script>
<template>
<Page :auto-content-height="!agentId">
<ReviewDrawer @success="onRefresh" />
<Grid :table-title="agentId ? '提现记录列表' : '所有提现记录'">
<template #operation="{ row }">
<Space>
<Button
v-if="row.status === 1"
type="link"
@click="onActionClick({ code: 'review', row })"
>
审核
</Button>
</Space>
</template>
</Grid>
</Page>
</template>