| | |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | |
| | | /> |
| | | <AutocompleteInput |
| | | choices={business} |
| | |
| | | label="table.field.asnOrder.wkType" |
| | | source="wkType" |
| | | optionValue="value" |
| | | validate={required()} |
| | | parse={v => v} |
| | | /> |
| | | <TextInput |
| | |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <Stack direction='row' gap={2} sx={{ display: 'none' }}> |
| | | <NumberInput |
| | | label="table.field.deliveryItem.deliveryId" |
| | | source="deliveryId" |
| | | autoFocus |
| | | readOnly |
| | | /> |
| | | <TextInput |
| | | label="table.field.deliveryItem.platItemId" |
| | | source="platItemId" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.deliveryItem.matnrCode" |
| | | source="matnrCode" |
| | |
| | | source="matnrName" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.deliveryItem.fieldsIndex" |
| | | source="fieldsIndex" |
| | | parse={v => v} |
| | | /> |
| | | |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.deliveryItem.unit" |
| | | source="unit" |
| | |
| | | <NumberInput |
| | | label="table.field.deliveryItem.qty" |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | <NumberInput |
| | | label="table.field.deliveryItem.nromQty" |
| | | source="nromQty" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | |
| | | DeleteButton, |
| | | useGetOne, |
| | | useGetRecordId, |
| | | SimpleForm, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import DeliveryItemCreate from "./DeliveryItemCreate"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import MyField from "../../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; |
| | | import DeliveryItemEdit from "./DeliveryItemEdit"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | width: 150 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="deliveryId" label="table.field.deliveryItem.deliveryId" />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <TextInput source="platItemId" label="table.field.deliveryItem.platItemId" />, |
| | | <TextInput source="matnrCode" label="table.field.deliveryItem.matnrCode" />, |
| | | <TextInput source="matnrName" label="table.field.deliveryItem.matnrName" />, |
| | | <TextInput source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />, |
| | | <TextInput source="unit" label="table.field.deliveryItem.unit" />, |
| | | <NumberInput source="anfme" label="table.field.deliveryItem.anfme" />, |
| | | <NumberInput source="qty" label="table.field.deliveryItem.qty" />, |
| | | <NumberInput source="nromQty" label="table.field.deliveryItem.nromQty" />, |
| | | <NumberInput source="printQty" label="table.field.deliveryItem.printQty" />, |
| | | <TextInput source="splrName" label="table.field.deliveryItem.splrName" />, |
| | | <TextInput source="splrCode" label="table.field.deliveryItem.splrCode" />, |
| | | <TextInput source="splrBatch" label="table.field.deliveryItem.splrBatch" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='deliveryItem' /> |
| | | <MyExportButton /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | perPage={DEFAULT_ITEM_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='deliveryItem' |
| | |
| | | <Box display="flex"> |
| | | <List |
| | | resource="outStock" |
| | | storeKey='outStock' |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <OutOrderCreate open={manualDialog} setOpen={setManualDialog} /> |
| | | <OutOrderCreate |
| | | open={manualDialog} |
| | | setOpen={setManualDialog} |
| | | /> |
| | | <OutOrderModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | Form, |
| | | SaveButton, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import DialogCloseButton from "../../components/DialogCloseButton"; |
| | | import { styled } from '@mui/material/styles'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Grid, Stack } from "@mui/system"; |
| | | import SaveIcon from '@mui/icons-material/Save'; |
| | | |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | |
| | | const OutOrderModal = (props) => { |
| | | const { open, setOpen, record } = props; |
| | | const translate = useTranslate(); |
| | | const [params, setParams] = useState({}); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const refresh = useRefresh(); |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | |
| | | <DialogCloseButton onClose={handleClose} /> |
| | | </Box> |
| | | </DialogTitle> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <DialogContent> |
| | | <Grid item sx={24}> |
| | | <List |
| | | resource="deliveryItem" |
| | | storeKey='selectDelivery' |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | }), |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.delivery"} |
| | | storeKey='selectDelivery' |
| | | queryOptions={params} |
| | | filters={<CustomFilter />} |
| | | empty={false} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Grid> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | {/* <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} > |
| | | <Button disabled={disabled} onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> |
| | | {translate('toolbar.confirm')} |
| | | </Button> |
| | | </Toolbar> */} |
| | | </DialogActions> |
| | | </Grid> |
| | | </Dialog> |
| | | ) |
| | | } |
| | | |
| | | export default OutOrderModal; |
| | | |
| | | const CustomFilter = () => { |
| | | const { filterValues, setFilters } = useListContext('deliveryItem'); |
| | | const [formValues, setFormValues] = useState(filterValues); |
| | | |
| | | const handleChange = (event) => { |
| | | setFormValues(formValues => ({ |
| | | ...formValues, |
| | | [event.target.name]: event.target.value |
| | | })); |
| | | }; |
| | | |
| | | const handleSubmit = (event) => { |
| | | console.log('---------->'); |
| | | console.log(formValues); |
| | | event.preventDefault(); |
| | | setFilters(formValues, null, true); |
| | | }; |
| | | |
| | | return ( |
| | | <Form> |
| | | <Grid container rowSpacing={2} columnSpacing={2} > |
| | | <Stack> |
| | | <TextInput |
| | | source="matnrName" |
| | | label="table.field.deliveryItem.matnrName" |
| | | resettable |
| | | onChange={handleChange} |
| | | /> |
| | | </Stack> |
| | | <Stack> |
| | | <TextInput |
| | | source="matnrCode" |
| | | label="table.field.deliveryItem.matnrCode" |
| | | resettable |
| | | onChange={handleChange} /> |
| | | </Stack> |
| | | <Stack> |
| | | <TextInput |
| | | source="splrName" |
| | | label="table.field.deliveryItem.splrName" |
| | | resettable |
| | | onChange={handleChange} /> |
| | | </Stack> |
| | | <Stack> |
| | | <TextInput |
| | | source="splrName" |
| | | label="table.field.deliveryItem.splrName" |
| | | resettable |
| | | onChange={handleChange} /> |
| | | </Stack> |
| | | </Grid> |
| | | <DialogActions> |
| | | <Toolbar sx={{ width: '100%', justifyContent: 'end' }} > |
| | | <SaveButton onClick={handleSubmit}/> |
| | | {/* <Button variant="contained" label="toolbar.confirm" startIcon={<SaveIcon />} onClick={handleSubmit} /> */} |
| | | </Toolbar> |
| | | </DialogActions> |
| | | </Form> |
| | | ); |
| | | }; |