From c65a357fc8b907af755e1ef6a2c201e31eb71e94 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 07 二月 2026 13:50:38 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/sta/StaCreate.jsx |   66 +++++++++++++++++++++++++++++---
 1 files changed, 59 insertions(+), 7 deletions(-)

diff --git a/zy-acs-flow/src/page/sta/StaCreate.jsx b/zy-acs-flow/src/page/sta/StaCreate.jsx
index d462dc4..5370934 100644
--- a/zy-acs-flow/src/page/sta/StaCreate.jsx
+++ b/zy-acs-flow/src/page/sta/StaCreate.jsx
@@ -1,4 +1,4 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
+import React, { useMemo } from "react";
 import {
     CreateBase,
     useTranslate,
@@ -30,12 +30,19 @@
 import DialogCloseButton from "../components/DialogCloseButton";
 import StatusSelectInput from "../components/StatusSelectInput";
 import MemoInput from "../components/MemoInput";
+import { compDirectChoices } from "../loc/compDirect";
 
 const StaCreate = (props) => {
     const { open, setOpen } = props;
 
     const translate = useTranslate();
     const notify = useNotify();
+    const greaterThanZero = useMemo(() => (value) => {
+        if (value === undefined || value === null || value === '') {
+            return undefined;
+        }
+        return Number(value) >= 0 ? undefined : translate('validate.gtZero');
+    }, [translate]);
 
     const handleClose = (event, reason) => {
         if (reason !== "backdropClick") {
@@ -150,14 +157,59 @@
                                     <NumberInput
                                         label="table.field.sta.capacity"
                                         source="capacity"
-                                        validate={required()}
+                                        validate={[required(), greaterThanZero]}
                                     />
                                 </Grid>
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <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.height"
+                                        source="height"
+                                        validate={[required(), greaterThanZero]}
+                                    />
+                                </Grid>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.depth"
+                                        source="depth"
+                                        helperText={translate('page.sta.depthHint')}
+                                        validate={[required(), greaterThanZero]}
+                                    />
+                                </Grid> */}
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.angle"
+                                        source="angle"
+                                        validate={[required(), greaterThanZero]}
+                                    />
+                                </Grid>
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <SelectInput
+                                        label="table.field.sta.actDir"
+                                        source="actDir"
+                                        choices={compDirectChoices}
+                                        translateChoice
+                                        validate={[required(), greaterThanZero]}
+                                    />
+                                </Grid>
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.inboundWait"
+                                        source="inboundWait"
+                                        validate={greaterThanZero}
+                                    />
+                                </Grid>
+                                <Grid item xs={6} display="flex" gap={1}>
+                                    <NumberInput
+                                        label="table.field.sta.outboundWait"
+                                        source="outboundWait"
+                                        validate={greaterThanZero}
                                     />
                                 </Grid>
                                 {/* <Grid item xs={6} display="flex" gap={1}>
@@ -195,7 +247,7 @@
                                         parse={v => v}
                                     />
                                 </Grid> */}
-                                <Grid item xs={6} display="flex" gap={1}>
+                                {/* <Grid item xs={6} display="flex" gap={1}>
                                     <ReferenceInput
                                         source="staSts"
                                         reference="staSts"
@@ -207,11 +259,11 @@
                                             validate={required()}
                                         />
                                     </ReferenceInput>
-                                </Grid>
+                                </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