| | |
| | | |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | import { message, Tag } from 'ant-design-vue'; |
| | | |
| | | import { useVbenForm } from '#/adapter/form'; |
| | | import { getAccountSimpleList } from '#/api/erp/finance/account'; |
| | |
| | | modalApi.lock(); |
| | | try { |
| | | formData.value = await getSaleOrder(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); |
| | | } finally { |
| | |
| | | :show-confirm-button="formType !== 'detail'" |
| | | > |
| | | <Form class="mx-3"> |
| | | <template #productionStatus="{ modelValue }"> |
| | | <Tag v-if="modelValue === 0" color="warning">未完成</Tag> |
| | | <Tag v-else-if="modelValue === 1" color="success">已完成</Tag> |
| | | </template> |
| | | <template #items> |
| | | <ItemForm |
| | | ref="itemFormRef" |