2026-08-10 536c6fbd1f42ea335abdce561451a6ee87d71465
src/views/erp/finance/payment/modules/form.vue
@@ -5,8 +5,8 @@
import { computed, ref } from 'vue';
import { useVbenModal } from '../../../../../packages/effects/common-ui/src';
import { $t } from '../../../../../packages/locales/src';
import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { message } from 'ant-design-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();
    }