From b5b400a615743a74e9d127261bd3785554aa06aa Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期六, 10 一月 2026 13:34:40 +0800
Subject: [PATCH] #

---
 rsf-admin/src/page/warehouseAreas/WarehouseAreasCreate.jsx |  130 +++++++++++++++++++++----------------------
 1 files changed, 64 insertions(+), 66 deletions(-)

diff --git a/rsf-admin/src/page/warehouseAreas/WarehouseAreasCreate.jsx b/rsf-admin/src/page/warehouseAreas/WarehouseAreasCreate.jsx
index ea0d05f..3cf95b4 100644
--- a/rsf-admin/src/page/warehouseAreas/WarehouseAreasCreate.jsx
+++ b/rsf-admin/src/page/warehouseAreas/WarehouseAreasCreate.jsx
@@ -36,7 +36,7 @@
 
   const translate = useTranslate();
   const notify = useNotify();
-
+  const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || [];
   const handleClose = (event, reason) => {
     if (reason !== "backdropClick") {
       setOpen(false);
@@ -91,35 +91,10 @@
             </DialogTitle>
             <DialogContent sx={{ mt: 2 }}>
               <Grid container rowSpacing={2} columnSpacing={2}>
-                {/* <Grid item xs={6} display="flex" gap={1}>
-                  <TextInput
-                    label="table.field.warehouseAreas.uuid"
-                    source="uuid"
-                    parse={(v) => v}
-                    validate={[required()]}
-                    autoFocus
-                  />
-                </Grid> */}
-                <Grid item xs={6} display="flex" gap={1}>
-                  <TextInput
-                    label="table.field.warehouseAreas.name"
-                    source="name"
-                    validate={[required()]}
-                    parse={(v) => v}
-                  />
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
-                  <TextInput
-                    label="table.field.warehouseAreas.code"
-                    source="code"
-                    validate={[required()]}
-                    parse={(v) => v}
-                  />
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
+                <Grid item xs={12} display="flex" gap={1}>
                   <ReferenceInput
                     source="warehouseId"
-                    reference="warehouse"
+                    reference="warehouse"                    
                   >
                     <AutocompleteInput
                       label="table.field.warehouseAreas.wareId"
@@ -128,38 +103,31 @@
                       filterToQuery={(val) => ({ name: val })}
                     />
                   </ReferenceInput>
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
-                  <ReferenceInput source="shipperId" reference="companys" filter={{ type: 'shipper' }}>
-                    <AutocompleteInput
-                      label="table.field.warehouseAreas.shipperId"
-                      optionText="name"
-                      filterToQuery={(val) => ({ name: val })}
-                    />
-                  </ReferenceInput>
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
-                  <ReferenceInput source="supplierId" reference="companys" filter={{ type: 'supplier' }}>
-                    <AutocompleteInput
-                      label="table.field.warehouseAreas.supplierId"
-                      optionText="name"
-                      filterToQuery={(val) => ({ name: val })}
-                    />
-                  </ReferenceInput>
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
-                  <SelectInput
-                    label="table.field.warehouseAreas.flagMinus"
-                    source="flagMinus"
+                  <TextInput
+                    label="table.field.warehouseAreas.code"
+                    source="code"
                     validate={[required()]}
-                    choices={[
-                      { id: 0, name: "鍚�" },
-                      { id: 1, name: "鏄�" },
-                    ]}
+                    parse={(v) => v}
+                    placeholder={translate("placeholder.warehouseAreasCode")}
                   />
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
-                  <SelectInput
+                  <TextInput
+                    label="table.field.warehouseAreas.name"
+                    source="name"
+                    validate={[required()]}
+                    parse={(v) => v}
+                  />                
+                </Grid>                
+                <Grid item xs={12} display="flex" gap={1}>
+                  <AutocompleteInput
+                    choices={dicts}
+                    optionText="label"
+                    label="table.field.warehouseAreas.type"
+                    source="type"
+                    optionValue="value"
+                    parse={v => v}
+                    validate={[required()]}
+                  />                
+                  {/* <SelectInput
                     label="table.field.warehouseAreas.flagLabelMange"
                     source="flagLabelMange"
                     validate={[required()]}
@@ -167,9 +135,7 @@
                       { id: 0, name: " 鍚�" },
                       { id: 1, name: " 鏄�" },
                     ]}
-                  />
-                </Grid>
-                <Grid item xs={6} display="flex" gap={1}>
+                  /> */}
                   <SelectInput
                     label="table.field.warehouseAreas.flagMix"
                     source="flagMix"
@@ -179,16 +145,48 @@
                       { id: 1, name: "鏄�" },
                     ]}
                   />
-                </Grid>
-
-                <Grid item xs={6} display="flex" gap={1}>
-                  <StatusSelectInput />
+                    <SelectInput
+                    label="table.field.warehouseAreas.flagMinus"
+                    source="flagMinus"
+                    validate={[required()]}
+                    choices={[
+                      { id: 0, name: "鍚�" },
+                      { id: 1, name: "鏄�" },
+                    ]}
+                  />
                 </Grid>
                 <Grid item xs={12} display="flex" gap={1}>
+                  <ReferenceInput source="shipperId" reference="companys" filter={{ type: 'shipper' }}>
+                    <AutocompleteInput
+                      label="table.field.warehouseAreas.shipperId"
+                      optionText="name"
+                      filterToQuery={(val) => ({ name: val })}
+                    />
+                  </ReferenceInput>
+                  <ReferenceInput source="supplierId" reference="companys" filter={{ type: 'supplier' }}>
+                    <AutocompleteInput
+                      label="table.field.warehouseAreas.supplierId"
+                      optionText="name"
+                      filterToQuery={(val) => ({ name: val })}
+                    />
+                  </ReferenceInput>
+                </Grid>
+
+                <Grid item xs={12} display="flex" gap={1}>
+                  <StatusSelectInput />
+                  <TextInput
+                    label="common.field.memo"
+                    source="memo"
+                    parse={v => v}
+                    // fullWidth
+                    multiline
+                  />
+                </Grid>
+                {/* <Grid item xs={12} display="flex" gap={1}>
                   <Stack direction="column" spacing={1} width={"100%"}>
                     <MemoInput />
                   </Stack>
-                </Grid>
+                </Grid> */}
               </Grid>
             </DialogContent>
             <DialogActions

--
Gitblit v1.9.1