| | |
| | | top: "top", |
| | | resort: "sort", |
| | | start: 'Start', |
| | | stopPub: 'Stop Pub', |
| | | pause: 'Pause', |
| | | subzone: 'subzone', |
| | | bindmatnr: 'bind matnr', |
| | |
| | | batch: '批量操作', |
| | | confirm: '确认', |
| | | start: '自动下发', |
| | | stopPub: '终止下发', |
| | | pause: '暂停', |
| | | pick: '拣料', |
| | | check: '盘点', |
| | |
| | | </Stack> |
| | | |
| | | </Grid> |
| | | <Grid item xs={8} md={2}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | | <StatusSelectInput /> |
| | | <Box mt="2em" /> |
| | | <MemoInput /> |
| | | </Grid> |
| | | </Grid> |
| | | </SimpleForm> |
| | | </Edit > |
| | |
| | | import PlayArrowOutlinedIcon from '@mui/icons-material/PlayArrowOutlined'; |
| | | import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline'; |
| | | import StopCircleOutlinedIcon from '@mui/icons-material/StopCircleOutlined'; |
| | | import StopOutlinedIcon from '@mui/icons-material/StopOutlined'; |
| | | import { Box, Typography, Card, Stack, LinearProgress } from '@mui/material'; |
| | | import ConfirmButton from "../../components/ConfirmButton"; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | queryOptions={{ refetchInterval: 5000 }} |
| | | sx={{ |
| | | flexGrow: 1, |
| | | "& .css-k008qs": { |
| | | display: 'block' |
| | | }, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={<WavePannel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'createBy$']} |
| | | omit={['id', 'createTime', 'createBy', 'createBy$']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.wave.code" /> |
| | |
| | | <CustomProcess source="progress" /> |
| | | <TextField source="exceStatus$" label="table.field.wave.exceStatus" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <PublicTaskButton setSelectIds={setSelectIds} setDetailDialog={setDetailDialog} /> |
| | | <PauseButton /> |
| | | <ContinueButton /> |
| | | <StopWaveButton /> |
| | | <EditButton label="toolbar.detail" sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | |
| | | <> |
| | | <LinearProgress variant="determinate" value={progress} /> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | |
| | | const StopWaveButton = () => { |
| | | const record = useRecordContext() |
| | | const translate = useTranslate() |
| | | const refresh = useRefresh() |
| | | const notify = useNotify() |
| | | |
| | | const stopClick = async (event) => { |
| | | event.stopPropagation() |
| | | const { data: { code, data, msg } } = await request.post('', { val: true, flag: 'WaveAutoExce' }); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <ConfirmButton label={"toolbar.stopPub"} startIcon={<StopOutlinedIcon />} onConfirm={stopClick} size='small' /> |
| | | ) |
| | | } |
| | | |
| | |
| | | notify(msg); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | refresh() |
| | | } |
| | | return ( |
| | |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | useListContext, |
| | | ListContextProvider, |
| | | useList, |
| | | useGetList, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../../components/PanelTypography"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common' |
| | | import { styled } from '@mui/material/styles'; |
| | | import { width } from "@mui/system"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const { data, total, isPending, error, refetch, meta } = useGetList('/waveOrderRela', { filter: { waveId: record?.id } }); |
| | | const listContext = useList({ data, isPending }); |
| | | |
| | | if (data == null || data == undefined) { |
| | | return |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Box display="flex"> |
| | | <List resource="waveOrderRela" |
| | | <ListContextProvider |
| | | value={listContext} |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | filter={{ waveId: record.id }} |
| | | pagination={false} |
| | | empty={false} |
| | | actions={false} |
| | |
| | | <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" /> |
| | | <TextField source="splrName" label="table.field.asnOrderItem.splrName" /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </ListContextProvider> |
| | | </Box> |
| | | </> |
| | | ); |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waveItem:update')") |
| | | @ApiOperation("终止下发任务") |
| | | @PostMapping("/wave/stop/pub/{id}") |
| | | public R stopPublicTask(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | Wave wave = waveService.getById(id); |
| | | if (Objects.isNull(wave)) { |
| | | throw new CoolException("波次单不存在!!"); |
| | | } |
| | | waveService.update(new LambdaUpdateWrapper<Wave>() |
| | | .eq(Wave::getId, id) |
| | | .set(Wave::getExceStatus, WaveExceStatus.WAVE_EXCE_STATUS_TASK.val)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | } else { |
| | | wave.setExceStatus(WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val); |
| | | } |
| | | wave.setMemo("-->库存不足"); |
| | | waveService.updateById(wave); |
| | | return R.ok(); |
| | | } |