From e9fbecd61a9ab8c5d906269150b6cdc8ca86dfdb Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期二, 31 三月 2026 09:09:45 +0800
Subject: [PATCH] 1

---
 吉安PDA/pages/stash/Syncretism.vue |   48 ++++++++++++++++++------------------------------
 1 files changed, 18 insertions(+), 30 deletions(-)

diff --git "a/\345\220\211\345\256\211PDA/pages/stash/Syncretism.vue" "b/\345\220\211\345\256\211PDA/pages/stash/Syncretism.vue"
index cf5f238..fb87d59 100644
--- "a/\345\220\211\345\256\211PDA/pages/stash/Syncretism.vue"
+++ "b/\345\220\211\345\256\211PDA/pages/stash/Syncretism.vue"
@@ -3,12 +3,12 @@
 		<view class="itemstyle">
 			<uni-forms label-width="180">
 				<uni-forms-item label="鍘熷鎵樼洏鏉$爜:">
-					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="sourceFocus"
-						v-model="soussAddress" @input="barcodeInput" />
+					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="soussAddress"
+						@input="barcodeInput" />
 				</uni-forms-item>
 				<uni-forms-item label="鐩爣鎵樼洏鏉$爜:">
-					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="targetFocus"
-						v-model="targetAddress" @input="barcodeInput" />
+					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="targetAddress"
+						@input="barcodeInput" />
 				</uni-forms-item>
 				<uni-forms-item>
 					<button @click="AGVTasks" type="primary" size="default" style="margin-top: 2%;">纭瀹屾垚</button>
@@ -20,29 +20,28 @@
 </template>
 
 <script>
+	const innerAudioContext = uni.createInnerAudioContext();
 	export default {
 		data() {
 			return {
-				sourceFocus: true, // 榛樿鍘熷鎵樼洏杈撳叆妗嗚幏寰楃劍鐐�
-				targetFocus: false, // 鐩爣鎵樼洏杈撳叆妗嗕笉鑾峰緱鐒︾偣
+				focus: false,
 				soussAddress: "",
 				targetAddress: "",
-				warehouseId: "",
+					warehouseId: "",
 			}
 		},
+		onShow() {},
 		onLoad(res) {
-			this.warehouseId = res.warehouseId;
+			this.focus = false;
+			this.warehouseId=res.warehouseId;
 		},
 		methods: {
-			barcodeInput(type) {
-				if (type != '') {
-					if (this.soussAddress == "") {
-						setTimeout(() => {
-							this.sourceFocus = false;
-							this.targetFocus = true;
-						}, 100);
+			barcodeInput() {
+				this.$nextTick(function(x) {
+					if (this.barcode.length > 0) {
+						this.focus = true;
 					}
-				}
+				})
 			},
 			AGVTasks() {
 				if (this.soussAddress == "") {
@@ -50,8 +49,6 @@
 						title: "璇锋壂鎻忓師濮嬫墭鐩樻潯鐮�",
 						type: 'error'
 					})
-					this.sourceFocus = true;
-					this.targetFocus = false;
 					return;
 				}
 				if (this.targetAddress == "") {
@@ -59,37 +56,28 @@
 						title: "璇锋壂鎻忕洰鏍囨墭鐩樻潯鐮�",
 						type: 'error'
 					})
-					this.sourceFocus = false;
-					this.targetFocus = true;
 					return;
 				}
-
 				var postDate = {
 					MainData: {
 						soussAddress: this.soussAddress,
 						targetAddress: this.targetAddress,
-						warehouseId: this.warehouseId,
+						warehouseId:this.warehouseId,
 					}
 				}
 				this.$u.post('/api/InboundOrder/SYMaterielGroup', postDate).then(
 					res => {
 						if (res.status) {
 							this.$refs.uToast.show({
-								title: "鍚堟墭鎴愬姛",
+								title: "浠诲姟鍒涘缓鎴愬姛鎴愬姛",
 								type: "success"
 							})
-							this.soussAddress = "";
-							this.targetAddress = "";
-							this.sourceFocus = true;
-							this.targetFocus = false;
+							this.barcode = "";
 						} else {
 							this.$refs.uToast.show({
 								title: res.message,
 								type: "error"
 							})
-							
-							this.sourceFocus = true;
-							this.targetFocus = false;
 						}
 					})
 			},

--
Gitblit v1.9.3