From fac10dcb68a892be100960e267d0a1501f34e984 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 19 三月 2025 10:28:06 +0800
Subject: [PATCH] #修改 基础数据添加空管字段

---
 rsf-admin/src/page/basicInfo/loc/LocEdit.jsx |   76 ++++---------------------------------
 1 files changed, 9 insertions(+), 67 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/loc/LocEdit.jsx b/rsf-admin/src/page/basicInfo/loc/LocEdit.jsx
index ab883db..9a21ed9 100644
--- a/rsf-admin/src/page/basicInfo/loc/LocEdit.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/LocEdit.jsx
@@ -42,7 +42,7 @@
 
 const LocEdit = () => {
     const translate = useTranslate();
-
+    const dicts = JSON.parse(localStorage.getItem('sys_dicts')).filter(dict => { return (dict.dictTypeCode == 'sys_loc_type') });
     return (
         <Edit
             redirect="list"
@@ -66,7 +66,7 @@
                         <Grid container rowSpacing={2} columnSpacing={2}>
                             <Grid item xs={6} display="flex" gap={1}>
                                 <ReferenceInput
-                                    source="warehouseId$"
+                                    source="warehouseId"
                                     reference="warehouse"
                                 >
                                     <AutocompleteInput
@@ -99,38 +99,14 @@
                                 />
                             </Grid>
                             <Grid item xs={6} display="flex" gap={1}>
-                                <TextInput
-                                    label="table.field.loc.type"
+                                <AutocompleteInput
+                                    choices={dicts}
                                     source="type"
+                                    optionText="label"
+                                    label="table.field.loc.type"
+                                    optionValue="value"
                                     parse={v => v}
-                                    validate={required()}
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <TextInput
-                                    label="table.field.loc.name"
-                                    source="name"
-                                    parse={v => v}
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.flagLogic"
-                                    source="flagLogic"
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <TextInput
-                                    label="table.field.loc.fucAtrrs"
-                                    source="fucAtrrs"
-                                    parse={v => v}
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <TextInput
-                                    label="table.field.loc.barcode"
-                                    source="barcode"
-                                    parse={v => v}
+                                    validate={[required()]}
                                 />
                             </Grid>
                             <Grid item xs={6} display="flex" gap={1}>
@@ -164,7 +140,7 @@
                             <Grid item xs={6} display="flex" gap={1}>
                                 <NumberInput
                                     label="table.field.loc.row"
-                                    source="lrow"
+                                    source="row"
                                     validate={required()}
                                 />
                             </Grid>
@@ -182,41 +158,7 @@
                                     validate={required()}
                                 />
                             </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.channel"
-                                    source="channel"
-                                    validate={required()}
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.maxParts"
-                                    source="maxParts"
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.maxPack"
-                                    source="maxPack"
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <NumberInput
-                                    label="table.field.loc.flagLabelMange"
-                                    source="flagLabelMange"
-                                />
-                            </Grid>
-                            <Grid item xs={6} display="flex" gap={1}>
-                                <TextInput
-                                    label="table.field.loc.locAttrs"
-                                    source="locAttrs"
-                                    parse={v => v}
-                                    validate={required()}
-                                />
-                            </Grid>
                         </Grid>
-
                     </Grid>
                     <Grid item xs={12} md={2}>
                         <Typography variant="h6" gutterBottom>

--
Gitblit v1.9.1