From 3ceafbd9dcd387b2d16a1124994278c86e24121a Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 19 三月 2025 11:03:43 +0800
Subject: [PATCH] fix:往来企业修改

---
 rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
index a559320..72e465e 100644
--- a/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
@@ -42,6 +42,7 @@
 
 const CompanysEdit = () => {
     const translate = useTranslate();
+    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_companys_type')) || [];
 
     return (
         <Edit
@@ -63,14 +64,14 @@
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.main')}
                         </Typography>
-                        <Stack direction='row' gap={2}>
+                        {/* <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.companys.code"
                                 source="code"
                                 parse={v => v}
                                 autoFocus
                             />
-                        </Stack>
+                        </Stack> */}
                         <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.companys.name"
@@ -93,12 +94,14 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <TextInput
+                            <AutocompleteInput
+                                choices={dicts}
+                                optionText="label"
                                 label="table.field.companys.type"
                                 source="type"
+                                optionValue="value"
                                 parse={v => v}
-                                validate={required()}
-                            />
+                                validate={[required()]} />
                         </Stack>
                         <Stack direction='row' gap={2}>
                             <TextInput

--
Gitblit v1.9.1