From e0351f5e0d75ab4f1da19696b55a1d3cd70b0a68 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期二, 25 三月 2025 16:43:06 +0800
Subject: [PATCH] feat:库区批量
---
rsf-admin/src/page/container/ContainerCreate.jsx | 34 ++++++++++++++++++++++------------
1 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/rsf-admin/src/page/container/ContainerCreate.jsx b/rsf-admin/src/page/container/ContainerCreate.jsx
index a1b5af6..6e14d00 100644
--- a/rsf-admin/src/page/container/ContainerCreate.jsx
+++ b/rsf-admin/src/page/container/ContainerCreate.jsx
@@ -36,7 +36,7 @@
const translate = useTranslate();
const notify = useNotify();
-
+ const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_container_type')) || [];
const handleClose = (event, reason) => {
if (reason !== "backdropClick") {
setOpen(false);
@@ -84,7 +84,7 @@
</DialogTitle>
<DialogContent sx={{ mt: 2 }}>
<Grid container rowSpacing={2} columnSpacing={2}>
- <Grid item xs={6} display="flex" gap={1}>
+ {/* <Grid item xs={6} display="flex" gap={1}>
<TextInput
label="table.field.container.code"
source="code"
@@ -92,7 +92,7 @@
autoFocus
validate={required()}
/>
- </Grid>
+ </Grid> */}
<Grid item xs={6} display="flex" gap={1}>
<TextInput
label="table.field.container.name"
@@ -101,10 +101,14 @@
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <NumberInput
+ <AutocompleteInput
+ choices={dicts}
+ optionText="label"
label="table.field.container.typeId"
- source="typeId"
- />
+ source="type"
+ optionValue="value"
+ parse={v => v}
+ validate={[required()]} />
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<NumberInput
@@ -116,7 +120,7 @@
<Grid item xs={6} display="flex" gap={1}>
<NumberInput
label="table.field.container.lenght"
- source="lenght"
+ source="length"
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -156,10 +160,16 @@
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.container.panrentId"
+ <ReferenceInput
source="panrentId"
- />
+ reference="container"
+ >
+ <AutocompleteInput
+ label="table.field.container.panrentId"
+ optionText="name"
+ filterToQuery={(val) => ({ name: val })}
+ />
+ </ReferenceInput>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<DateInput
@@ -173,7 +183,7 @@
source="flagRycle"
choices={[
{ id: 1, name: '鏄�' },
- { id: 0, name: '鍚�' },
+ { id: 0, name: '鍚�' },
]}
/>
</Grid>
@@ -183,7 +193,7 @@
source="flagLogic"
choices={[
{ id: 1, name: '鏄�' },
- { id: 0, name: '鍚�' },
+ { id: 0, name: '鍚�' },
]}
/>
</Grid>
--
Gitblit v1.9.1