From 68a1318b769f46f87f2a094b40d07e6c3c983697 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 09 十月 2025 14:31:33 +0800
Subject: [PATCH] 查询地址更改

---
 components/mold.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index a3d446b..0257f11 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -116,10 +116,24 @@
 			};
 		},
 		methods: {
-			searchTool() {
-				this.filteredTools = this.toolList.filter(t =>
-					t.no.includes(this.searchKey) || t.name.includes(this.searchKey)
-				);
+            async fetchTools(searchKey) {
+                // 浼犻�掑璞★紝鑰屼笉鏄瓧绗︿覆
+                const res = await this.$post({
+                    url: '/MesCutterLedger/QueryTools',
+                    data:searchKey
+                });
+                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(res.message || '鏌ヨ澶辫触');
+                }
+            },
+			async searchTool() {
+				await this.fetchTools(this.searchKey);
 			},
 			selectTool(tool) {
 				this.selectedToolNo = tool.no;
@@ -141,11 +155,15 @@
 				this.selectedToolNo = '';
 				this.toolName = '';
 				this.toolModel = '';
+			},
+			setUseLimit() {
+				// 淇濆瓨浣跨敤涓婇檺閫昏緫锛屽疄闄呭簲璋冪敤鍚庣鎺ュ彛
+				this.$showMessage('浣跨敤涓婇檺宸蹭繚瀛橈紙绀轰緥锛�');
 			}
 		},
 		mounted() {
-			// 瀹為檯搴斾粠鍚庣鍔犺浇鍒�鍏风洰褰曞拰浣跨敤璁板綍
-			this.filteredTools = this.toolList;
+			// 椤甸潰鍔犺浇鏃舵媺鍙栧叏閮ㄥ垁鍏�
+			this.fetchTools('');
 		}
 	};
 </script>

--
Gitblit v1.9.3