zhou zhou
17 小时以前 f21da8f3373d19045b05fe51a6eab3695dbe30f5
rsf-admin/src/page/task/TaskList.jsx
@@ -46,6 +46,8 @@
import GradingOutlinedIcon from '@mui/icons-material/GradingOutlined';
import StickyDataTable from "@/page/components/StickyDataTable";
import useTableLayout from '@/utils/useTableLayout';
import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined';
import FlowStepInstanceModal from './FlowStepInstanceModal';
const TaskList = (props) => {
    const translate = useTranslate();
@@ -53,6 +55,10 @@
    const [drawerVal, setDrawerVal] = useState(false);
    const [autoExce, setAutoExce] = useState(false);
    const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_warehouse_type')) || [];
    // state for FlowStepInstanceModal
    const [flowStepModalOpen, setFlowStepModalOpen] = useState(false);
    const [currentTaskRecord, setCurrentTaskRecord] = useState(null);
    useEffect(() => {
        getConfig()
@@ -136,7 +142,13 @@
                )}
                perPage={DEFAULT_PAGE_SIZE}
            >
                <TableItems drawerVal={drawerVal} />
                <TableItems
                    drawerVal={drawerVal}
                    onOpenFlowStep={(record) => {
                        setCurrentTaskRecord(record);
                        setFlowStepModalOpen(true);
                    }}
                />
            </List>
            <PageDrawer
                title='Task Detail'
@@ -144,6 +156,11 @@
                setDrawerVal={setDrawerVal}
            >
            </PageDrawer>
            <FlowStepInstanceModal
                open={flowStepModalOpen}
                setOpen={setFlowStepModalOpen}
                record={currentTaskRecord}
            />
        </Box>
    )
}
@@ -151,7 +168,7 @@
export default TaskList;
const TableItems = ({ drawerVal }) => {
const TableItems = ({ drawerVal, onOpenFlowStep }) => {
    const omittedFields = ['id', 'createTime', 'createBy$', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'warehType$', 'orderType', 'order_type', 'orderType$'];
    const { boxMaxWidth, boxMaxHeight } = useTableLayout(drawerVal);
    return (
@@ -201,6 +218,7 @@
                    <CheckButton />
                    <PickButton />
                    <SetTopButton />
                    <FlowStepButton onClick={onOpenFlowStep} />
                </WrapperField>
            </StickyDataTable>
        </Box>
@@ -208,6 +226,21 @@
}
const FlowStepButton = ({ onClick }) => {
    const record = useRecordContext();
    return (
        <Button
            label="toolbar.flowStep"
            onClick={(e) => {
                e.stopPropagation();
                onClick(record);
            }}
        >
            <AccountTreeOutlinedIcon />
        </Button>
    )
}
/**
 * 盘点
 * @returns te