From 7a7e7117abe02043864d8737b3dbd4e6f2c51fa6 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 25 二月 2025 13:04:06 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.97.1.152:5880/r/wms-master into dev

---
 rsf-admin/src/page/loc/LocEdit.jsx |  249 +++++++++++++++++++++++++------------------------
 1 files changed, 128 insertions(+), 121 deletions(-)

diff --git a/rsf-admin/src/page/loc/LocEdit.jsx b/rsf-admin/src/page/loc/LocEdit.jsx
index 656f0d9..fdfed0f 100644
--- a/rsf-admin/src/page/loc/LocEdit.jsx
+++ b/rsf-admin/src/page/loc/LocEdit.jsx
@@ -59,132 +59,139 @@
             // validate={(values) => { }}
             >
                 <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
-                    <Grid item xs={12} md={8}>
+                    <Grid item xs={12} md={10}>
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.main')}
                         </Typography>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.areaId"
-                                source="areaId"
-                                autoFocus
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.code"
-                                source="code"
-                                parse={v => v}
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.type"
-                                source="type"
-                                parse={v => v}
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.name"
-                                source="name"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.flagLogic"
-                                source="flagLogic"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.fucAtrrs"
-                                source="fucAtrrs"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.barcode"
-                                source="barcode"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.unit"
-                                source="unit"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.size"
-                                source="size"
-                                parse={v => v}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.row"
-                                source="row"
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.col"
-                                source="col"
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.lev"
-                                source="lev"
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.channel"
-                                source="channel"
-                                validate={required()}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.maxParts"
-                                source="maxParts"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.maxPack"
-                                source="maxPack"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.loc.flagLabelMange"
-                                source="flagLabelMange"
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.loc.locAttrs"
-                                source="locAttrs"
-                                parse={v => v}
-                                validate={required()}
-                            />
-                        </Stack>
+                        <Grid container rowSpacing={2} columnSpacing={2}>
+                            <Grid item xs={6} display="flex" gap={1}>
+                                <ReferenceInput
+                                    source="areaId"
+                                    reference="warehouseAreas"
+                                >
+                                    <AutocompleteInput
+                                        label="table.field.loc.areaId"
+                                        optionText="name"
+                                        validate={[required()]}
+                                        filterToQuery={(val) => ({ name: val })}
+                                    />
+                                </ReferenceInput>
+                            </Grid>
+                            <Grid item xs={6} display="flex" gap={1}>
+                                <TextInput
+                                    label="table.field.loc.code"
+                                    source="code"
+                                    parse={v => v}
+                                    validate={required()}
+                                />
+                            </Grid>
+                            <Grid item xs={6} display="flex" gap={1}>
+                                <TextInput
+                                    label="table.field.loc.type"
+                                    source="type"
+                                    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}
+                                />
+                            </Grid>
+                            <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}>
+                                <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.row"
+                                    source="lrow"
+                                    validate={required()}
+                                />
+                            </Grid>
+                            <Grid item xs={6} display="flex" gap={1}>
+                                <NumberInput
+                                    label="table.field.loc.col"
+                                    source="col"
+                                    validate={required()}
+                                />
+                            </Grid>
+                            <Grid item xs={6} display="flex" gap={1}>
+                                <NumberInput
+                                    label="table.field.loc.lev"
+                                    source="lev"
+                                    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={4}>
+                    <Grid item xs={12} md={2}>
                         <Typography variant="h6" gutterBottom>
                             {translate('common.edit.title.common')}
                         </Typography>

--
Gitblit v1.9.1