| | |
| | | import { FormInstance } from 'element-plus'; |
| | | import { ProDialog } from '@bole-core/components'; |
| | | import { usePortraitTableWithAttachment } from '@/hooks'; |
| | | import { convertApi2FormUrl } from '@/utils'; |
| | | import { convertApi2FormUrl, convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as enterpriseCooperationWalletServices from '@/services/api/enterpriseCooperationWallet'; |
| | | import * as standardOrderServices from '@/services/api/standardOrder'; |
| | | import { EnumStandardOrderSettlementStatusText } from '@/constants'; |
| | | import PortraitTableWithAttachment from '@/components/Table/PortraitTableWithAttachment.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'OrderSettlementDetailDialog', |
| | |
| | | ); |
| | | |
| | | const { data: detail, refetch } = useQuery({ |
| | | queryKey: [ |
| | | 'enterpriseCooperationWalletServices/getCooperationWalletRechargeTransaction', |
| | | form.value.id, |
| | | ], |
| | | queryKey: ['standardOrderServices/getStandardOrderSettlement', form.value.id], |
| | | queryFn: async () => { |
| | | return await enterpriseCooperationWalletServices.getCooperationWalletRechargeTransaction({ |
| | | return await standardOrderServices.getStandardOrderSettlement({ |
| | | id: form.value.id, |
| | | }); |
| | | }, |
| | | placeholderData: () => ({} as API.GetCooperationWalletRechargeTransactionQueryResult), |
| | | placeholderData: () => ({} as API.GetStandardOrderSettlementQueryResult), |
| | | enabled: computed(() => !!form.value.id), |
| | | }); |
| | | |
| | | const { portraitTableWithAttachmentProps } = usePortraitTableWithAttachment({ |
| | | data: detail, |
| | | annexList: computed(() => |
| | | detail.value?.files ? detail.value?.files.map((item) => convertApi2FormUrl(item)) : [] |
| | | detail.value?.ereceiptDownloadOssUrl |
| | | ? convertApi2FormUrlOnlyOne(detail.value?.ereceiptDownloadOssUrl) |
| | | : [] |
| | | ), |
| | | columns: [ |
| | | { |
| | | label: '付款人账户', |
| | | key: 'receiveUnit', |
| | | key: 'payerAccount', |
| | | }, |
| | | { |
| | | label: '收款人账户', |
| | | key: 'receiveName', |
| | | key: 'receiveAccount', |
| | | }, |
| | | { |
| | | label: '付款人名称', |
| | | key: 'receiveBank', |
| | | key: 'payerName', |
| | | }, |
| | | { |
| | | label: '收款人名称', |
| | | key: 'receiveAccount', |
| | | key: 'receiveName', |
| | | }, |
| | | { |
| | | label: '付款人开户行', |
| | | key: 'receiveAccount', |
| | | key: 'payerBank', |
| | | }, |
| | | { |
| | | label: '收款人开户行', |
| | | key: 'receiveAccount', |
| | | key: 'receiveBank', |
| | | }, |
| | | { |
| | | label: '币种', |
| | | key: 'receiveAccount', |
| | | key: 'currencyName', |
| | | }, |
| | | { |
| | | label: '结算金额', |
| | | key: 'amount', |
| | | key: 'settlementAmount', |
| | | type: 'money', |
| | | }, |
| | | { |
| | | label: '结算时间', |
| | | key: 'createdTime', |
| | | key: 'settlementTime', |
| | | type: 'date', |
| | | }, |
| | | { |
| | | label: '结算状态', |
| | | key: 'transactionStatus', |
| | | key: 'settlementStatus', |
| | | type: 'enum', |
| | | valueEnum: EnumStandardOrderSettlementStatusText, |
| | | }, |
| | | ], |
| | | }); |