feat: 添加上分记录管理
This commit is contained in:
67
src/views/user/user/components/payment.vue
Normal file
67
src/views/user/user/components/payment.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user