| | |
| | | import OutOrderCreate from "./OutOrderCreate"; |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import OutOrderModal from "./OutOrderModal"; |
| | | import PublicIcon from '@mui/icons-material/Public'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <MyCreateButton onClick={() => { setManualDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='outStock' /> |
| | | <ImportButton value={'asnOrderItem'} /> |
| | | <MyExportButton /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | |
| | | preferenceKey='outStock' |
| | | bulkActionButtons={ |
| | | <> |
| | | <PublicTaskButton /> |
| | | <MyExportButton /> |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} |
| | | /> |
| | |
| | | } |
| | | export default OutOrderList; |
| | | |
| | | |
| | | const PublicTaskButton = () => { |
| | | const record = useRecordContext(); |
| | | const { selectedIds, onUnselectItems } = useListContext(); |
| | | |
| | | const pubClick = (event) => { |
| | | event.stopPropagation(); |
| | | onUnselectItems(); |
| | | |
| | | } |
| | | |
| | | return ( |
| | | <Button |
| | | onClick={pubClick} |
| | | label={"toolbar.createWave"} |
| | | startIcon={<PublicIcon />} |
| | | />); |
| | | } |
| | | |
| | | const MyButton = ({ setCreateDialog, setmodalType }) => { |
| | | const record = useRecordContext(); |
| | | const handleEditClick = (btn) => { |
| | |
| | | const refresh = useRefresh(); |
| | | |
| | | const createByOrder = async (event) => { |
| | | const {selectedIds, onUnselectItems} = useListContext(); |
| | | event.stopPropagation(); |
| | | setCreateDialog(true); |
| | | const res = await request.post(`/outStock/generate/wave`, { ids: selectedIds }); |
| | | if (res?.data?.code === 200) { |
| | | notify(res.data.msg); |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | |
| | | } |
| | | |
| | | return ( |
| | |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | console.log(record); |
| | | |
| | | const cancelOrder = async () => { |
| | | const { data: { code, data, msg } } = await request.get(`/outStock/cancel/${record?.id}`); |