chen.lin
11 小时以前 d4779cfaf009af96f054d22522250c607ef7bbd8
rsf-admin/src/page/task/TaskList.jsx
@@ -182,6 +182,7 @@
                    <WrapperField cellClassName="opt" label="common.field.opt" onClick={(e) => e.stopPropagation()} >
                        <EditButton label="toolbar.detail" />
                        <DoneButton sx={{ padding: '1px', fontSize: '.75rem' }} ></DoneButton>
                        <FullOutStockCompleteButton />
                        <CancelButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
                        <CheckButton />
                        <PickButton />
@@ -190,7 +191,7 @@
                </StyledDatagrid>
            </List>
            <PageDrawer
                title='Task Detail'
                title={translate('toolbar.detail')}
                drawerVal={drawerVal}
                setDrawerVal={setDrawerVal}
            >
@@ -336,6 +337,42 @@
}
/**
 * 全版出库完结按钮(199状态)
 * @returns
 */
const FullOutStockCompleteButton = () => {
    const record = useRecordContext();
    const notify = useNotify();
    const refresh = useRefresh();
    const clickComplete = () => {
        completeFullOutStock(record)
    };
    //全版出库完结
    const completeFullOutStock = async (row) => {
        const { data: { code, data, msg } } = await request.post(`/task/complete/fullOutStock/` + row.id);
        if (code === 200) {
            notify(msg);
            refresh();
        } else {
            notify(msg);
        }
    }
    return (
        record?.taskStatus == 199 && record?.taskType == 101 ?
            <ConfirmButton
                label={"toolbar.complete"}
                color="primary"
                startIcon={<TaskAltIcon />}
                onConfirm={clickComplete}
            />
            : <></>
    )
}
/**
 * 取消按钮
 * @returns 
 */
@@ -357,7 +394,7 @@
        }
    }
    return (
        (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 107 || record.taskType == 103 || record.taskType == 11) ?
        (record.taskStatus == 1 || record.taskStatus == 101 || record.taskStatus == 199) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 107 || record.taskType == 103 || record.taskType == 11) ?
            <ConfirmButton
                onConfirm={clickCancel}
                startIcon={<CancelIcon />}