From b4681ce365588afecf9b225b1571179936a3bdf6 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 26 一月 2026 13:47:20 +0800
Subject: [PATCH] #

---
 pages/AGV/StartInTask.vue |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index 6b65fce..cbb8d8f 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -3,7 +3,7 @@
 		<form>
 			<view class="cu-form-group margin-top">
 				<view class="title">鎺ラ┏绔欑偣</view>
-				<input placeholder="璇锋壂鎻忔帴椹崇珯鐐规潯鐮�" v-model="agvStation" ></input>
+				<input placeholder="璇锋壂鎻忔帴椹崇珯鐐规潯鐮�" v-model="agvStationInput" @input="checkAgvStation"></input>
 				<!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
 			</view>	
 			<view class="cu-form-group">
@@ -104,8 +104,8 @@
 				whAreaId:'',
 				repeatClick: false,
 				buttonPermissions: [] ,// 鎸夐挳鏉冮檺鍒楄〃
-				agvStation:''
-				
+				agvStationInput: '', // AGV绔欑偣杈撳叆鍊�
+				agvStationName: ''
 			}
 		},
 		computed: {
@@ -120,6 +120,33 @@
 			console.log('褰撳墠椤甸潰鎸夐挳鏉冮檺:', this.buttonPermissions);
 		},
 		methods: {
+			async checkAgvStation() {
+				const that = this
+				if (this.agvStationInput === '' || this.agvStationInput === null) {
+					uni.showToast({
+						title: '瀹瑰櫒鐮佷负绌�',
+						icon: 'none',
+						position: 'top'
+					})
+					return
+				}
+				const { code, data, msg } = await request('/check/agvStation', {
+					transferStationNo: this.agvStationInput
+				})
+				if (code === 200) {
+					this.agvStationName = data.stationName
+				} else {
+					uni.showToast({
+						title: msg,
+						icon: 'none',
+						position: 'top'
+					})
+					setTimeout(function () {
+						that.agvStationName = ''
+						that.agvStationInput = ''
+					}, 200)
+				}
+			},
 			hasButtonPermission(route) {
 				return this.buttonPermissions.includes(route);
 			},
@@ -183,7 +210,7 @@
 			},
 
 			async confirm() {				
-				if(this.agvStation === '' || this.agvStation ===null){
+				if(this.agvStationName === '' || this.agvStationName ===null){
 					uni.showToast({
 						title: "鎺ラ┏绔欑偣涓嶈兘涓虹┖",
 						icon: "none",
@@ -210,7 +237,7 @@
 					data,
 					msg
 				} = await request('/AGV/task/start',{
-						staNo: this.agvStation,
+						staNo: this.agvStationName,
 						area: this.whAreaId,
 						barcode:this.barcode
 					}

--
Gitblit v1.9.1