From 927b1bc052d406218e70eae4c5221be7d3a09da8 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 09 十月 2025 13:34:17 +0800
Subject: [PATCH] BUG修改2
---
components/mold.vue | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index 2ecdde9..bd18f5c 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -117,21 +117,19 @@
},
methods: {
async fetchTools(searchKey) {
- // 娉ㄦ剰锛歜ody 鐩存帴鏄瓧绗︿覆
- const res = await fetch('/api/MesOrderSta/QueryTools', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(searchKey) // 杩欓噷 searchKey 鏄瓧绗︿覆
+ // 浣跨敤 this.$post 鍙戦�� POST 璇锋眰锛宐ody 鐩存帴浼犲瓧绗︿覆
+ const res = await this.$post({
+ url: '/MesOrderSta/QueryTools',
+ data: searchKey // 鐩存帴浼犲瓧绗︿覆
});
- const data = await res.json();
- if (data.status === 0) {
- this.filteredTools = data.data.tbBillList.map(t => ({
+ if (res.status === 0) {
+ this.filteredTools = res.data.tbBillList.map(t => ({
no: t.cutterId || t.no,
name: t.cutterName || t.name,
model: t.cutterModel || t.model
}));
} else {
- this.$showMessage(data.message || '鏌ヨ澶辫触');
+ this.$showMessage(res.message || '鏌ヨ澶辫触');
}
},
async searchTool() {
--
Gitblit v1.9.3