From 3f7a1f34aff16f12de093a9579201e518b0c309b Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 24 七月 2026 15:16:04 +0800
Subject: [PATCH] refactor(erp): 将文件上传字段从 fileUrl 改为 blobIds 并支持多附件上传
---
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..41987a3 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,
@@ -163,6 +160,16 @@
modalApi.lock();
try {
formData.value = await getFinancePayment(data.id);
+ 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,
+ }));
+ formApi.setFieldValue('blobIds', blobIds);
+ }
// 璁剧疆鍒� values
await formApi.setValues(formData.value, false);
} finally {
--
Gitblit v1.9.3