From cb66b65c5fa4e70632625e8393dd00831507d2c0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 06 八月 2026 17:09:53 +0800
Subject: [PATCH] 银川 1.添加全局预览附件功能

---
 src/views/erp/finance/payment/modules/form.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/views/erp/finance/payment/modules/form.vue b/src/views/erp/finance/payment/modules/form.vue
index b9c8cd4..9d92bb2 100644
--- a/src/views/erp/finance/payment/modules/form.vue
+++ b/src/views/erp/finance/payment/modules/form.vue
@@ -23,9 +23,7 @@
 
 const emit = defineEmits(['success']);
 const formData = ref<
-  ErpFinancePaymentApi.FinancePayment & {
-    fileUrl?: string;
-  }
+  ErpFinancePaymentApi.FinancePayment
 >({
   id: undefined,
   no: '',
@@ -34,7 +32,6 @@
   financeUserId: undefined,
   paymentTime: undefined,
   remark: '',
-  fileUrl: undefined,
   totalPrice: 0,
   discountPrice: 0,
   paymentPrice: 0,
@@ -165,6 +162,16 @@
       formData.value = await getFinancePayment(data.id);
       // 璁剧疆鍒� values
       await formApi.setValues(formData.value, false);
+      if (formData.value?.attachmentList?.length) {
+        const blobIds = formData.value.attachmentList.map((item) => ({
+          uid: String(item.id),
+          name: item.name || '',
+          url: item.url || '',
+          status: 'done',
+          id: item.id,
+        }));
+        await formApi.setFieldValue('blobIds', blobIds);
+      }
     } finally {
       modalApi.unlock();
     }

--
Gitblit v1.9.3