| | |
| | | import DetailsIcon from '@mui/icons-material/Details'; |
| | | import AddTaskIcon from '@mui/icons-material/AddTask'; |
| | | import PublicIcon from '@mui/icons-material/Public'; |
| | | import SelectMatnrModal from "./SelectMatnrModal"; |
| | | import CheckOrderModal from "./CheckOrderModal"; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import request from '@/utils/request'; |
| | |
| | | <ReferenceInput source="type" reference="dictData" filter={{ dictTypeCode: 'sys_order_type', group: '3' }} label="table.field.checkOrder.type" alwaysOn> |
| | | <AutocompleteInput label="table.field.checkOrder.type" optionValue="value" /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_check_order_type'}} label="table.field.checkOrder.wkType" alwaysOn> |
| | | <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_check_order_type' }} label="table.field.checkOrder.wkType" alwaysOn> |
| | | <AutocompleteInput label="table.field.checkOrder.wkType" optionValue="value" /> |
| | | </ReferenceInput>, |
| | | <NumberInput source="anfme" label="table.field.checkOrder.anfme" />, |
| | |
| | | const translate = useTranslate(); |
| | | const refresh = useRefresh(); |
| | | const notify = useNotify(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [manualDialog, setManualDialog] = useState(false); |
| | | const [selectIds, setSelectIds] = useState([]); |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <CreateByOrderButton setCreateDialog={setCreateDialog} /> |
| | | <MyCreateButton onClick={() => { setManualDialog(true); setmodalType(0) }} /> |
| | | <SelectColumnsButton preferenceKey='check' /> |
| | | <ImportButton value={'checkItem'} /> |
| | |
| | | <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} /> |
| | | <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton> |
| | | <CancelButton /> |
| | | <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} setSelect={setSelect} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | {/* <OutOrderCreate |
| | | {/* <CheckOrderCreate |
| | | open={manualDialog} |
| | | setOpen={setManualDialog} |
| | | /> */} |
| | | {/* <SelectMatnrModal |
| | | <SelectMatnrModal |
| | | asnId={modalType} |
| | | billReload={billReload} |
| | | open={manualDialog} |
| | | setOpen={setManualDialog} |
| | | /> |
| | | <OutOrderModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | preview={preview} |
| | | setPreview={setPreview} |
| | | /> |
| | | <OutStockWaveDialog open={waveRule} setOpen={setWaveRule} onClose={closeDialog} /> |
| | | {/* <OutStockWaveDialog open={waveRule} setOpen={setWaveRule} onClose={closeDialog} /> |
| | | <OutOrderPreview open={preview} setOpen={setPreview} /> |
| | | <PageEditDrawer |
| | | title={"toolbar.publicWorking"} |
| | |
| | | ) |
| | | } |
| | | |
| | | const CreateByOrderButton = ({ setCreateDialog }) => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const createByOrder = async (event) => { |
| | | event.stopPropagation(); |
| | | setCreateDialog(true); |
| | | } |
| | | |
| | | return ( |
| | | <Button onClick={createByOrder} label={'toolbar.asnCreate'}> <AddIcon /> </Button> |
| | | ) |
| | | } |
| | | |
| | | const CancelButton = () => { |
| | | const record = useRecordContext(); |
| | |
| | | |
| | | return ( |
| | | record?.exceStatus == 10 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />} onConfirm={cancelOrder} size={"small"} /> : <></> |
| | | ) |
| | | } |
| | | |
| | | //下发执行 |
| | | const PublicButton = ({ setDrawerVal, setSelect }) => { |
| | | const record = useRecordContext(); |
| | | const refresh = useRefresh(); |
| | | const taskEvent = () => { |
| | | setDrawerVal(true) |
| | | setSelect(record) |
| | | refresh(); |
| | | } |
| | | |
| | | return ( |
| | | record.workQty < record.anfme ? <Button label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onClick={taskEvent} size={"small"} /> : <></> |
| | | ) |
| | | } |