68 lines
1.3 KiB
Vue
68 lines
1.3 KiB
Vue
<script lang="ts" setup>
|
|
import { useTemplateRef } from 'vue';
|
|
import { client, safeClient } from '@/service/api';
|
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
|
|
|
defineOptions({
|
|
name: 'PaymentDialog'
|
|
});
|
|
|
|
const props = defineProps<{
|
|
userId: string;
|
|
}>();
|
|
|
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
|
|
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
|
return safeClient(() =>
|
|
client.api.admin.receipt_method.get({ query: { userId: props.userId, ...pagination, ...filter } })
|
|
);
|
|
};
|
|
|
|
const columns: TableBaseColumns = [
|
|
{
|
|
key: 'type',
|
|
title: '收款方式类型',
|
|
render: row => {
|
|
return row.type === 'bank_card' ? '银行卡' : '支付宝';
|
|
}
|
|
},
|
|
{
|
|
key: 'fullName',
|
|
title: '收款人姓名'
|
|
},
|
|
{
|
|
key: 'bankName',
|
|
title: '银行名称'
|
|
},
|
|
{
|
|
key: 'bankCardNumber',
|
|
title: '银行卡号'
|
|
},
|
|
{
|
|
key: 'bankBranchName',
|
|
title: '支行名称'
|
|
},
|
|
{
|
|
key: 'alipayName',
|
|
title: '支付宝名称'
|
|
},
|
|
{
|
|
key: 'alipayAccount',
|
|
title: '支付宝账号'
|
|
}
|
|
];
|
|
</script>
|
|
|
|
<template>
|
|
<TableBase
|
|
ref="tableInst"
|
|
:fetch-data="fetchData"
|
|
:columns="columns"
|
|
:scroll-x="800"
|
|
:show-header-operation="false"
|
|
/>
|
|
</template>
|
|
|
|
<style lang="css" scoped></style>
|