From c6aafbd0f78228d969322aacb1b444ae74679d2a Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 19 三月 2025 10:25:42 +0800
Subject: [PATCH] fix:0319修改

---
 rsf-admin/src/page/container/ContainerEdit.jsx |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/rsf-admin/src/page/container/ContainerEdit.jsx b/rsf-admin/src/page/container/ContainerEdit.jsx
index d4496c9..41bf80e 100644
--- a/rsf-admin/src/page/container/ContainerEdit.jsx
+++ b/rsf-admin/src/page/container/ContainerEdit.jsx
@@ -42,6 +42,7 @@
 
 const ContainerEdit = () => {
     const translate = useTranslate();
+    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || [];
 
     return (
         <Edit
@@ -63,7 +64,7 @@
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.main')}
                         </Typography>
-                        <Stack direction='row' gap={2}>
+                        {/* <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.container.code"
                                 source="code"
@@ -71,7 +72,7 @@
                                 autoFocus
                                 validate={required()}
                             />
-                        </Stack>
+                        </Stack> */}
                         <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.container.name"
@@ -80,10 +81,14 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <NumberInput
+                            <AutocompleteInput
+                                choices={dicts}
+                                optionText="label"
                                 label="table.field.container.typeId"
-                                source="typeId"
-                            />
+                                source="type"
+                                optionValue="value"
+                                parse={v => v}
+                                validate={[required()]} />
                         </Stack>
                         <Stack direction='row' gap={2}>
                             <NumberInput
@@ -95,7 +100,7 @@
                         <Stack direction='row' gap={2}>
                             <NumberInput
                                 label="table.field.container.lenght"
-                                source="lenght"
+                                source="length"
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
@@ -135,11 +140,19 @@
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.container.panrentId"
+                            <ReferenceInput
                                 source="panrentId"
-                            />
+                                reference="container"
+                            >
+                                <AutocompleteInput
+                                    label="table.field.container.panrentId"
+                                    optionText="name"
+                                    filterToQuery={(val) => ({ name: val })}
+                                />
+                            </ReferenceInput>
+
                         </Stack>
+
                         <Stack direction='row' gap={2}>
                             <DateInput
                                 label="table.field.container.vaildTime"
@@ -152,7 +165,7 @@
                                 source="flagRycle"
                                 choices={[
                                     { id: 1, name: '鏄�' },
-                                    { id:  0, name: '鍚�' },
+                                    { id: 0, name: '鍚�' },
                                 ]}
                                 validate={required()}
                             />
@@ -163,7 +176,7 @@
                                 source="flagLogic"
                                 choices={[
                                     { id: 1, name: '鏄�' },
-                                    { id:  0, name: '鍚�' },
+                                    { id: 0, name: '鍚�' },
                                 ]}
                                 validate={required()}
                             />

--
Gitblit v1.9.1