From 18d2f40bbf40469b033de6f07ca8a8e3bc191132 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期六, 26 四月 2025 19:21:40 +0800
Subject: [PATCH] 优化代码

---
 项目代码/芜湖三一PDA/pages/stash/InEmpty.vue |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/InEmpty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/InEmpty.vue"
index 6401c51..401fa07 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/InEmpty.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\350\212\234\346\271\226\344\270\211\344\270\200PDA/pages/stash/InEmpty.vue"
@@ -2,8 +2,12 @@
 	<view>
 		<view class="itemstyle">
 			<uni-forms label-width="180">
-				<uni-forms-item label="鎵樼洏鏉$爜:">
-					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="barcode"
+				<uni-forms-item label="鍦版爣鐮�:">
+					<uni-easyinput type="text" placeholder="璇锋壂鎻忓湴鏍囩爜" ref='midInput' :focus="!focus" v-model="Station"
+						@input="StationInput" />
+				</uni-forms-item>
+				<uni-forms-item label="鎵樼洏鐮�:">
+					<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樼爜" ref='midInput' :focus="focus1" v-model="barcode"
 						@input="barcodeInput" />
 				</uni-forms-item>
 				<uni-forms-item>
@@ -21,7 +25,9 @@
 		data() {
 			return {
 				focus: false,
+				focus1: false,
 				barcode: "",
+				Station: "",
 				address: "",
 				WarehouseId: ""
 			}
@@ -39,14 +45,29 @@
 				innerAudioContext.src = src; // '../../static/success.mp3';
 				innerAudioContext.play();
 			},
-			barcodeInput() {
+			// barcodeInput() {
+			// 	this.$nextTick(function(x) {
+			// 		if (this.barcode.length > 0) {
+			// 			this.focus = true;
+			// 		}
+			// 	})
+			// },
+			StationInput() {
 				this.$nextTick(function(x) {
-					if (this.barcode.length > 0) {
+					if (this.Station.length > 0) {
 						this.focus = true;
+						this.focus1=true;
 					}
 				})
 			},
 			InEmpty() {
+				if (this.Station == "") {
+					this.$refs.uToast.show({
+						title: "璇锋壂鎻忓湴鏍囩爜",
+						type: 'error'
+					})
+					return;
+				}
 				if (this.barcode == "") {
 					this.$refs.uToast.show({
 						title: "璇锋壂鎻忔墭鐩樼爜",
@@ -54,14 +75,17 @@
 					})
 					return;
 				}
-				this.$u.post('/api/PDA/InEmpty?barcode=' + this.barcode).then(
+				this.$u.post('/api/PDA/InEmpty?barcode=' + this.barcode + '&station=' + this.Station).then(
 					res => {
 						if (res.status) {
 							this.$refs.uToast.show({
-								title: "鎴愬姛",
+								title: "绌烘墭鍏ュ簱鐢宠鎴愬姛",
 								type: "success"
 							})
+							this.Station = "";
 							this.barcode = "";
+							this.focus = false;
+							this.focus1=false;
 						} else {
 							this.$refs.uToast.show({
 								title: res.message,

--
Gitblit v1.9.3