From 9e27b1b292872bd83b761091554fbd8db72b595e Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期四, 20 三月 2025 10:47:13 +0800
Subject: [PATCH] #优化 物料扩展字段修改优化
---
rsf-admin/src/page/basicInfo/loc/LocCreate.jsx | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
index e48599a..8d4bcf8 100644
--- a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
@@ -33,6 +33,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,11 +120,27 @@
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.loc.type"
+ {/* <ReferenceInput
source="type"
+ reference="dictData"
+ filter={{ dictTypeCode: 'sys_loc_type' }}
+ >
+ <AutocompleteInput
+ label="table.field.loc.type"
+ optionText="label"
+ optionValue="value"
+ parse={v => v}
+ validate={[required()]}
+ />
+ </ReferenceInput> */}
+ <AutocompleteInput
+ choices={dicts}
+ source="type"
+ optionText="label"
+ label="table.field.loc.type"
+ optionValue="value"
parse={v => v}
- validate={required()}
+ validate={[required()]}
/>
</Grid>
{/* <Grid item xs={6} display="flex" gap={1}>
--
Gitblit v1.9.1