From 2eccba94b3dd99195c5cafffa0744df90f1ab814 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 19 五月 2025 16:20:15 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/pda-master into devlop

---
 pages/rece/standard.vue |   44 +++++++++++++++++++++++++++++++-------------
 1 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/pages/rece/standard.vue b/pages/rece/standard.vue
index 394e489..3d6731d 100644
--- a/pages/rece/standard.vue
+++ b/pages/rece/standard.vue
@@ -1,10 +1,10 @@
 <template>
 	<view class="has-foot">
 		<form>
-			<view class="cu-form-group margin-top" v-show="!isconfirm">
+			<view class="cu-form-group" v-show="!isconfirm">
 				<view class="title">鐗╂枡鏍囩</view>
-				<input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode" focus></input>
-				<text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
+				<input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode" @input="search()" focus></input>
+				<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
 				<text class='cuIcon-search text-blue' @click="search"></text>
 			</view>
 
@@ -52,9 +52,6 @@
 						<text class="text-black">瀹炴椂搴撳瓨: <text class="text-grey ">{{item.stockQty}}</text></text>
 					</view>
 				</view>
-
-
-
 				<view class="cu-item">
 					<view class="content">
 						<text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
@@ -63,7 +60,6 @@
 						<text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
 					</view>
 				</view>
-
 				<view class="cu-item">
 					<view class="content">
 						<text class="text-black">閲囪喘鍗曚綅:<text class="text-grey ">{{item.purUnit}}</text></text>
@@ -72,15 +68,19 @@
 						<text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
 					</view>
 				</view>
-
 				<view class="cu-item">
 					<view class="content">
 						<text class="text-blue">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{item.anfme}}</text></text>
 					</view>
+					<view class="content">
+						<text class="text-black">宸叉敹鏁伴噺:<text class="text-grey ">{{item.qty}}</text></text>
+					</view>
+				</view>
+				<view class="cu-item">
 					<view class="content" v-if="!isconfirm">
 						<view class="cu-form-group padding-lr-0">
 							<view class="title text-blue">鏀惰揣鏁伴噺:</view>
-							<input type="number" placeholder="璇疯緭鍏ユ敹璐ф暟閲�" v-model="item.receiptQty"></input>
+							<uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step='1'></uni-number-box>
 						</view>
 					</view>
 					<view class="content" v-else>
@@ -156,7 +156,7 @@
 
 		<view class="cu-bar btn-group foot" v-show="isconfirm">
 			<button class="cu-btn text-blue line-blue shadow" @click="prev">涓婁竴姝�</button>
-			<button class="cu-btn bg-blue shadow-blur" @click="confirm">鎻愪氦鏀惰揣</button>
+			<button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鎻愪氦鏀惰揣</button>
 		</view>
 
 	</view>
@@ -179,7 +179,9 @@
 				whAreaId: '',
 				list: [],
 				range: [],
-				isconfirm: false
+				isconfirm: false,
+				repeatClick: false,
+				max: 99999999
 			}
 		},
 		computed: {
@@ -199,7 +201,22 @@
 					msg
 				} = await request('/orders/' + this.barcode, {}, "get")
 				if (code === 200) {
+					if (Object.keys(data).length === 0) {
+						uni.showToast({
+							title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
+							icon: "none",
+							position: 'top'
+						})
+					}
 					this.list.push(...data)
+
+				} else if (code == 401) {
+					setTimeout(() => {
+						uni.removeStorageSync('token');
+						uni.reLaunch({
+							url: "/pages/login/login"
+						});
+					}, 1000);
 				} else {
 					uni.showToast({
 						title: msg,
@@ -211,7 +228,7 @@
 
 			},
 			clearCode() {
-				this.asncode = ''
+				this.barcode = ''
 			},
 			remove(index) {
 				this.list.splice(index, 1);
@@ -249,6 +266,7 @@
 						title: '璇烽�夋嫨鏀惰揣鍖�'
 					})
 				} else {
+					this.repeatClick = true
 					const {
 						code,
 						data,
@@ -271,7 +289,7 @@
 							position: 'top'
 						})
 					}
-
+					this.repeatClick = false
 				}
 			},
 			async getRece() {

--
Gitblit v1.9.1