From ad1e4e950a4e961a41344e5847d47f91dabd0c29 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期一, 08 十二月 2025 15:58:22 +0800
Subject: [PATCH] Merge branch 'jsxswms-app' of http://47.97.1.152:5880/r/wms_app into jsxswms-app

---
 pages/AGV/AGVStart.vue |   93 +++++++++++++++++++++++++++++-----------------
 1 files changed, 59 insertions(+), 34 deletions(-)

diff --git a/pages/AGV/AGVStart.vue b/pages/AGV/AGVStart.vue
index e48fca6..5db8592 100644
--- a/pages/AGV/AGVStart.vue
+++ b/pages/AGV/AGVStart.vue
@@ -8,7 +8,8 @@
 			</view>
 			<view class="item">
 				<view class="code-decs">鍏ュ簱绔�:</view>
-				<uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣"  v-model="sta"></uni-combox>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
+				<!-- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣"  v-model="sta"></uni-combox> -->
 			</view>
 		</view>
 		
@@ -32,7 +33,7 @@
 		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
 		<view class="buttom">
 			<button size="mini" @click="reset('warn')">閲嶇疆</button>
-			<button size="mini" type="primary" @click="combConfirm('warn')">鍚姩</button>
+			<button size="mini" type="primary" @click="combConfirm('warn')" :disabled="isDisabled">鍚姩</button>
 		</view>
 		<!-- 寮圭獥 -->
 		<!-- 淇敼鏁伴噺 -->
@@ -128,7 +129,8 @@
 				floor: "",
 				devNo: [],
 				staList:[],
-				sta:''
+				sta:'',
+				isDisabled:false
 			}
 		},
 		onLoad() {
@@ -148,11 +150,19 @@
 						this.sta = 1040
 					}else if(this.stationCode.substring(0,1) == 'b'){						
 						this.staList.push(2010)
-						this.staList.push(2000)
+						// this.staList.push(2000)
 						this.sta = 2010
 					}else if(this.stationCode.substring(0,1) == 'c'){
 						this.staList.push(3010)
-						this.sta = 3010
+						this.sta = 3010					
+					}else if(this.stationCode.substring(0,1) == 'd'){
+						this.staList.push(2000)
+						this.sta = 2000
+						
+					}else if(this.stationCode.substring(0,1) == 'e'){
+						this.staList.push(1000)
+						this.staList.push(1035)
+						this.sta = 1035
 						
 					}
 					
@@ -226,7 +236,7 @@
 					}
 				});
 			},
-			messageToggle(type) {
+			messageToggle(type) {				
 				this.msgType1 = type
 				this.$refs.message.open()
 			},
@@ -430,41 +440,56 @@
 			},
 			comb() {				
 				let that = this;
+				that.isDisabled = true
 				if (that.stationCode === '') {
 					this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜"
 					this.messageToggle('error')
+					that.isDisabled = false
 					return;
 				}
-				uni.request({
-					url: that.baseUrl + '/mobile/agv/start',
-					data: JSON.stringify({
-						sta: that.stationCode,
-						inSta: that.sta
-					}),
-					method: 'POST',
-					header: {
-						'token': uni.getStorageSync('token')
-					},
-					success(result) {
-						var res = result.data
-						if (res.code === 200) {
-							that.resst();
-							that.messageText = "鍚姩鎴愬姛"
-							that.messageToggle('success')
-						} else if (res.code == 403) {
-							that.messageText = res.msg
+				
+					uni.request({
+						url: that.baseUrl + '/mobile/agv/start',
+						data: JSON.stringify({
+							sta: that.stationCode,
+							inSta: that.sta
+						}),
+						method: 'POST',
+						header: {
+							'token': uni.getStorageSync('token')
+						},
+						success(result) {
+							var res = result.data
+							if (res.code === 200) {
+								that.resst();
+								that.messageText = "鍚姩鎴愬姛"
+								that.messageToggle('success')
+							} else if (res.code == 403) {
+								that.messageText = res.msg
+								that.messageToggle('error')
+								setTimeout(() => {
+									uni.reLaunch({
+										url: '../login/login'
+									});
+								}, 1000);
+							} else {
+								that.messageText = res.msg
+								that.messageToggle('error')
+							}
+						},
+						fail: () => {
+							that.messageText = "鎺ュ彛瓒呮椂"
 							that.messageToggle('error')
-							setTimeout(() => {
-								uni.reLaunch({
-									url: '../login/login'
-								});
-							}, 1000);
-						} else {
-							that.messageText = res.msg
-							that.messageToggle('error')
+						},
+						complete(){
+							that.isDisabled = false
 						}
-					}
-				});
+					});
+				
+					
+				
+				
+				
 			},
 			reset(type) {
 				this.msgType = type

--
Gitblit v1.9.1