| | |
| | | |
| | | import { computed, ref } from 'vue'; |
| | | |
| | | import { useVbenModal } from '..\..\..\..\..\packages\effects\common-ui\src'; |
| | | import { BarcodeBizTypeEnum } from '..\..\..\..\..\packages\constants\src'; |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | import { BarcodeBizTypeEnum } from '@vben/constants'; |
| | | |
| | | import { Button, Empty, message, Tabs } from 'ant-design-vue'; |
| | | |
| | | import { useVbenForm } from '#/adapter/form'; |
| | | import { createItem, getItem, updateItem } from '#/api/mes/md/item'; |
| | | import { $t } from '#/locales'; |
| | | import { BarcodeDetail } from '#/views/mes/wm/barcode/components'; |
| | | import { BarcodeDetail } from '#/views/wls/barcode/components'; |
| | | |
| | | import { useFormSchema } from '../data'; |
| | | import ItemBatchConfigForm from './item-batch-config-form.vue'; |
| | |
| | | if (formType.value === 'create') { |
| | | const id = await createItem(data); |
| | | formData.value = { ...data, id }; |
| | | await formApi.setFieldValue('id', id); |
| | | formType.value = 'update'; |
| | | message.success($t('ui.actionMessage.operationSuccess')); |
| | | } else { |
| | | await updateItem(data); |
| | | formData.value = { ...formData.value, ...data }; |
| | | message.success($t('ui.actionMessage.operationSuccess')); |
| | | } |
| | | message.success($t('ui.actionMessage.operationSuccess')); |
| | | await modalApi.close(); |
| | | emit('success'); |
| | | } finally { |
| | | modalApi.unlock(); |