| | |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <ReferenceInput |
| | | source="warehouseId" |
| | | label="table.field.loc.warehouseId" |
| | | reference="warehouse" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.warehouseId" |
| | | optionText="name" |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput |
| | | source="areaId" |
| | | label="table.field.loc.areaId" |
| | | reference="warehouseAreas" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.areaId" |
| | | optionText="name" |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput>, |
| | | <TextInput source="code" label="table.field.loc.code" />, |
| | | <TextInput source="type" label="table.field.loc.type" />, |
| | | <TextInput source="name" label="table.field.loc.name" />, |
| | | <NumberInput source="flagLogic" label="table.field.loc.flagLogic" />, |
| | | <TextInput source="fucAtrrs" label="table.field.loc.fucAtrrs" />, |
| | | <TextInput source="barcode" label="table.field.loc.barcode" />, |
| | | <TextInput source="unit" label="table.field.loc.unit" />, |
| | | <TextInput source="size" label="table.field.loc.size" />, |
| | | <NumberInput source="row" label="table.field.loc.row" />, |
| | | <NumberInput source="col" label="table.field.loc.col" />, |
| | | <NumberInput source="lev" label="table.field.loc.lev" />, |
| | | <NumberInput source="channel" label="table.field.loc.channel" />, |
| | | <NumberInput source="maxParts" label="table.field.loc.maxParts" />, |
| | | <NumberInput source="maxPack" label="table.field.loc.maxPack" />, |
| | | <NumberInput source="flagLabelMange" label="table.field.loc.flagLabelMange" />, |
| | | <TextInput source="locAttrs" label="table.field.loc.locAttrs" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | | choices={[ |
| | | { id: '1', name: 'common.enums.statusTrue' }, |
| | | { id: '0', name: 'common.enums.statusFalse' }, |
| | | ]} |
| | | resettable |
| | | />, |
| | | ] |
| | | |
| | | const LocList = () => { |
| | | const translate = useTranslate(); |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [initDialog, setInitDialog] = useState(false); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_use_stas')) || []; |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <ReferenceInput |
| | | source="warehouseId" |
| | | label="table.field.loc.warehouseId" |
| | | reference="warehouse" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.warehouseId" |
| | | optionText="name" |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput |
| | | source="areaId" |
| | | label="table.field.loc.areaId" |
| | | reference="warehouseAreas" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.loc.areaId" |
| | | optionText="name" |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput>, |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.loc.useStatus" |
| | | source="useStatus" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | alwaysOn |
| | | />, |
| | | <TextInput source="code" label="table.field.loc.code" />, |
| | | <TextInput source="type" label="table.field.loc.type" />, |
| | | <TextInput source="name" label="table.field.loc.name" />, |
| | | <NumberInput source="flagLogic" label="table.field.loc.flagLogic" />, |
| | | <TextInput source="fucAtrrs" label="table.field.loc.fucAtrrs" />, |
| | | <TextInput source="barcode" label="table.field.loc.barcode" />, |
| | | <TextInput source="unit" label="table.field.loc.unit" />, |
| | | <TextInput source="size" label="table.field.loc.size" />, |
| | | <NumberInput source="row" label="table.field.loc.row" />, |
| | | <NumberInput source="col" label="table.field.loc.col" />, |
| | | <NumberInput source="lev" label="table.field.loc.lev" />, |
| | | <NumberInput source="channel" label="table.field.loc.channel" />, |
| | | <NumberInput source="maxParts" label="table.field.loc.maxParts" />, |
| | | <NumberInput source="maxPack" label="table.field.loc.maxPack" />, |
| | | <NumberInput source="flagLabelMange" label="table.field.loc.flagLabelMange" />, |
| | | <TextInput source="locAttrs" label="table.field.loc.locAttrs" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | | choices={[ |
| | | { id: '1', name: 'common.enums.statusTrue' }, |
| | | { id: '0', name: 'common.enums.statusFalse' }, |
| | | ]} |
| | | resettable |
| | | />, |
| | | ] |
| | | |
| | | |
| | | return ( |
| | | <Box display="flex"> |