| | |
| | | </ReferenceField>, |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid>Ï |
| | | </StyledDatagrid> |
| | | </List> |
| | | <OutOrderItemCreate |
| | | open={createDialog} |
| | |
| | | const OutOrderList = (props) => { |
| | | const translate = useTranslate(); |
| | | const refresh = useRefresh(); |
| | | const notify = useNotify(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [manualDialog, setManualDialog] = useState(false); |
| | |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | | refresh(); |
| | | billReload?.current() |
| | | resetData() |
| | | } else { |
| | | notify(res.data.msg); |
| | |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | | refresh(); |
| | | billReload?.current() |
| | | resetData() |
| | | } else { |
| | | notify(res.data.msg); |
| | |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | Button, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline'; |
| | |
| | | const { data, selectedIds, onUnselectItems } = useListContext(); |
| | | const waveId = useGetRecordId(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh() |
| | | const startClick = async () => { |
| | | onUnselectItems(); |
| | | const { data: { code, data, msg } } = await request.post('/wave/selects/task', { wave: waveId, waveItem: selectedIds }); |
| | |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | refresh() |
| | | } |
| | | return ( |
| | | <Button label="toolbar.publicWorking" onClick={startClick} startIcon={<PlayArrowOutlinedIcon />} variant="outlined" /> |
| | |
| | | onUnselectItems(); |
| | | } |
| | | return ( |
| | | record?.exceStatus == 2 ? <Button label="toolbar.pause" onClick={pauseClick} startIcon={<PauseCircleOutlineIcon />} /> : <></> |
| | | record?.exceStatus == 1 ? <Button label="toolbar.pause" onClick={pauseClick} startIcon={<PauseCircleOutlineIcon />} /> : <></> |
| | | ) |
| | | } |
| | |
| | | listMap.keySet().forEach(key -> { |
| | | Task task = new Task(); |
| | | Loc loc = locService.getById(key); |
| | | logger.info("库位:>{}<UNK>", loc.getCode()); |
| | | |
| | | logger.info("库位:>{}", loc.getCode()); |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("数据错误:所选库存信息不存在!!"); |
| | | } |
| | |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (!taskItems.isEmpty()) { |
| | | for (TaskItem item : taskItems) { |
| | | if (item.getOrderType().equals(OrderType.ORDER_OUT.type)) { |
| | | if (!Objects.isNull(item.getOrderType()) && item.getOrderType().equals(OrderType.ORDER_OUT.type)) { |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getOrgLoc())); |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("数据错误:库位信息不存在!!"); |
| | |
| | | if (items.isEmpty()) { |
| | | throw new CoolException("波次明细不存在!!"); |
| | | } |
| | | |
| | | if (!waveItemService.update(new LambdaUpdateWrapper<WaveItem>() |
| | | .set(WaveItem::getExceStatus, WaveItemExceStatus.WAVE_EXCE_STATUS_ING.val) |
| | | .in(WaveItem::getId, waveItems))) { |
| | | throw new CoolException("下发执行异常,请稍候重试!"); |
| | | } |
| | | |
| | | /**生成出库任务*/ |
| | | try { |
| | | generateOutTask(items, loginUserId, waves); |
| | |
| | | log.error("UNK", e); |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | return null; |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |