| | |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | SimpleForm, |
| | | required, |
| | | Form, |
| | | SaveButton, |
| | | useRefresh, |
| | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import { DataGrid } from '@mui/x-data-grid'; |
| | | import request from '@/utils/request'; |
| | | import DictSelect from "../../components/DictSelect"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | |
| | | const OutStockPublic = (props) => { |
| | | const { record } = props; |
| | | const { record, open } = props; |
| | | const [formData, setFormData] = useState({ |
| | | orderId: record?.id |
| | | }); |
| | | const translate = useTranslate(); |
| | | |
| | | useEffect(() => { |
| | | getWaveRule() |
| | | }, [formData, open]) |
| | | |
| | | const getWaveRule = async () => { |
| | | if (formData.waveId == null && formData.waveId == undefined) { |
| | | return |
| | | } |
| | | const res = await request.post('/outStock/order/getOutTaskItems', {...formData}); |
| | | if (res?.data?.code === 200) { |
| | | setRows(res.data.data.records) |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | const handleChange = (value, name) => { |
| | | setFormData((prevData) => ({ |
| | | ...prevData, |
| | | [name]: value |
| | | })); |
| | | }; |
| | | |
| | | return ( |
| | | <> |
| | |
| | | <Grid sx={{ display: "flex" }} container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xl={6} gap={2} > |
| | | <Card> |
| | | <Form> |
| | | <ReferenceInput |
| | | source="type" |
| | | reference="waveRule" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.waveRule.type" |
| | | onChange={(e) => handleChange(e, 'waveId')} |
| | | value={formData.type} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Form> |
| | | {/* <DictSelect |
| | | label={translate("table.field.waveRule.type")} |
| | | onChange={(e) => handleChange(e.target.value, 'type')} |
| | | value={formData.type} |
| | | dictTypeCode="sys_wave_rule_code" |
| | | required |
| | | /> */} |
| | | <List |
| | | resource="outStockItem" |
| | | storeKey='outStockItem' |
| | |
| | | preferenceKey='outStockItem' |
| | | bulkActionButtons={false} |
| | | rowClick={false} |
| | | omit={['id', 'splrName', 'qty']} |
| | | omit={['id', 'splrName', 'qty', 'poCode']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="asnCode" label="table.field.outStockItem.asnCode" /> |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | const rows = [ |
| | | { id: 1, locCode: '03-02-1-2-1', container: 'Snow', batch: 'Jon', curQty: 14 }, |
| | | { id: 2, locCode: '03-02-1-2-1', container: 'Lannister', batch: 'Cersei', curQty: 31 }, |