| | |
| | | import debounce from 'lodash/debounce'; |
| | | import { DataGrid } from '@mui/x-data-grid'; |
| | | import PrintModal from './PrintModal'; |
| | | import { width } from "@mui/system"; |
| | | const AsnOrderPanel = ({ setBillReload }) => { |
| | | import PrintIcon from '@mui/icons-material/Print'; |
| | | const AsnOrderPanel = ({ billReload }) => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | |
| | | useEffect(() => { |
| | | debouncedHttp({ maktx }); |
| | | setBillReload(http) |
| | | }, [asnId, maktx]); |
| | | |
| | | useEffect(() => { |
| | | setBillReload(http) |
| | | }, []); |
| | | |
| | | |
| | | |
| | | const http = async (parmas) => { |
| | | const res = await request.post('/asnOrderItem/page', { ...parmas, asnId }); |
| | |
| | | } |
| | | |
| | | |
| | | useEffect(() => { |
| | | billReload.current = http |
| | | }, []); |
| | | |
| | | |
| | | const debouncedHttp = useMemo(() => debounce(http, 300), []); |
| | | |
| | | |
| | | |
| | | const columns = [ |
| | | { |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Button size="small" variant="contained" color="secondary" onClick={modalChange}>{translate("toolbar.batchPrint")}</Button> |
| | | <Button size="small" color="secondary" onClick={modalChange} startIcon={<PrintIcon />}>{translate("toolbar.batchPrint")}</Button> |
| | | |
| | | <PrintModal |
| | | open={createDialog} |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Button size="small" variant="contained" color="secondary" onClick={() => setCreateDialog(true)}>{translate("toolbar.print")}</Button> |
| | | <Button size="small" color="secondary" onClick={() => setCreateDialog(true)} startIcon={<PrintIcon />}>{translate("toolbar.print")}</Button> |
| | | |
| | | <PrintModal |
| | | open={createDialog} |