| | |
| | | |
| | | 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'; |
| | | |
| | |
| | | |
| | | const emit = defineEmits(['success']); |
| | | const formData = ref< |
| | | ErpFinancePaymentApi.FinancePayment & { |
| | | fileUrl?: string; |
| | | } |
| | | ErpFinancePaymentApi.FinancePayment |
| | | >({ |
| | | id: undefined, |
| | | no: '', |
| | |
| | | financeUserId: undefined, |
| | | paymentTime: undefined, |
| | | remark: '', |
| | | fileUrl: undefined, |
| | | totalPrice: 0, |
| | | discountPrice: 0, |
| | | paymentPrice: 0, |
| | |
| | | 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(); |
| | | } |