| | |
| | | import PrintIcon from '@mui/icons-material/Print'; |
| | | import request from '@/utils/request'; |
| | | import BatchModal from './BatchModal'; |
| | | import BatchGropuModal from './BatchGropuModal'; |
| | | import PrintModal from './PrintModal'; |
| | | import LinkIcon from '@mui/icons-material/Link'; |
| | | import BindModal from './BindModal'; |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | display: 'block', |
| | | width: '300px', |
| | | width: '200px', |
| | | }, |
| | | '& .RaDatagrid-table': { |
| | | width: '100%' |
| | | width: '100%', |
| | | position: 'relative', |
| | | } |
| | | })); |
| | | |
| | |
| | | <TextField key="memo" source="memo" label="common.field.memo" sortable={false} />, |
| | | ] |
| | | const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />) |
| | | const opt = <WrapperField key="opt" cellClassName="opt" label="common.field.opt"> |
| | | const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <EnableButton /> |
| | | </WrapperField> |
| | |
| | | <StyledDatagrid |
| | | preferenceKey='matnr' |
| | | bulkActionButtons={<> |
| | | <BatchGroupButton /> |
| | | <BatchButton /> |
| | | <BindButton /> |
| | | <PrintButton /> |
| | |
| | | ) |
| | | } |
| | | |
| | | const BatchGroupButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchMatnrGropu"}> |
| | | <EditIcon /> |
| | | </Button> |
| | | |
| | | <BatchGropuModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |
| | | const PrintButton = () => { |
| | | const record = useRecordContext(); |
| | | const { resource, selectedIds } = useListContext(); |
| | |
| | | rows={selectedIds} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |