From 9339cb413975fd89db9bcbb3470d62cb7d211c14 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 08 十月 2024 14:59:46 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx
index 61d6a1e..365b716 100644
--- a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx
+++ b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx
@@ -48,8 +48,8 @@
notify('common.response.success');
};
- const handleError = async (data) => {
- notify('common.response.fail');
+ const handleError = async (error) => {
+ notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } });
};
return (
@@ -84,12 +84,20 @@
</DialogTitle>
<DialogContent>
<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.agvModel.uuid"
source="uuid"
parse={v => v}
autoFocus
+ />
+ </Grid> */}
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.agvModel.name"
+ source="name"
+ parse={v => v}
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -97,13 +105,7 @@
label="table.field.agvModel.type"
source="type"
parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.agvModel.name"
- source="name"
- parse={v => v}
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -134,6 +136,7 @@
<NumberInput
label="table.field.agvModel.diameter"
source="diameter"
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -147,6 +150,7 @@
<NumberInput
label="table.field.agvModel.backpack"
source="backpack"
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -171,6 +175,7 @@
<NumberInput
label="table.field.agvModel.workDirection"
source="workDirection"
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
@@ -181,6 +186,7 @@
{ id: 0, name: '鍚�' },
{ id: 1, name: '鏄�' },
]}
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
--
Gitblit v1.9.1