skyouc
4 天以前 7172f29c54a04164674212f4ead303603dff0548
波次终止前端修改
7个文件已修改
81 ■■■■ 已修改文件
rsf-admin/src/i18n/en.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/wave/WaveEdit.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/wave/WaveList.jsx 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/wave/WavePanel.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WaveController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/en.js
@@ -1150,6 +1150,7 @@
        top: "top",
        resort: "sort",
        start: 'Start',
        stopPub: 'Stop Pub',
        pause: 'Pause',
        subzone: 'subzone',
        bindmatnr: 'bind matnr',
rsf-admin/src/i18n/zh.js
@@ -1144,6 +1144,7 @@
        batch: '批量操作',
        confirm: '确认',
        start: '自动下发',
        stopPub: '终止下发',
        pause: '暂停',
        pick: '拣料',
        check: '盘点',
rsf-admin/src/page/orders/wave/WaveEdit.jsx
@@ -126,14 +126,6 @@
                            </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 >
rsf-admin/src/page/orders/wave/WaveList.jsx
@@ -29,6 +29,7 @@
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";
@@ -109,9 +110,11 @@
    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,
@@ -142,7 +145,7 @@
                    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" />
@@ -159,9 +162,9 @@
                    <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>
@@ -214,6 +217,28 @@
        <>
            <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' />
    )
}
@@ -297,7 +322,7 @@
            notify(msg);
        } else {
            notify(msg);
        }
        }
        refresh()
    }
    return (
rsf-admin/src/page/orders/wave/WavePanel.jsx
@@ -10,10 +10,16 @@
    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': {
@@ -35,10 +41,19 @@
    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) =>
@@ -47,7 +62,6 @@
                            }),
                        marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                    }}
                    filter={{ waveId: record.id }}
                    pagination={false}
                    empty={false}
                    actions={false}
@@ -71,7 +85,7 @@
                        <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" />
                        <TextField source="splrName" label="table.field.asnOrderItem.splrName" />
                    </StyledDatagrid>
                </List>
                </ListContextProvider>
            </Box>
        </>
    );
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WaveController.java
@@ -178,4 +178,21 @@
    }
    @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();
    }
}
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
@@ -163,6 +163,7 @@
                } else {
                    wave.setExceStatus(WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val);
                }
                wave.setMemo("-->库存不足");
                waveService.updateById(wave);
                return R.ok();
            }