From b5390b1f1254d1a286a78c3d22da0366b3a27096 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 08 十二月 2025 10:12:07 +0800
Subject: [PATCH] #

---
 pages/order/orderPakin3.vue |   91 +++++++++++++++++++++++++++++++++------------
 1 files changed, 67 insertions(+), 24 deletions(-)

diff --git a/pages/order/orderPakin3.vue b/pages/order/orderPakin3.vue
index f61b4d6..6e2cb76 100644
--- a/pages/order/orderPakin3.vue
+++ b/pages/order/orderPakin3.vue
@@ -7,6 +7,16 @@
 				<view style="width: 80px;display: flex;align-items: center;justify-content: center;"><button size="mini"
 						type="primary" @click="findOrder()">妫�绱�</button></view>
 			</view> -->
+			
+			<view class="item">
+				<view class="code-decs">鎵樼洏鐮�:</view>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
+					@input="barcodeInput()">
+			</view>
+			<view class="item">
+				<view class="code-decs">绔欑偣鍙�:</view>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="rsta" :focus="rstaFocus" @input="rstaInput()">
+			</view>
 			<view class="item">
 				<view class="code-decs">璁㈠崟鍙�:</view>
 				<view style="flex: 1;">
@@ -17,15 +27,10 @@
 					<uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons>
 				</view>
 			</view>
-			<view class="item">
-				<view class="code-decs">鎵樼洏鐮�:</view>
-				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
-					@input="barcodeInput()">
-			</view>
-			<view class="item">
+			<!-- <view class="item">
 				<view class="code-decs">浠撳簱:</view>
 				<uni-combox :candidates="floorList" placeholder="璇烽�夋嫨浠撳簱" v-model="floor"></uni-combox>
-			</view>
+			</view> -->
 			<!-- <view class="item">
 				<view class="code-decs">鐗╂枡鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
@@ -52,14 +57,14 @@
 							<uni-tag :text="item.matnr" type="primary"></uni-tag>
 						</view>
 					</view>
-					<view class="list-left-item">
+					<!-- <view class="list-left-item">
 						<view class="desc">鍝佸悕锛�</view>
 						<view class="left-item">{{item.maktx}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">瑙勬牸锛�</view>
 						<view class="left-item">{{item.specs}}</view>
-					</view>
+					</view> -->
 					<view class="list-left-item">
 						<view class="desc">鎵瑰彿锛�</view>
 						<view class="left-item">
@@ -76,7 +81,7 @@
 						<view class="left-item">鏈鍏ュ簱鏁伴噺锛歿{item.enterCount}}</view>
 					</view>
 					<view class="list-left-item">
-						<view class="left-item">宸插叆/鎬绘暟锛歿{item.qty}} / {{item.total}}</view>
+						<view class="left-item">宸插叆/鎬绘暟锛歿{item.workQty}} / {{item.total}}</view>
 					</view>
 				</view>
 				<view class="list-right">
@@ -187,14 +192,16 @@
 				messageText: '',
 				title: '',
 				content: '',
-				orderNoFocus: true,
-				barcodeFocus: false,
+				orderNoFocus: false,
+				barcodeFocus: true,
 				matFocus: false,
 				matData: '',
 				removeNum: 0,
 				floorList: [],
 				floor: '',
-				enterCount: 0
+				enterCount: 0,
+				rsta: '',
+				rstaFocus: false,
 			}
 		},
 		onLoad() {
@@ -290,7 +297,7 @@
 						if (res.code === 200) {
 							for (let k in res.data) {
 								res.data[k]['total'] = res.data[k].anfme
-								res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].qty
+								res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].workQty
 							}
 							_this.dataList = res.data
 						}
@@ -308,6 +315,25 @@
 				setTimeout(() => {
 					that.orderNo = '';
 					that.orderNoFocus = true;
+				}, 100);
+			},
+			// barcode input 浜嬩欢
+			rstaInput() {
+				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+				setTimeout(() => {
+					var len = this.rsta.length
+					this.barcodeFocus1()
+				}, 200)
+			},
+			// 鎵弿瀹岀珯鐐瑰悗鍏夋爣璺宠浆鍒拌鍗曞彿
+			barcodeFocus1() {
+				this.focus = false;
+				this.barcodeFocus = false;
+				this.orderNoFocus = false;
+				this.rstaFocus = false;
+				setTimeout(() => {
+					this.orderNo = '';
+					this.orderNoFocus = true;
 				}, 100);
 			},
 			orderNoInput() {
@@ -343,12 +369,15 @@
 					that.barcodeFocus = true;
 				}, 100);
 			},
-			// 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
+			// 绔欑偣鍏夋爣娓呯┖閲嶇疆
 			focuss() {
 				this.focus = false;
+				this.barcodeFocus = false;
+				this.orderNoFocus = false;
+				this.rstaFocus = false;
 				setTimeout(() => {
-					this.matnr = '';
-					this.matFocus = true;
+					this.rsta = '';
+					this.rstaFocus = true;
 				}, 100);
 			},
 			// 鎼滅储鐗╂枡
@@ -599,11 +628,6 @@
 					this.messageToggle('error')
 					return;
 				}
-				if (that.floor === '') {
-					this.messageText = "璇烽�夋嫨浠撳簱"
-					this.messageToggle('error')
-					return;
-				}
 				if (that.dataList.length === 0) {
 					this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
 					this.messageToggle('error')
@@ -626,8 +650,10 @@
 						barcode: that.barcode,
 						combMats: that.dataList,
 						ck: that.floor,
-						beBatch : 0
-					}),
+						rsta: that.rsta,
+						type: true,
+						beBatch : 1,
+					}),	
 					method: 'POST',
 					header: {
 						'token': uni.getStorageSync('token')
@@ -641,6 +667,7 @@
 							const innerAudioContext = uni.createInnerAudioContext();
 							innerAudioContext.src = '/static/music/pakinOk.mp3';
 							innerAudioContext.play()
+							that.rsta = '';
 						} else if (res.code == 403) {
 							that.messageText = res.msg
 							that.messageToggle('error')
@@ -748,4 +775,20 @@
 		text-align: center;
 		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
 	}
+	
+	.list {
+		font-size: 20px;
+		font-weight: 600;
+	}
+	
+	.list-left-item .desc,
+	.list-left-item .left-item {
+		font-size: 20px;
+		font-weight: 600;
+	}
+	
+	.list-left-item uni-tag {
+		font-size: 20px;
+		font-weight: 600;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1