yangyang
2025-03-21 632bb5a9a0f07c01ffba53e9009d69c4a50c2bd7
rsf-admin/src/page/basicInfo/loc/LocEdit.jsx
@@ -46,7 +46,11 @@
const LocEdit = () => {
    const translate = useTranslate();
    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || [];
    const [warehouseId, setWrehouseId] = useState();
    const warehouseChange = (val) => {
        setWrehouseId(val)
    }
    return (
        <Edit
@@ -78,6 +82,7 @@
                                        label="table.field.loc.warehouseId"
                                        optionText="name"
                                        validate={[required()]}
                                        onChange={warehouseChange}
                                        filterToQuery={(val) => ({ name: val })}
                                    />
                                </ReferenceInput>
@@ -86,6 +91,7 @@
                                <ReferenceInput
                                    source="areaId"
                                    reference="warehouseAreas"
                                    filter={{ warehouseId }}
                                >
                                    <AutocompleteInput
                                        label="table.field.loc.areaId"