From 7ce2f9e4847888335ca2a846a7885344c3aa33fc Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期三, 09 四月 2025 16:39:57 +0800
Subject: [PATCH] fix:创建质检单修改

---
 rsf-admin/src/page/qlyInspect/AsnSelModal.jsx |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/rsf-admin/src/page/qlyInspect/AsnSelModal.jsx b/rsf-admin/src/page/qlyInspect/AsnSelModal.jsx
index 7e3f206..57b629f 100644
--- a/rsf-admin/src/page/qlyInspect/AsnSelModal.jsx
+++ b/rsf-admin/src/page/qlyInspect/AsnSelModal.jsx
@@ -38,7 +38,7 @@
     };
 
     const [formData, setFormData] = useState({
-        code: ''
+        asnCode: ''
     });
 
     const [tableData, setTableData] = useState([]);
@@ -54,7 +54,7 @@
 
     const reset = () => {
         setFormData({
-            code: ''
+            asnCode: ''
         })
     }
 
@@ -72,9 +72,8 @@
     };
 
     const getData = async () => {
-        const res = await request.post(`/qlyInspect/asn/list`, {
-            ...formData,
-        });
+        const parmas = (formData.asnCode === '' ? {} : { asnCode: formData.asnCode })
+        const res = await request.post(`/qlyInspect/asn/list`, parmas);
         if (res?.data?.code === 200) {
             setTableData(res.data.data);
         } else {
@@ -116,8 +115,8 @@
                         <Grid item md={4}>
                             <TextField
                                 label={translate('table.field.asnOrder.code')}
-                                name="code"
-                                value={formData.code}
+                                name="asnCode"
+                                value={formData.asnCode}
                                 onChange={handleChange}
                                 size="small"
                             />

--
Gitblit v1.9.1