| | |
| | | import { MdItemTypeTree } from '#/views/mes/md/item/type/components'; |
| | | import { WmBatchDetail } from '#/views/wls/batch/components'; |
| | | import AreaForm from '#/views/wls/warehouse/area/modules/form.vue'; |
| | | import { WmStockAdjustModal } from './components'; |
| | | import { WmStockAdjustModal, WmStockMoveModal } from './components'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | |
| | |
| | | |
| | | const [StockAdjustModal, stockAdjustModalApi] = useVbenModal({ |
| | | connectedComponent: WmStockAdjustModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [StockMoveModal, stockMoveModalApi] = useVbenModal({ |
| | | connectedComponent: WmStockMoveModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | gridApi.query(); |
| | | } |
| | | |
| | | /** 打开移库弹窗 */ |
| | | function handleOpenStockMove(row: MesWmMaterialStockApi.MaterialStock) { |
| | | stockMoveModalApi.setData(row).open(); |
| | | } |
| | | |
| | | /** 移库成功回调 */ |
| | | function handleStockMoveSuccess() { |
| | | gridApi.query(); |
| | | } |
| | | |
| | | /** 打开批次详情弹窗 */ |
| | | function handleOpenBatchDetail(row: MesWmMaterialStockApi.MaterialStock) { |
| | | if (!row.batchId) { |
| | |
| | | schema: useGridFormSchema(), |
| | | }, |
| | | gridOptions: { |
| | | columns: useGridColumns(handleFrozenChange), |
| | | columns: useGridColumns(handleFrozenChange, handleOpenStockMove), |
| | | height: 'auto', |
| | | keepSource: true, |
| | | proxyConfig: { |
| | |
| | | <Page auto-content-height><AreaModal /> |
| | | <WmBatchDetail ref="batchDetailRef" /> |
| | | <StockAdjustModal @success="handleStockAdjustSuccess" /> |
| | | <StockMoveModal @success="handleStockMoveSuccess" /> |
| | | |
| | | <div class="flex h-full w-full"> |
| | | <!-- 左侧物料分类树 --> |
| | |
| | | </Button> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <TableAction |
| | | :actions="[ |
| | | { |
| | | label: '移库', |
| | | type: 'link', |
| | | auth: ['mes:wm-material-stock:move'], |
| | | ifShow: !row.frozen, |
| | | onClick: handleOpenStockMove.bind(null, row), |
| | | }, |
| | | ]" |
| | | /> |
| | | </template> |
| | | </Grid> |
| | | </div> |
| | | </div> |