From 786c5ca17012ff3a01faf466b751bdbe70629b97 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 25 八月 2025 15:25:46 +0800
Subject: [PATCH] 1

---
 代码管理/NEWCode/WIDESEAWCS_PDA/pages/叫料/空托回流.vue |   76 ++++++++++++++++++++++++++++++--------
 1 files changed, 60 insertions(+), 16 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\251\272\346\211\230\345\233\236\346\265\201.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\251\272\346\211\230\345\233\236\346\265\201.vue"
index 814b56a..581faaa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\251\272\346\211\230\345\233\236\346\265\201.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\251\272\346\211\230\345\233\236\346\265\201.vue"
@@ -1,20 +1,21 @@
 <template>
 	<view>
-		<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
-		</uni-segmented-control>
+		<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"></uni-segmented-control>
 		<view class="content">
 			<view v-if="current === 0" class="headerstyle">
 				<view class="itemstyle">
 					<uni-forms label-width="120">
-						<uni-forms-item label="璧风偣缂撳瓨鏋跺湴鍧�">
-							<uni-easyinput type="text" :focus="!addressFocus" v-model="sourceAddress"
-								placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" ref='midInput' @input="inputChangebarcode" />
-							<!-- <uni-data-select v-model="value" :localdata="rangs"></uni-data-select> -->
+						<uni-forms-item label="绗竴璧风偣缂撳瓨鏋跺湴鍧�">
+							<uni-easyinput type="text" v-model="sourceAddress" placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" ref='firstInput'
+								:focus="focusFirst" @confirm="handleFirstInputConfirm" @input="checkFirstInput" />
 						</uni-forms-item>
-						<uni-forms-item label="缁堢偣杈撻�佺嚎鍦板潃">
-							<uni-easyinput type="text" :focus="!addressFocus" v-model="targetAddress"
-								placeholder="璇锋壂鎻忕粓鐐瑰湴鍧�" ref='midInput' @input="inputChangebarcode" />
+						<uni-forms-item label="绗簩璧风偣缂撳瓨鏋跺湴鍧�">
+							<uni-easyinput type="text" v-model="sourceAddress1" placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" ref='secondInput'
+								:focus="focusSecond" @confirm="handleSecondInputConfirm" />
 						</uni-forms-item>
+<!-- 						<uni-forms-item label="缁堢偣杈撻�佺嚎鍦板潃">
+							<uni-data-select v-model="value" :localdata="rangs"></uni-data-select>
+						</uni-forms-item> -->
 						<uni-forms-item>
 							<button @click="inbound" type="primary" size="default"
 								style="margin-top: 2%;">杈撻�佺嚎鎼繍纭</button>
@@ -46,6 +47,7 @@
 				addressFocus: false,
 				targetAddress: "",
 				sourceAddress: "",
+				sourceAddress1: "",
 				Exception: "",
 				address: "",
 				check: true,
@@ -53,7 +55,18 @@
 				matInfo: [],
 				value2: "",
 				matTotals: [],
+				focusFirst: true, // 鍒濆鑱氱劍绗竴涓緭鍏ユ
+				focusSecond: false, // 鍒濆涓嶈仛鐒︾浜屼釜杈撳叆妗�
 				value: 0,
+				rangs: [{
+						value: "FJXL-KPHLX001",
+						text: "FJXL-KPHLX001"
+					},
+					{
+						value: "ZJXL-KPHLX001",
+						text: "ZJXL-KPHLX001"
+					},
+				],
 				// range: [],
 			}
 		},
@@ -98,6 +111,26 @@
 			// 		}
 			// 	})
 			// },
+			// 妫�鏌ョ涓�涓緭鍏ユ鍐呭
+			checkFirstInput(value) {
+				if (value && value.length > 0) {
+					// 濡傛灉绗竴涓緭鍏ユ鏈夊唴瀹癸紝鑷姩璺宠浆鍒扮浜屼釜杈撳叆妗�
+					this.focusFirst = false;
+					this.$nextTick(() => {
+						this.focusSecond = true;
+					});
+				}
+			},
+
+			// 澶勭悊绗竴涓緭鍏ユ纭浜嬩欢
+			handleFirstInputConfirm() {
+				this.focusFirst = false;
+				this.$nextTick(() => {
+					this.focusSecond = true;
+				});
+			},
+
+
 			onClickItem(e) {
 				this.focus = false;
 				this.addressFocus = false;
@@ -118,31 +151,38 @@
 			inbound() {
 				// 鎻愬彇杈撳叆妗嗙殑鍊�
 				const sourceAddress = this.sourceAddress;
-				const targetAddress = this.targetAddress;
+				const sourceAddress1 = this.sourceAddress1;
+				const targetAddress = this.value;
 
 				if (sourceAddress == "") {
 					this.$t.message.toast('璇烽�夋嫨璧风偣浣嶇疆');
 					return;
 				}
-				if (targetAddress == "") {
-					this.$t.message.toast('璇锋壂鐬勭粓鐐逛綅缃�');
+				if (sourceAddress1 == "") {
+					this.$t.message.toast('璇烽�夋嫨璧风偣浣嶇疆');
 					return;
 				}
+				// if (targetAddress == "") {
+				// 	this.$t.message.toast('璇锋壂鐬勭粓鐐逛綅缃�');
+				// 	return;
+				// }
 				var postData = {
 					MainData: {
 						"sourceAddress": this.sourceAddress,
-						"targetAddress": this.targetAddress,
+						"sourceAddress1": this.sourceAddress1,
+						// "targetAddress": this.value,
 					}
 				}
 				// console.log(Exception);
 				this.$u.post('/api/PDA/EmptyTask', postData).then(res => {
 					this.$t.message.closeLoading();
 					console.log(postData);
-					if (res.code == 0) {
+					if (res.code == 200) {
 						this.$t.message.toast('鍛煎彨鎴愬姛');
 						this.sourceAddress = "";
-							this.targetAddress = "";
-							// this.$refs.popup.close();
+						this.sourceAddress1 = "";
+						// this.value = "";
+						// this.$refs.popup.close();
 						// this.submit();
 					} else {
 						this.$t.message.toast(res.message);
@@ -163,6 +203,10 @@
 					}
 				})
 			},
+			onReady() {
+				// 椤甸潰鍔犺浇瀹屾垚鍚庤嚜鍔ㄨ仛鐒︾涓�涓緭鍏ユ
+				this.focusFirst = true;
+			}
 			// getEndLocations() {
 			// 	this.$u.post('/api/CachePoint/GetEndPoints', null).then(res => {
 			// 		if (res.status) {

--
Gitblit v1.9.3