From f9a1b57d35529f8b8162e6dc7956d7b78375edd4 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 19 三月 2025 16:17:20 +0800
Subject: [PATCH] fix:货位可多选
---
rsf-admin/src/page/basicInfo/loc/LocCreate.jsx | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
index 0602179..df6e281 100644
--- a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
@@ -16,6 +16,7 @@
useDataProvider,
useNotify,
Form,
+ SelectArrayInput,
useCreateController,
} from 'react-admin';
import {
@@ -33,6 +34,7 @@
const LocCreate = (props) => {
const { open, setOpen } = props;
+ const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || [];
const translate = useTranslate();
const notify = useNotify();
@@ -119,7 +121,7 @@
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
+ {/* <ReferenceInput
source="type"
reference="dictData"
filter={{ dictTypeCode: 'sys_loc_type' }}
@@ -131,7 +133,19 @@
parse={v => v}
validate={[required()]}
/>
- </ReferenceInput>
+ </ReferenceInput> */}
+ {/* <AutocompleteInput
+ choices={dicts}
+ source="type"
+ optionText="label"
+ label="table.field.loc.type"
+ optionValue="value"
+ parse={v => v}
+ validate={[required()]}
+ /> */}
+ <ReferenceArrayInput source="typeIds" reference="locType" >
+ <SelectArrayInput label="table.field.loc.type" />
+ </ReferenceArrayInput>
</Grid>
{/* <Grid item xs={6} display="flex" gap={1}>
<TextInput
--
Gitblit v1.9.1