| | |
| | | import ImportButton from "../../components/ImportButton"; |
| | | import PrintOutlinedIcon from '@mui/icons-material/PrintOutlined'; |
| | | import OrderPrintPreview from "./OrderPrintPreview"; |
| | | |
| | | import CreateNewFolderOutlinedIcon from '@mui/icons-material/CreateNewFolderOutlined'; |
| | | import AsnCreateByPoModal from "./AsnCreateByPoModal"; |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [modalType, setmodalType] = useState(0); |
| | | const [poCreate, setPoCreate] = useState(false); |
| | | const [printOrder, setPrintOrder] = useState(false); |
| | | const [select, setSelect] = useState({}); |
| | | const invoiceRef = useRef(); |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true); setmodalType(0) }} /> |
| | | <CreateByPoButton setPoCreate={setPoCreate}/> |
| | | <SelectColumnsButton preferenceKey='asnOrder' /> |
| | | <ImportButton value={'asnOrderItem'} /> |
| | | <MyExportButton /> |
| | |
| | | setOpen={setPrintOrder} |
| | | record={select} |
| | | /> |
| | | <AsnCreateByPoModal |
| | | open={poCreate} |
| | | setOpen={setPoCreate} |
| | | /> |
| | | <PageDrawer |
| | | title='AsnOrder Detail' |
| | | drawerVal={drawerVal} |
| | |
| | | } |
| | | export default AsnOrderList; |
| | | |
| | | //按PO单新建 |
| | | const CreateByPoButton = ({setPoCreate}) => { |
| | | const record = useRecordContext(); |
| | | |
| | | const createEvent = (event) => { |
| | | event.stopPropagation(); |
| | | setPoCreate(true) |
| | | } |
| | | return ( |
| | | <Button label={"toolbar.poCreate"} onClick={createEvent}> |
| | | <CreateNewFolderOutlinedIcon /> |
| | | </Button> |
| | | ) |
| | | } |
| | | |
| | | |
| | | //打印按钮 |
| | | const PrintButton = ({setPrintOrder, setSelect}) => { |