From c46d1d8c3b9875f051a6ec3c4a1d3fa7bd32e5db Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 15 五月 2025 17:15:21 +0800
Subject: [PATCH] 新增库存管理 新增库存明细

---
 rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx |   31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
index fcf1745..bf62c7b 100644
--- a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
+++ b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
@@ -42,6 +42,7 @@
 
 const WarehouseAreasEdit = () => {
     const translate = useTranslate();
+    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || [];
 
     return (
         <Edit
@@ -58,8 +59,8 @@
                 defaultValues={{}}
             // validate={(values) => { }}
             >
-                <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
-                    <Grid item xs={12} md={8}>
+                <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}>
+                    <Grid item xs={16} md={10}>
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.main')}
                         </Typography>
@@ -72,23 +73,27 @@
                                 autoFocus
                             />
                         </Stack> */}
-                        <Stack direction='row' gap={2}>
+                        <Stack xs={16} direction='row' gap={2}>
                             <TextInput
                                 label="table.field.warehouseAreas.name"
                                 source="name"
                                 validate={[required()]}
                                 parse={v => v}
                             />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <TextInput
                                 label="table.field.warehouseAreas.code"
                                 source="code"
                                 validate={[required()]}
                                 parse={v => v}
                             />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
+                            <AutocompleteInput
+                                choices={dicts}
+                                optionText="label"
+                                label="table.field.warehouseAreas.type"
+                                source="type"
+                                optionValue="value"
+                                parse={v => v}
+                            />
                             <ReferenceInput
                                 source="warehouseId"
                                 reference="warehouse"
@@ -96,6 +101,7 @@
                                 <AutocompleteInput
                                     label="table.field.warehouseAreas.wareId"
                                     optionText="name"
+                                    validate={[required()]}
                                     filterToQuery={(val) => ({ name: val })}
                                 />
                             </ReferenceInput>
@@ -112,8 +118,6 @@
                                     filterToQuery={(val) => ({ name: val })}
                                 />
                             </ReferenceInput>
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <ReferenceInput
                                 source="supplierId"
                                 reference="companys"
@@ -125,8 +129,6 @@
                                     filterToQuery={(val) => ({ name: val })}
                                 />
                             </ReferenceInput>
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <SelectInput
                                 label="table.field.warehouseAreas.flagMinus"
                                 source="flagMinus"
@@ -136,8 +138,6 @@
                                     { id: 1, name: '鏄�' },
                                 ]}
                             />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <SelectInput
                                 label="table.field.warehouseAreas.flagLabelMange"
                                 source="flagLabelMange"
@@ -147,8 +147,6 @@
                                     { id: 1, name: ' 鏄�' },
                                 ]}
                             />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
                             <SelectInput
                                 label="table.field.warehouseAreas.flagMix"
                                 source="flagMix"
@@ -159,9 +157,8 @@
                                 ]}
                             />
                         </Stack>
-
                     </Grid>
-                    <Grid item xs={12} md={4}>
+                    <Grid item xs={8} md={2}>
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.common')}
                         </Typography>

--
Gitblit v1.9.1