From 1bc33546a044cbc84dd9595c19dbcd9a4e309fc9 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 10 一月 2026 14:06:10 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/sta/StaCreate.jsx |   69 ++++++++++++++++++++++------------
 1 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/zy-acs-flow/src/page/sta/StaCreate.jsx b/zy-acs-flow/src/page/sta/StaCreate.jsx
index e0fca1f..7eec5ab 100644
--- a/zy-acs-flow/src/page/sta/StaCreate.jsx
+++ b/zy-acs-flow/src/page/sta/StaCreate.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 (
@@ -85,14 +85,6 @@
                         <DialogContent>
                             <Grid container rowSpacing={2} columnSpacing={2}>
                                 <Grid item xs={6} display="flex" gap={1}>
-                                    <TextInput
-                                        label="table.field.sta.uuid"
-                                        source="uuid"
-                                        parse={v => v}
-                                        autoFocus
-                                    />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="zoneId"
                                         reference="zone"
@@ -101,23 +93,33 @@
                                             label="table.field.sta.zoneId"
                                             optionText="name"
                                             filterToQuery={(val) => ({ name: val })}
+                                            validate={required()}
                                         />
                                     </ReferenceInput>
                                 </Grid>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
+                                    <TextInput
+                                        label="table.field.sta.uuid"
+                                        source="uuid"
+                                        parse={v => v}
+                                        autoFocus
+                                    />
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.staNo"
                                         source="staNo"
                                         parse={v => v}
+                                        validate={required()}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.name"
                                         source="name"
                                         parse={v => v}
                                     />
-                                </Grid>
+                                </Grid> */}
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="staType"
@@ -140,51 +142,67 @@
                                             label="table.field.sta.code"
                                             optionText="data"
                                             filterToQuery={(val) => ({ data: val })}
+                                            validate={required()}
                                         />
                                     </ReferenceInput>
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
-                                        label="table.field.sta.offset"
-                                        source="offset"
+                                        label="table.field.sta.capacity"
+                                        source="capacity"
+                                        validate={required()}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.offset"
+                                        source="offset"
+                                        validate={required()}
+                                    />
+                                </Grid>
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.angle"
+                                        source="angle"
+                                        validate={required()}
+                                    />
+                                </Grid>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.autoing"
                                         source="autoing"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.loading"
                                         source="loading"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.inEnable"
                                         source="inEnable"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.outEnable"
                                         source="outEnable"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <TextInput
                                         label="table.field.sta.zpallet"
                                         source="zpallet"
                                         parse={v => v}
                                     />
-                                </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                </Grid> */}
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="staSts"
                                         reference="staSts"
@@ -193,9 +211,10 @@
                                             label="table.field.sta.staSts"
                                             optionText="name"
                                             filterToQuery={(val) => ({ name: val })}
+                                            validate={required()}
                                         />
                                     </ReferenceInput>
-                                </Grid>
+                                </Grid> */}
 
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <StatusSelectInput />

--
Gitblit v1.9.1