| | |
| | | import { display, height, width } from "@mui/system"; |
| | | import DashboardIcon from '@mui/icons-material/Dashboard'; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import PrintIcon from '@mui/icons-material/Print'; |
| | | import request from '@/utils/request'; |
| | | import BatchModal from './BatchModal'; |
| | | import PrintModal from './PrintModal'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | {columns.length > 0 && |
| | | <StyledDatagrid |
| | | preferenceKey='matnr' |
| | | bulkActionButtons={<> <BatchButton /><BulkDeleteButton mutationMode={OPERATE_MODE} /></>} |
| | | bulkActionButtons={<> |
| | | <BatchButton /> |
| | | <PrintButton /> |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | </>} |
| | | rowClick={(id, resource, record) => false} |
| | | omit={['id', 'shipperId', 'platCode', 'spec', 'model', 'weight', 'color', 'describle' |
| | | , 'nromNum', 'unit', 'purchaseUnit', 'stockUnit', 'stockLeval', 'isLabelMange', 'safeQty' |
| | |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |
| | | const PrintButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button color="secondary" onClick={() => setCreateDialog(true)} label={"toolbar.print"}> |
| | | <PrintIcon /> |
| | | </Button> |
| | | |
| | | <PrintModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |