From cf2f4219a6c6469ee901e004314597ffcd4132d2 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期六, 11 十月 2025 16:51:46 +0800
Subject: [PATCH] 调试1

---
 components/mold.vue |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index d490fa0..a7bea9e 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -261,30 +261,27 @@
 				this.toolModel = '';
 			},
             async fetchFormData() {
-                const formData = new FormData();
-                formData.append('workOrderNo', this.workOrderNo);
-                formData.append('machineNo', this.machineNo);
-
+                const payload = {
+                    workOrderNo: this.workOrderNo,
+                    machineNo: this.machineNo,
+                };
                 const res = await this.$post({
                     url: '/MesCutterLedger/GetFormData',
-                    data: formData,
-                    // 涓嶈璁剧疆 Content-Type锛岃娴忚鍣ㄨ嚜鍔ㄨ缃�
+                    data: JSON.stringify(payload),
+                    headers: { 'Content-Type': 'application/json' }
                 });
-
                 if (res.status === 0) {
                     this.toolRecords = res.data;
                 } else {
                     this.$showMessage(res.message || '鑾峰彇琛ㄥ崟鏁版嵁澶辫触');
                 }
-            },
+            }
 		},
         mounted() {
             this.fetchTools('');
             this.machineNo = uni.getStorageSync('machineNo') || '';
             this.workOrderNo = uni.getStorageSync('daa001') || '';
-            if (this.machineNo && this.workOrderNo) {
-                this.fetchFormData();
-            }
+            if (this.machineNo && this.workOrderNo) {this.fetchFormData();}
         }
 	};
 </script>

--
Gitblit v1.9.3