From 9f5e97c05c5d503dab0ecef9a8a2139e50087690 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期五, 27 二月 2026 16:40:19 +0800
Subject: [PATCH] lsh#

---
 rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
index fea93d5..c5be88a 100644
--- a/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
@@ -36,6 +36,7 @@
 
     const translate = useTranslate();
     const notify = useNotify();
+    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_companys_type')) || [];
 
     const handleClose = (event, reason) => {
         if (reason !== "backdropClick") {
@@ -89,7 +90,7 @@
                                         label="table.field.companys.code"
                                         source="code"
                                         parse={v => v}
-                                        autoFocus
+                                        validate={[required()]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
@@ -97,15 +98,16 @@
                                         label="table.field.companys.name"
                                         source="name"
                                         parse={v => v}
+                                        validate={[required()]}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.companys.nameEn"
                                         source="nameEn"
                                         parse={v => v}
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.companys.breifCode"
@@ -114,14 +116,16 @@
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
+                                    <AutocompleteInput
+                                        choices={dicts}
+                                        optionText="label"
                                         label="table.field.companys.type"
                                         source="type"
+                                        optionValue="value"
                                         parse={v => v}
-                                        validate={required()}
-                                    />
+                                        validate={[required()]} />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.companys.contact"
                                         source="contact"
@@ -162,15 +166,14 @@
                                         source="city"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.companys.address"
                                         source="address"
                                         parse={v => v}
                                     />
                                 </Grid>
-
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <StatusSelectInput />
                                 </Grid>
@@ -178,7 +181,7 @@
                                     <Stack direction="column" spacing={1} width={'100%'}>
                                         <MemoInput />
                                     </Stack>
-                                </Grid>
+                                </Grid> */}
                             </Grid>
                         </DialogContent>
                         <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}>

--
Gitblit v1.9.1