From 3170c2aca0583f801a5527c124103cfbff2bb306 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 14 七月 2025 15:01:13 +0800
Subject: [PATCH] 盘点单功能优化
---
rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx | 44 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx
index 04ff032..0cf5299 100644
--- a/rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx
+++ b/rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx
@@ -281,6 +281,23 @@
</CustomTabPanel>
<CustomTabPanel value={value} index={1}>
<Grid container rowSpacing={2} columnSpacing={2}>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.matnr.name"
+ source="name"
+ parse={v => v}
+ required
+ autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.matnr.code"
+ source="code"
+ required
+ parse={v => v}
+ />
+ </Grid>
<Grid item xs={6} display="flex" gap={1}>
<NumberInput
label="table.field.matnr.safeQty"
@@ -331,9 +348,26 @@
</CustomTabPanel>
<CustomTabPanel value={value} index={2}>
<Grid container rowSpacing={2} columnSpacing={2}>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.matnr.name"
+ source="name"
+ parse={v => v}
+ required
+ autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.matnr.code"
+ source="code"
+ required
+ parse={v => v}
+ />
+ </Grid>
<Grid item xs={6} display="flex" gap={1}>
<ReferenceInput
- source="rglar_id"
+ source="rglarId"
reference="serialRule"
perPage={REFERENCE_INPUT_PAGESIZE}
>
@@ -349,14 +383,14 @@
</Grid>
- <Grid item xs={12} md={2}>
+ {/* <Grid item xs={12} md={2}>
<Typography variant="h6" gutterBottom>
{translate('common.edit.title.common')}
</Typography>
<StatusSelectInput />
<Box mt="2em" />
<MemoInput />
- </Grid>
+ </Grid> */}
</Grid>
</SimpleForm>
</Edit >
@@ -369,7 +403,9 @@
const { ...parmas } = props;
const form = useFormContext();
const field = `extendFields.${parmas.source}`;
- const value = form.getValues(field);
+
+ const value = form.getValues(field) || form.formState.defaultValues?.extendFields?.[parmas.source];
+
value && form.setValue(parmas.source, value);
return (
<TextInput
--
Gitblit v1.9.1