From fac10dcb68a892be100960e267d0a1501f34e984 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 19 三月 2025 10:28:06 +0800
Subject: [PATCH] #修改 基础数据添加空管字段

---
 rsf-admin/src/page/basicInfo/loc/InitModal.jsx |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/loc/InitModal.jsx b/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
index f0c4c48..80c6a2b 100644
--- a/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
@@ -86,7 +86,7 @@
     const handleChange = (value, name) => {
         setFormData((prevData) => ({
             ...prevData,
-            [name]: ['locType', 'type'].includes(name) ? value : +value
+            [name]: value
         }));
     };
 
@@ -133,7 +133,6 @@
                                     value={formData.locType}
                                     onChange={(e) => handleChange(e.target.value, 'locType')}
                                     size="small"
-                                    validate={[required()]}
                                     dictTypeCode="sys_width_type"
                                 />
                             </Grid>
@@ -155,7 +154,7 @@
                                     label={translate("table.field.loc.startBay")}
                                     name="startBay"
                                     value={formData.startBay}
-                                    onChange={(e) => handleChange(e.target.value, 'startBay')}
+                                    onChange={(e) => handleChange(+e.target.value, 'startBay')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}
@@ -167,7 +166,7 @@
                                     label={translate("table.field.loc.startLev")}
                                     name="startLev"
                                     value={formData.startLev}
-                                    onChange={(e) => handleChange(e.target.value, 'startLev')}
+                                    onChange={(e) => handleChange(+e.target.value, 'startLev')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}
@@ -179,7 +178,7 @@
                                     label={translate("table.field.loc.startRow")}
                                     name="startRow"
                                     value={formData.startRow}
-                                    onChange={(e) => handleChange(e.target.value, 'startRow')}
+                                    onChange={(e) => handleChange(+e.target.value, 'startRow')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}
@@ -191,7 +190,7 @@
                                     label={translate("table.field.loc.endBay")}
                                     name="endBay"
                                     value={formData.endBay}
-                                    onChange={(e) => handleChange(e.target.value, 'endBay')}
+                                    onChange={(e) => handleChange(+e.target.value, 'endBay')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}
@@ -203,7 +202,7 @@
                                     label={translate("table.field.loc.endLev")}
                                     name="endLev"
                                     value={formData.endLev}
-                                    onChange={(e) => handleChange(e.target.value, 'endLev')}
+                                    onChange={(e) => handleChange(+e.target.value, 'endLev')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}
@@ -215,7 +214,7 @@
                                     label={translate("table.field.loc.endRow")}
                                     name="endRow"
                                     value={formData.endRow}
-                                    onChange={(e) => handleChange(e.target.value, 'endRow')}
+                                    onChange={(e) => handleChange(+e.target.value, 'endRow')}
                                     size="small"
                                     type="number"
                                     validate={[required()]}

--
Gitblit v1.9.1