From f1bf3ef09713182d434e22dfd8623ea73e02d6d3 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 01 四月 2026 15:33:01 +0800
Subject: [PATCH] 1
---
吉安PDA/pages/stash/Syncretism.vue | 48 ++++++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 18 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 fb87d59..cf5f238 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="!focus" v-model="soussAddress"
- @input="barcodeInput" />
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="sourceFocus"
+ v-model="soussAddress" @input="barcodeInput" />
</uni-forms-item>
<uni-forms-item label="鐩爣鎵樼洏鏉$爜:">
- <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="targetAddress"
- @input="barcodeInput" />
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="targetFocus"
+ v-model="targetAddress" @input="barcodeInput" />
</uni-forms-item>
<uni-forms-item>
<button @click="AGVTasks" type="primary" size="default" style="margin-top: 2%;">纭瀹屾垚</button>
@@ -20,28 +20,29 @@
</template>
<script>
- const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
return {
- focus: false,
+ sourceFocus: true, // 榛樿鍘熷鎵樼洏杈撳叆妗嗚幏寰楃劍鐐�
+ targetFocus: false, // 鐩爣鎵樼洏杈撳叆妗嗕笉鑾峰緱鐒︾偣
soussAddress: "",
targetAddress: "",
- warehouseId: "",
+ warehouseId: "",
}
},
- onShow() {},
onLoad(res) {
- this.focus = false;
- this.warehouseId=res.warehouseId;
+ this.warehouseId = res.warehouseId;
},
methods: {
- barcodeInput() {
- this.$nextTick(function(x) {
- if (this.barcode.length > 0) {
- this.focus = true;
+ barcodeInput(type) {
+ if (type != '') {
+ if (this.soussAddress == "") {
+ setTimeout(() => {
+ this.sourceFocus = false;
+ this.targetFocus = true;
+ }, 100);
}
- })
+ }
},
AGVTasks() {
if (this.soussAddress == "") {
@@ -49,6 +50,8 @@
title: "璇锋壂鎻忓師濮嬫墭鐩樻潯鐮�",
type: 'error'
})
+ this.sourceFocus = true;
+ this.targetFocus = false;
return;
}
if (this.targetAddress == "") {
@@ -56,28 +59,37 @@
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.barcode = "";
+ this.soussAddress = "";
+ this.targetAddress = "";
+ this.sourceFocus = true;
+ this.targetFocus = false;
} else {
this.$refs.uToast.show({
title: res.message,
type: "error"
})
+
+ this.sourceFocus = true;
+ this.targetFocus = false;
}
})
},
--
Gitblit v1.9.3