From 72139f39a0845f8de31fd44bc5dd7077df17d48e Mon Sep 17 00:00:00 2001
From: lbq <1065079612@qq.com>
Date: 星期一, 05 一月 2026 09:56:29 +0800
Subject: [PATCH] 仓库和库区页面优化
---
rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx | 179 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 128 insertions(+), 51 deletions(-)
diff --git a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
index db033ef..aea80ce 100644
--- a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
+++ b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
@@ -61,8 +61,8 @@
defaultValues={{}}
// validate={(values) => { }}
>
- <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}>
- <Grid item xs={16} md={10}>
+ <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={1} columnSpacing={3}>
+ <Grid item xs={12} md={6} display="flex" flexDirection="column" gap={1} sx={{ '& .MuiFormControl-root': { mb: 0 } }}>
<Typography variant="h6" gutterBottom>
{translate('common.edit.title.main')}
</Typography>
@@ -75,28 +75,11 @@
autoFocus
/>
</Stack> */}
- <Stack xs={16} direction='row' gap={2}>
- <TextInput
- label="table.field.warehouseAreas.name"
- source="name"
- validate={[required()]}
- parse={v => v}
- />
- <TextInput
- label="table.field.warehouseAreas.code"
- source="code"
- validate={[required()]}
- parse={v => v}
- />
- <DictionarySelect
- label='table.field.warehouseAreas.type'
- name="type"
- dictTypeCode="sys_ware_areas_type"
- alwaysOn
- />
+ <Stack direction='row' gap={2}>
<ReferenceInput
source="warehouseId"
reference="warehouse"
+ autoFocus
>
<AutocompleteInput
label="table.field.warehouseAreas.wareId"
@@ -107,6 +90,103 @@
/>
</ReferenceInput>
</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}>
+ <TextInput
+ label="table.field.warehouseAreas.name"
+ source="name"
+ validate={[required()]}
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <DictionarySelect
+ label='table.field.warehouseAreas.type'
+ name="type"
+ dictTypeCode="sys_ware_areas_type"
+ alwaysOn
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <SelectInput
+ label="table.field.warehouseAreas.flagMix"
+ source="flagMix"
+ validate={[required()]}
+ choices={[
+ { id: 0, name: '鍚�' },
+ { id: 1, name: '鏄�' },
+ ]}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <SelectInput
+ label="table.field.warehouseAreas.flagMinus"
+ source="flagMinus"
+ validate={[required()]}
+ choices={[
+ { id: 0, name: '鍚�' },
+ { id: 1, name: '鏄�' },
+ ]}
+ />
+ </Stack>
+ {/* <Stack direction='row' gap={2}>
+ <ReferenceInput
+ source="shipperId"
+ reference="companys"
+ filter={{ type: 'shipper' }}
+ >
+ <AutocompleteInput
+ label="table.field.warehouseAreas.shipperId"
+ optionText="name"
+ filterToQuery={(val) => ({ name: val })}
+ />
+ </ReferenceInput>
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <ReferenceInput
+ source="supplierId"
+ reference="companys"
+ filter={{ type: 'supplier' }}
+ >
+ <AutocompleteInput
+ label="table.field.warehouseAreas.supplierId"
+ optionText="name"
+ filterToQuery={(val) => ({ name: val })}
+ />
+ </ReferenceInput>
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <StatusSelectInput />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="common.field.memo"
+ source="memo"
+ parse={v => v}
+ multiline
+ />
+ </Stack> */}
+ </Grid>
+ {/* <Grid item xs={8} md={2}>
+ <Typography variant="h6" gutterBottom>
+ {translate('common.edit.title.common')}
+ </Typography>
+ <StatusSelectInput />
+ <Box mt="2em" />
+ <MemoInput />
+ </Grid> */}
+ <Grid item xs={12} md={6} display="flex" flexDirection="column" gap={1} sx={{ '& .MuiFormControl-root': { mb: 0 } }}>
+ <Typography variant="h6" gutterBottom>
+
+ {/* {translate('common.edit.title.main')} */}
+ </Typography>
<Stack direction='row' gap={2}>
<ReferenceInput
source="shipperId"
@@ -119,6 +199,17 @@
filterToQuery={(val) => ({ name: val })}
/>
</ReferenceInput>
+ {/* <SelectInput
+ label="table.field.warehouseAreas.flagLabelMange"
+ source="flagLabelMange"
+ validate={[required()]}
+ choices={[
+ { id: 0, name: ' 鍚�' },
+ { id: 1, name: ' 鏄�' },
+ ]}
+ /> */}
+ </Stack>
+ <Stack direction='row' gap={2}>
<ReferenceInput
source="supplierId"
reference="companys"
@@ -130,42 +221,28 @@
filterToQuery={(val) => ({ name: val })}
/>
</ReferenceInput>
+ </Stack>
+ <Stack direction='row' gap={2}>
+ {/* <StatusSelectInput /> */}
<SelectInput
- label="table.field.warehouseAreas.flagMinus"
- source="flagMinus"
+ label="common.field.status"
+ source="status"
validate={[required()]}
choices={[
- { id: 0, name: '鍚�' },
- { id: 1, name: '鏄�' },
+ { id: '1', name: 'common.enums.statusTrue' },
+ { id: '0', name: 'common.enums.statusFalse' },
]}
- />
- <SelectInput
- label="table.field.warehouseAreas.flagLabelMange"
- source="flagLabelMange"
- validate={[required()]}
- choices={[
- { id: 0, name: ' 鍚�' },
- { id: 1, name: ' 鏄�' },
- ]}
- />
- <SelectInput
- label="table.field.warehouseAreas.flagMix"
- source="flagMix"
- validate={[required()]}
- choices={[
- { id: 0, name: '鍚�' },
- { id: 1, name: '鏄�' },
- ]}
+ resettable
/>
</Stack>
- </Grid>
- <Grid item xs={8} md={2}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.common')}
- </Typography>
- <StatusSelectInput />
- <Box mt="2em" />
- <MemoInput />
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="common.field.memo"
+ source="memo"
+ parse={v => v}
+ multiline
+ />
+ </Stack>
</Grid>
</Grid>
</SimpleForm>
--
Gitblit v1.9.1