| | |
| | | useRedirect, |
| | | useUnselectAll, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { Box, Typography, Card, Stack, Drawer } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import BillStatusField from '../../components/BillStatusField'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import request from '@/utils/request'; |
| | |
| | | import PublicIcon from '@mui/icons-material/Public'; |
| | | import SelectMatnrModal from "./SelectMatnrModal"; |
| | | import AddTaskIcon from '@mui/icons-material/AddTask'; |
| | | import PageEditDrawer from "../../components/PageEditDrawer"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.outStock"} |
| | | empty={false} |
| | |
| | | <StyledDatagrid |
| | | sx={{ width: '100%' }} |
| | | preferenceKey='outStock' |
| | | bulkActionButtons={ |
| | | <PublicTaskButton />} |
| | | bulkActionButtons={<PublicTaskButton />} |
| | | rowClick={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poId', 'rleStatus$']} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'rleStatus$']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.outStock.code" /> |
| | | <TextField source="poCode" label="table.field.outStock.poCode" /> |
| | | <NumberField source="poId" label="table.field.outStock.poId" /> |
| | | <TextField source="type$" label="table.field.outStock.type" /> |
| | | <TextField cellClassName="wkType" source="wkType$" label="table.field.outStock.wkType" /> |
| | | <NumberField source="anfme" label="table.field.outStock.anfme" /> |
| | |
| | | <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} /> |
| | | <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton> |
| | | <CancelButton /> |
| | | <PublicButton /> |
| | | <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='AsnOrder Detail' |
| | | <PageEditDrawer |
| | | title={"toolbar.publicWorking"} |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | /> |
| | | > |
| | | |
| | | </PageEditDrawer> |
| | | </Box > |
| | | ) |
| | | } |
| | |
| | | } |
| | | |
| | | return ( |
| | | record?.exceStatus == 10 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />} onConfirm={cancelOrder} /> : <></> |
| | | record?.exceStatus == 10 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />} onConfirm={cancelOrder} size={"small"} /> : <></> |
| | | ) |
| | | } |
| | | |
| | | const PublicButton = () => { |
| | | //下发执行 |
| | | const PublicButton = ({ setDrawerVal }) => { |
| | | const record = useRecordContext(); |
| | | const refresh = useRefresh(); |
| | | const taskEvent = () => { |
| | | |
| | | setDrawerVal(true) |
| | | refresh(); |
| | | } |
| | | |
| | | return ( |
| | | <ConfirmButton label={"toolbar.createTask"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} /> |
| | | <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> |
| | | ) |
| | | |
| | | } |