| | |
| | | } from '#/api/mes/wm/materialstock'; |
| | | import { $t } from '#/locales'; |
| | | import { MdItemTypeTree } from '#/views/mes/md/item/type/components'; |
| | | import { WmBatchDetail } from '#/views/wls/batch/components'; |
| | | import QrTraceModal from '#/views/mes/pro/components/qr-trace-modal.vue'; |
| | | import AreaForm from '#/views/wls/warehouse/area/modules/form.vue'; |
| | | import { WmStockAdjustModal, WmStockMoveModal } from './components'; |
| | | import { |
| | | WmStockAdjustModal, |
| | | WmStockBagModal, |
| | | WmStockMoveModal, |
| | | } from './components'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | |
| | |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const batchDetailRef = ref<InstanceType<typeof WmBatchDetail>>(); |
| | | const [QrTraceQueryModal, qrTraceQueryModalApi] = useVbenModal({ |
| | | connectedComponent: QrTraceModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [StockBagModal, stockBagModalApi] = useVbenModal({ |
| | | connectedComponent: WmStockBagModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | function handleOpenStockBags(row: MesWmMaterialStockApi.MaterialStock) { |
| | | if (!row.id) return; |
| | | stockBagModalApi.setData({ materialStockId: row.id }).open(); |
| | | } |
| | | |
| | | /** 刷新表格 */ |
| | | function handleRefresh() { |
| | |
| | | gridApi.query(); |
| | | } |
| | | |
| | | /** 打开批次详情弹窗 */ |
| | | /** 打开批次追溯弹窗 */ |
| | | function handleOpenBatchDetail(row: MesWmMaterialStockApi.MaterialStock) { |
| | | if (!row.batchId) { |
| | | if (!row.batchCode) { |
| | | return; |
| | | } |
| | | batchDetailRef.value?.open(row.batchId); |
| | | qrTraceQueryModalApi.setData({ code: row.batchCode }).open(); |
| | | } |
| | | |
| | | /** 处理冻结状态切换 */ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height><AreaModal /> |
| | | <WmBatchDetail ref="batchDetailRef" /> |
| | | <Page auto-content-height> |
| | | <AreaModal /> |
| | | <QrTraceQueryModal /> |
| | | <StockBagModal /> |
| | | <StockAdjustModal @success="handleStockAdjustSuccess" /> |
| | | <StockMoveModal @success="handleStockMoveSuccess" /> |
| | | |
| | |
| | | <TableAction |
| | | :actions="[ |
| | | { |
| | | label: '查看袋码', |
| | | type: 'link', |
| | | ifShow: row.bagDetailSupported, |
| | | onClick: handleOpenStockBags.bind(null, row), |
| | | }, |
| | | { |
| | | label: '移库', |
| | | type: 'link', |
| | | auth: ['mes:wm-material-stock:move'], |