From d086af5559dba52095d23e425be87d8f11f24814 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 17 七月 2025 16:32:47 +0800
Subject: [PATCH] #菜单、po单

---
 rsf-admin/src/page/container/ContainerEdit.jsx |   40 +++++++++++++++++++++++++++-------------
 1 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/rsf-admin/src/page/container/ContainerEdit.jsx b/rsf-admin/src/page/container/ContainerEdit.jsx
index d4496c9..9edd15e 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_container_type')) || [];
 
     return (
         <Edit
@@ -49,6 +50,7 @@
             mutationMode={EDIT_MODE}
             actions={<CustomerTopToolBar />}
             aside={<EditBaseAside />}
+            title={"menu.container"}
         >
             <SimpleForm
                 shouldUnregister
@@ -63,7 +65,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 +73,7 @@
                                 autoFocus
                                 validate={required()}
                             />
-                        </Stack>
+                        </Stack> */}
                         <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.container.name"
@@ -80,10 +82,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 +101,7 @@
                         <Stack direction='row' gap={2}>
                             <NumberInput
                                 label="table.field.container.lenght"
-                                source="lenght"
+                                source="length"
                             />
                         </Stack>
                         <Stack direction='row' gap={2}>
@@ -135,11 +141,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 +166,7 @@
                                 source="flagRycle"
                                 choices={[
                                     { id: 1, name: '鏄�' },
-                                    { id:  0, name: '鍚�' },
+                                    { id: 0, name: '鍚�' },
                                 ]}
                                 validate={required()}
                             />
@@ -163,21 +177,21 @@
                                 source="flagLogic"
                                 choices={[
                                     { id: 1, name: '鏄�' },
-                                    { id:  0, name: '鍚�' },
+                                    { id: 0, name: '鍚�' },
                                 ]}
                                 validate={required()}
                             />
                         </Stack>
 
                     </Grid>
-                    <Grid item xs={12} md={4}>
+                    {/* <Grid item xs={12} md={4}>
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.common')}
                         </Typography>
                         <StatusSelectInput />
                         <Box mt="2em" />
                         <MemoInput />
-                    </Grid>
+                    </Grid> */}
                 </Grid>
             </SimpleForm>
         </Edit >

--
Gitblit v1.9.1