skyouc
2025-06-23 0b2e709d64339f06b4ede5ef1c8f17345aa8e653
rsf-admin/src/page/orders/wave/WaveItemList.jsx
@@ -152,6 +152,7 @@
                    <TextField source="memo" label="common.field.memo" sortable={false} />
                    <WrapperField cellClassName="opt" label="common.field.opt">
                        <BulkPauseButton />
                        <ContinueButton />
                    </WrapperField>
                </StyledDatagrid>
            </List>
@@ -211,11 +212,34 @@
const BulkPauseButton = () => {
    const { data, selectedIds, onUnselectItems } = useListContext();
    const notify = useNotify()
    const record = useRecordContext();
    const pauseClick = () => {
        onUnselectItems();
    const pauseClick = async () => {
        const { data: { code, data, msg } } = await request.post('/waveItem/pause/pub', { wave: waveId, waveItem: selectedIds });
        if (code === 200) {
            notify(msg);
        } else {
            notify(msg);
        }
    }
    return (
        record?.exceStatus == 1 ? <Button label="toolbar.pause" onClick={pauseClick} startIcon={<PauseCircleOutlineIcon />} /> : <></>
    )
}
const ContinueButton = () => {
    const { data, selectedIds, onUnselectItems } = useListContext();
    const notify = useNotify()
    const record = useRecordContext();
    const continueClick = async () => {
        const { data: { code, data, msg } } = await request.post('/waveItem/continue/pub', { wave: waveId, waveItem: selectedIds });
        if (code === 200) {
            notify(msg);
        } else {
            notify(msg);
        }
    }
    return (
        record?.exceStatus == 4 ? <Button label="toolbar.continuePub" onClick={continueClick} startIcon={<PauseCircleOutlineIcon />} /> : <></>
    )
}