From 53411e80007ce3a1cc268141a4cf7495fa6d265a Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 21 三月 2025 10:59:07 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/basicInfo/loc/BatchModal.jsx | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/loc/BatchModal.jsx b/rsf-admin/src/page/basicInfo/loc/BatchModal.jsx
index cee27c7..92b5fe3 100644
--- a/rsf-admin/src/page/basicInfo/loc/BatchModal.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/BatchModal.jsx
@@ -19,6 +19,7 @@
useCreateController,
useListContext,
useRefresh,
+ SelectArrayInput
} from 'react-admin';
import {
Dialog,
@@ -38,7 +39,8 @@
TableCell,
Tooltip,
IconButton,
- styled
+ styled,
+
} from '@mui/material';
@@ -53,7 +55,6 @@
import StatusSelectInput from "../../components/StatusSelectInput";
-
const InitModal = ({ open, setOpen }) => {
const refresh = useRefresh();
const translate = useTranslate();
@@ -62,6 +63,7 @@
const notify = useNotify();
const [formData, setFormData] = useState({
+ "warehouseId": null,
"areaId": null,
"type": null,
'status': null
@@ -80,8 +82,10 @@
const reset = () => {
setFormData({
+ "warehouseId": null,
"areaId": null,
"type": null,
+ "typeIds": null,
'status': null
})
}
@@ -95,6 +99,7 @@
...prevData,
[name]: value
}));
+ refresh()
};
const removeEmptyKeys = (obj) => {
@@ -132,8 +137,25 @@
<Grid container spacing={2}>
<Grid item xs={4}>
<ReferenceInput
+ source="warehouseId"
+ reference="warehouse"
+ >
+ <AutocompleteInput
+ label="table.field.loc.warehouseId"
+ optionText="name"
+ onChange={(value) => handleChange(value, 'warehouseId')}
+ value={formData.warehouseId}
+ filterToQuery={(val) => ({ name: val })}
+ />
+ </ReferenceInput>
+
+ </Grid>
+
+ <Grid item xs={4}>
+ <ReferenceInput
source="areaId"
reference="warehouseAreas"
+ filter={{ warehouseId: formData.warehouseId }}
>
<AutocompleteInput
label="table.field.loc.areaId"
@@ -147,14 +169,17 @@
</Grid>
<Grid item xs={4}>
- <DictionarySelect
+ {/* <DictionarySelect
label={translate("table.field.loc.type")}
name="type"
value={formData.type}
onChange={(e) => handleChange(e.target.value, 'type')}
size="small"
dictTypeCode="sys_loc_type"
- />
+ /> */}
+ <ReferenceArrayInput source="typeIds" reference="locType" >
+ <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} />
+ </ReferenceArrayInput>
</Grid>
<Grid item xs={4}>
--
Gitblit v1.9.1