| | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import ColorizeOutlinedIcon from '@mui/icons-material/ColorizeOutlined'; |
| | | import GradingOutlinedIcon from '@mui/icons-material/GradingOutlined'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <EditButton label="toolbar.detail" /> |
| | | <DoneButton sx={{ padding: '1px', fontSize: '.75rem' }} ></DoneButton> |
| | | <CancelButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | <CheckButton /> |
| | | <PickButton /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | |
| | | export default TaskList; |
| | | |
| | | |
| | | const CheckButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const checkClick = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/task/pick/` + record.id); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh(); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return (record?.taskStatus == 199 && record?.taskType == 107 ? <ConfirmButton label={"toolbar.check"} startIcon={<GradingOutlinedIcon />} onConfirm={checkClick} /> : <></>) |
| | | } |
| | | |
| | | /** |
| | | * 拣料出库 |
| | | * @returns |