|  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { ProDialog, toThousand } from '@bole-core/components'; | 
|---|
|  |  |  | import { usePortraitTable } from '@/hooks'; | 
|---|
|  |  |  | import * as userServices from '@/services/api/user'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  | import { EnumWalletTransactionStatusText } from '@/constants'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'FinanceDetailDialog', | 
|---|
|  |  |  | 
|---|
|  |  |  | (e: 'onCancel'): void; | 
|---|
|  |  |  | }>(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { data: detail, refetch } = useQuery({ | 
|---|
|  |  |  | queryKey: ['userResumeServices/getUserResume', form.value.id], | 
|---|
|  |  |  | queryFn: async () => { | 
|---|
|  |  |  | return await userServices.getPersonalUserTransaction({ id: form.value.id }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | placeholderData: () => ({} as API.GetPersonalUserTransactionQueryResult), | 
|---|
|  |  |  | enabled: computed(() => !!form.value.id), | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | watch( | 
|---|
|  |  |  | () => form.value.id, | 
|---|
|  |  |  | (val) => { | 
|---|
|  |  |  | if (val) { | 
|---|
|  |  |  | refetch(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { portraitTableProps } = usePortraitTable({ | 
|---|
|  |  |  | data: form, | 
|---|
|  |  |  | data: detail, | 
|---|
|  |  |  | columns: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '付款人账户', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'payerAccount', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '收款人账户', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'receiveAccount', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '付款人名称', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'payerName', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '收款人名称', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'receiveName', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '付款人开户行', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'payerBank', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '收款人开户行', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'receiveBank', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '币种', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'currency', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '交易金额', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | key: 'actualAmount', | 
|---|
|  |  |  | type: 'money', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '用途', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'purpose', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '摘要', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'failReason', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '交易时间', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'transDate', | 
|---|
|  |  |  | type: 'date', | 
|---|
|  |  |  | format: 'YYYY-MM-DD HH:mm:ss', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | label: '交易状态', | 
|---|
|  |  |  | key: 'id', | 
|---|
|  |  |  | type: 'text', | 
|---|
|  |  |  | key: 'transactionStatus', | 
|---|
|  |  |  | type: 'enum', | 
|---|
|  |  |  | valueEnum: EnumWalletTransactionStatusText, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | }); | 
|---|