From a6991a33e18f69264f93a63459a4b64ea799295a Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 05 八月 2025 13:02:24 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx | 43 +++++++++++++++++++++++++++----------------
1 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
index 5b96290..db033ef 100644
--- a/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
+++ b/rsf-admin/src/page/warehouseAreas/WarehouseAreasEdit.jsx
@@ -28,6 +28,8 @@
import CustomerTopToolBar from "../components/EditTopToolBar";
import MemoInput from "../components/MemoInput";
import StatusSelectInput from "../components/StatusSelectInput";
+import DictionarySelect from "../components/DictionarySelect";
+import DictSelect from "../components/DictSelect";
const FormToolbar = () => {
const { getValues } = useFormContext();
@@ -42,6 +44,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 +61,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,27 +75,43 @@
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}
/>
+ <DictionarySelect
+ label='table.field.warehouseAreas.type'
+ name="type"
+ dictTypeCode="sys_ware_areas_type"
+ alwaysOn
+ />
+ <ReferenceInput
+ source="warehouseId"
+ reference="warehouse"
+ >
+ <AutocompleteInput
+ label="table.field.warehouseAreas.wareId"
+ optionText="name"
+ optionValue="id"
+ validate={[required()]}
+ filterToQuery={(val) => ({ name: val })}
+ />
+ </ReferenceInput>
</Stack>
<Stack direction='row' gap={2}>
<ReferenceInput
source="shipperId"
reference="companys"
- perPage={REFERENCE_INPUT_PAGESIZE}
+ filter={{ type: 'shipper' }}
>
<AutocompleteInput
label="table.field.warehouseAreas.shipperId"
@@ -100,11 +119,10 @@
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"
@@ -112,8 +130,6 @@
filterToQuery={(val) => ({ name: val })}
/>
</ReferenceInput>
- </Stack>
- <Stack direction='row' gap={2}>
<SelectInput
label="table.field.warehouseAreas.flagMinus"
source="flagMinus"
@@ -123,8 +139,6 @@
{ id: 1, name: '鏄�' },
]}
/>
- </Stack>
- <Stack direction='row' gap={2}>
<SelectInput
label="table.field.warehouseAreas.flagLabelMange"
source="flagLabelMange"
@@ -134,8 +148,6 @@
{ id: 1, name: ' 鏄�' },
]}
/>
- </Stack>
- <Stack direction='row' gap={2}>
<SelectInput
label="table.field.warehouseAreas.flagMix"
source="flagMix"
@@ -146,9 +158,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