From b8c980574e7868281624a244df93299e1aaa8596 Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期五, 21 三月 2025 10:09:40 +0800 Subject: [PATCH] fix:仓库和库区联动 --- rsf-admin/src/page/basicInfo/loc/LocCreate.jsx | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx index 092d9cf..9b368c1 100644 --- a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx +++ b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx @@ -31,6 +31,7 @@ import DialogCloseButton from "../../components/DialogCloseButton"; import StatusSelectInput from "../../components/StatusSelectInput"; import MemoInput from "../../components/MemoInput"; +import request from '@/utils/request'; const LocCreate = (props) => { const { open, setOpen } = props; @@ -38,7 +39,6 @@ const translate = useTranslate(); const notify = useNotify(); - const handleClose = (event, reason) => { if (reason !== "backdropClick") { setOpen(false); @@ -53,6 +53,13 @@ const handleError = async (error) => { notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } }); }; + + const [warehouseId, setWrehouseId] = useState(); + + const warehouseChange = (val) => { + setWrehouseId(val) + } + return ( <> @@ -95,6 +102,7 @@ label="table.field.loc.warehouseId" optionText="name" validate={[required()]} + onChange={warehouseChange} filterToQuery={(val) => ({ name: val })} /> </ReferenceInput> @@ -103,6 +111,7 @@ <ReferenceInput source="areaId" reference="warehouseAreas" + filter={{ warehouseId }} > <AutocompleteInput label="table.field.loc.areaId" @@ -256,6 +265,9 @@ /> </Grid> */} + + + <Grid item xs={6} display="flex" gap={1}> <StatusSelectInput /> </Grid> -- Gitblit v1.9.1