From a0a30a103b30a972942eb5cf4b4c0b45a1c2e562 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期四, 26 二月 2026 13:04:10 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/guarantee/GuaranteeEdit.jsx |  139 ++++++++++++++++++++-------------------------
 1 files changed, 62 insertions(+), 77 deletions(-)

diff --git a/zy-acs-flow/src/page/guarantee/GuaranteeEdit.jsx b/zy-acs-flow/src/page/guarantee/GuaranteeEdit.jsx
index aae03b9..f763ff9 100644
--- a/zy-acs-flow/src/page/guarantee/GuaranteeEdit.jsx
+++ b/zy-acs-flow/src/page/guarantee/GuaranteeEdit.jsx
@@ -1,4 +1,4 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
+import React from "react";
 import {
     Edit,
     SimpleForm,
@@ -29,87 +29,72 @@
     )
 }
 
-const GuaranteeEdit = () => {
+const GuaranteeEditForm = () => {
     const translate = useTranslate();
 
     return (
-        <Edit
-            redirect="list"
-            mutationMode={EDIT_MODE}
-            actions={<CustomerTopToolBar />}
-            aside={<EditBaseAside />}
+        <SimpleForm
+            shouldUnregister
+            warnWhenUnsavedChanges
+            toolbar={<FormToolbar />}
+            mode="onTouched"
+            defaultValues={{}}
         >
-            <SimpleForm
-                shouldUnregister
-                warnWhenUnsavedChanges
-                toolbar={<FormToolbar />}
-                mode="onTouched"
-                defaultValues={{}}
-            // validate={(values) => { }}
-            >
-                <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
-                    <Grid item xs={12} md={8}>
-                        <Typography variant="h6" gutterBottom>
-                            {translate('common.edit.title.main')}
-                        </Typography>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.guarantee.uuid"
-                                source="uuid"
-                                parse={v => v}
-                                autoFocus
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <TextInput
-                                label="table.field.guarantee.name"
-                                source="name"
-                                parse={v => v}
-                                validate={[required()]}
-                            />
-                        </Stack>
-                        <ScopeField />
-                        <Box mt={2}>
-                            <CronField />
-                        </Box>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.guarantee.requiredCount"
-                                source="requiredCount"
-                                validate={[required()]}
-                                min={1}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.guarantee.minSoc"
-                                source="minSoc"
-                                validate={[required()]}
-                                min={1}
-                                max={100}
-                            />
-                        </Stack>
-                        <Stack direction='row' gap={2}>
-                            <NumberInput
-                                label="table.field.guarantee.leadTime"
-                                source="leadTime"
-                                validate={[required()]}
-                                min={1}
-                            />
-                        </Stack>
+            <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
+                <Grid item xs={12} md={8}>
+                    <Typography variant="h6" gutterBottom>
+                        {translate('common.edit.title.main')}
+                    </Typography>
+                    <Stack direction='row' gap={2}>
+                        <TextInput
+                            label="table.field.guarantee.name"
+                            source="name"
+                            parse={v => v}
+                            validate={[required()]}
+                            autoFocus
+                        />
+                    </Stack>
+                    <ScopeField />
+                    <Box mt={2}>
+                        <CronField />
+                    </Box>
+                    <Stack direction='row' gap={2}>
+                        <NumberInput
+                            label="table.field.guarantee.requiredCount"
+                            source="requiredCount"
+                            validate={[required()]}
+                            min={1}
+                        />
+                    </Stack>
+                    <Stack direction='row' gap={2}>
+                        <NumberInput
+                            label="table.field.guarantee.minSoc"
+                            source="minSoc"
+                            validate={[required()]}
+                            min={1}
+                            max={100}
+                        />
+                    </Stack>
+                    <Stack direction='row' gap={2}>
+                        <NumberInput
+                            label="table.field.guarantee.leadTime"
+                            source="leadTime"
+                            validate={[required()]}
+                            min={1}
+                        />
+                    </Stack>
 
-                    </Grid>
-                    <Grid item xs={12} md={4}>
-                        <Typography variant="h6" gutterBottom>
-                            {translate('common.edit.title.common')}
-                        </Typography>
-                        <StatusSelectInput />
-                        <Box mt="2em" />
-                        <MemoInput />
-                    </Grid>
                 </Grid>
-            </SimpleForm>
-        </Edit >
+                <Grid item xs={12} md={4}>
+                    <Typography variant="h6" gutterBottom>
+                        {translate('common.edit.title.common')}
+                    </Typography>
+                    <StatusSelectInput />
+                    <Box mt="2em" />
+                    <MemoInput />
+                </Grid>
+            </Grid>
+        </SimpleForm>
     )
 }
 
@@ -125,7 +110,7 @@
             scopeValue: data.scopeType === DEFAULT_SCOPE_TYPE ? null : data.scopeValue,
         })}
     >
-        <GuaranteeEdit />
+        <GuaranteeEditForm />
     </Edit>
 );
 

--
Gitblit v1.9.1