From 51e9b24c421dd2e77ec5809a62c35fec115d5876 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 20 三月 2025 14:12:02 +0800
Subject: [PATCH] #添加 1. 添加库位逻辑分区 2. 物料添加自动生成编码 3. 库区字段显示优化

---
 rsf-admin/src/page/basicInfo/loc/LocCreate.jsx |   52 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
index 831412b..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,20 +120,36 @@
                                     />
                                 </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}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.loc.name"
                                         source="name"
                                         parse={v => v}
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.loc.flagLogic"
@@ -153,24 +170,41 @@
                                         parse={v => v}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.loc.unit"
                                         source="unit"
                                         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.loc.size"
                                         source="size"
                                         parse={v => v}
                                     />
+                                </Grid> */}
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.loc.length"
+                                        source="length"
+                                        validate={required()}
+                                    />
+                                    <NumberInput
+                                        label="table.field.loc.width"
+                                        source="width"
+                                        validate={required()}
+                                    />
+                                    <NumberInput
+                                        label="table.field.loc.height"
+                                        source="height"
+                                        validate={required()}
+                                    />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.loc.row"
-                                        source="lrow"
+                                        source="row"
                                         validate={required()}
                                     />
                                     <NumberInput

--
Gitblit v1.9.1