From d32cd83674f9b0db0154e6228807e658539f8cd0 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 22 九月 2025 13:10:14 +0800
Subject: [PATCH] fix: bug

---
 src/views/FinanceManage/components/FinanceDetailDialog.vue |   64 +++++++++++++++++++------------
 1 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/src/views/FinanceManage/components/FinanceDetailDialog.vue b/src/views/FinanceManage/components/FinanceDetailDialog.vue
index 899ce02..381c8ee 100644
--- a/src/views/FinanceManage/components/FinanceDetailDialog.vue
+++ b/src/views/FinanceManage/components/FinanceDetailDialog.vue
@@ -12,13 +12,16 @@
 <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',
 });
 
 type Form = {
-  name?: string;
+  id?: string;
 };
 
 const visible = defineModel({ type: Boolean });
@@ -29,68 +32,79 @@
   (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: 'name',
-      type: 'text',
+      key: 'payerAccount',
     },
     {
       label: '鏀舵浜鸿处鎴�',
-      key: 'name',
-      type: 'text',
+      key: 'receiveAccount',
     },
     {
       label: '浠樻浜哄悕绉�',
-      key: 'name',
-      type: 'text',
+      key: 'payerName',
     },
     {
       label: '鏀舵浜哄悕绉�',
-      key: 'name',
-      type: 'text',
+      key: 'receiveName',
     },
     {
       label: '浠樻浜哄紑鎴疯',
-      key: 'name',
-      type: 'text',
+      key: 'payerBank',
     },
     {
       label: '鏀舵浜哄紑鎴疯',
-      key: 'name',
-      type: 'text',
+      key: 'receiveBank',
     },
     {
       label: '甯佺',
-      key: 'name',
-      type: 'text',
+      key: 'currency',
     },
     {
       label: '浜ゆ槗閲戦',
-      key: 'name',
+      key: 'actualAmount',
       type: 'money',
     },
     {
       label: '鐢ㄩ��',
-      key: 'name',
-      type: 'text',
+      key: 'purpose',
     },
     {
       label: '鎽樿',
-      key: 'name',
-      type: 'text',
+      key: 'failReason',
     },
     {
       label: '浜ゆ槗鏃堕棿',
-      key: 'name',
-      type: 'text',
+      key: 'transDate',
+      type: 'date',
+      format: 'YYYY-MM-DD HH:mm:ss',
     },
     {
       label: '浜ゆ槗鐘舵��',
-      key: 'name',
-      type: 'text',
+      key: 'transactionStatus',
+      type: 'enum',
+      valueEnum: EnumWalletTransactionStatusText,
     },
   ],
 });

--
Gitblit v1.9.1