| | |
| | | @click="handleSelectItem" |
| | | preIcon="search|svg" |
| | | /> |
| | | <ItemModal @register="registerItemAdd" @success="handleItemSuccess" /> |
| | | <NormalModal @register="registerItemAdd" @success="handleItemSuccess" /> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction |
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { reactive, unref, h } from 'vue'; |
| | | import { reactive, unref, h, onMounted } from 'vue'; |
| | | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| | | import WoDrawer from './WoDrawer.vue'; |
| | | import WoModal from './WoModal.vue'; |
| | | import ItemModal from '/@/views/components/ItemModal.vue'; |
| | | import NormalModal from '/@/views/components/NormalModal.vue'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import { columns, searchFormSchema } from './biz_mes_wo.data'; |
| | | import { DeleteMesWo, getWoListByPage } from '/@/api/tigerapi/mes/wo'; |
| | | import { DeleteMesWo } from '/@/api/tigerapi/mes/wo'; |
| | | import { Loading } from '/@/components/Loading'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { getListByPage } from '/@/api/tigerapi/system'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { createMessage } = useMessage(); |
| | |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerTable, { getForm, reload }] = useTable({ |
| | | title: '工单信息', |
| | | api: getWoListByPage, |
| | | api: getListByPage, |
| | | columns, |
| | | formConfig: { |
| | | labelWidth: 120, |
| | |
| | | bordered: true, |
| | | showIndexColumn: false, |
| | | }); |
| | | |
| | | onMounted(() => {}); |
| | | |
| | | //新增 |
| | | function addWo() { |
| | |
| | | //点击打开物料列表框 |
| | | function handleSelectItem() { |
| | | openItemModal(true, { |
| | | data: 'content', |
| | | info: 'Info', |
| | | title: '物料列表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: '物料编码', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('物料编码'), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('物料名称'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | }); |
| | | } |
| | | |