From 7f70cb15d035f0c233b9e62b9e43aa985317c908 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 04 十一月 2024 10:22:45 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/loc/LocCreate.jsx |   61 ++++++++++++++++--------------
 1 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/zy-acs-flow/src/page/loc/LocCreate.jsx b/zy-acs-flow/src/page/loc/LocCreate.jsx
index 89ab5a5..3270d8b 100644
--- a/zy-acs-flow/src/page/loc/LocCreate.jsx
+++ b/zy-acs-flow/src/page/loc/LocCreate.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,14 +84,14 @@
                         </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.loc.uuid"
                                         source="uuid"
                                         parse={v => v}
                                         autoFocus
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="zoneId"
@@ -101,6 +101,7 @@
                                             label="table.field.loc.zoneId"
                                             optionText="name"
                                             filterToQuery={(val) => ({ name: val })}
+                                            validate={required()}
                                         />
                                     </ReferenceInput>
                                 </Grid>
@@ -109,15 +110,36 @@
                                         label="table.field.loc.locNo"
                                         source="locNo"
                                         parse={v => v}
+                                        validate={required()}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                <Grid item xs={12} display="flex" gap={1}>
+                                    <Grid item xs={4} display="flex" gap={1}>
+                                        <NumberInput
+                                            label="table.field.loc.row"
+                                            source="row"
+                                        />
+                                    </Grid>
+                                    <Grid item xs={4} display="flex" gap={1}>
+                                        <NumberInput
+                                            label="table.field.loc.bay"
+                                            source="bay"
+                                        />
+                                    </Grid>
+                                    <Grid item xs={4} display="flex" gap={1}>
+                                        <NumberInput
+                                            label="table.field.loc.lev"
+                                            source="lev"
+                                        />
+                                    </Grid>
+                                </Grid>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.loc.name"
                                         source="name"
                                         parse={v => v}
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="code"
@@ -149,6 +171,7 @@
                                             label="table.field.loc.locSts"
                                             optionText="name"
                                             filterToQuery={(val) => ({ name: val })}
+                                            validate={required()}
                                         />
                                     </ReferenceInput>
                                 </Grid>
@@ -159,37 +182,19 @@
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
-                                        label="table.field.loc.row"
-                                        source="row"
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
-                                        label="table.field.loc.bay"
-                                        source="bay"
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
-                                    <NumberInput
-                                        label="table.field.loc.lev"
-                                        source="lev"
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.loc.barcode"
                                         source="barcode"
                                         parse={v => v}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.loc.zpallet"
                                         source="zpallet"
                                         parse={v => v}
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="locType"
@@ -203,9 +208,9 @@
                                     </ReferenceInput>
                                 </Grid>
 
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <StatusSelectInput />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={12} display="flex" gap={1}>
                                     <Stack direction="column" spacing={1} width={'100%'}>
                                         <MemoInput />

--
Gitblit v1.9.1