From b38d60e4cc25c1a6f809c9652f87071d92179f2f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 24 九月 2025 15:25:20 +0800
Subject: [PATCH] pda新增修改

---
 pages/AGV/AGVPakin.vue |   71 +++++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 21 deletions(-)

diff --git a/pages/AGV/AGVPakin.vue b/pages/AGV/AGVPakin.vue
index ba29273..f4bb153 100644
--- a/pages/AGV/AGVPakin.vue
+++ b/pages/AGV/AGVPakin.vue
@@ -2,6 +2,11 @@
 	<view>
 		<view class="code">
 			<view class="item">
+				<view class="code-decs">璁㈠崟鍙�:</view>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus"
+					@input="orderNoInput()">
+			</view>
+			<view class="item">
 				<view class="code-decs">鎵樼洏鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
 					@input="barcodeInput()">
@@ -11,7 +16,7 @@
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
 				<view class="item-right">
 					<button></button>
-					<text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
+					<!-- <text style="text-align: right;color: #409EFF;" @click="findMat()">鎻愬彇+</text> -->
 					<uni-icons type="right" color="#c1c1c1"></uni-icons>
 				</view>
 			</view>
@@ -27,7 +32,13 @@
 						<view class="left-item">{{i + 1}}</view>
 					</view>
 					<view class="list-left-item">
-						<view class="desc">缂栫爜锛�</view>
+						<view class="desc">璁㈠崟鍙凤細</view>
+						<view class="left-item">
+							<uni-tag :text="item.orderNo" type="primary"></uni-tag>
+						</view>
+					</view>
+					<view class="list-left-item">
+						<view class="desc">鏂欏彿锛�</view>
 						<view class="left-item">
 							<uni-tag :text="item.matnr" type="primary"></uni-tag>
 						</view>
@@ -46,12 +57,12 @@
 							<uni-tag :text="item.batch" type="warning"></uni-tag>
 						</view>
 					</view>
-					<view class="list-left-item">
+					<!-- <view class="list-left-item">
 						<view class="desc">閲嶉噺锛�</view>
 						<view class="left-item">
 							<uni-tag :text="item.weight" type="warning"></uni-tag>
 						</view>
-					</view>
+					</view> -->
 					<view class="list-left-item">
 						<view class="desc">鏁伴噺锛�</view>
 						<view class="left-item">{{item.anfme}}</view>
@@ -76,20 +87,20 @@
 					<!-- 鏍囬 -->
 					<view class="title">淇敼</view>
 					<view class="popup-item">
-						<view class="popup-item-left">缂栫爜:</view>
+						<view class="popup-item-left">鏂欏彿:</view>
 						<view class="popup-item-right">
 							<input type="text" v-model="matnr" disabled="true"
 								style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
 						</view>
 					</view>
-					<!-- <view class="popup-item">
+					<view class="popup-item">
 						<view class="popup-item-left">鎵瑰彿:</view>
 						<view class="popup-item-right"><input type="text" v-model="batch"></view>
-					</view> -->
-					<view class="popup-item">
+					</view>
+					<!-- <view class="popup-item">
 						<view class="popup-item-left">閲嶉噺:</view>
 						<view class="popup-item-right"><input type="text" v-model="weight"></view>
-					</view>
+					</view> -->
 					<view class="popup-item">
 						<view class="popup-item-left">鏁伴噺:</view>
 						<view class="popup-item-right" style="border: none;justify-content: center;">
@@ -141,6 +152,7 @@
 				baseUrl: '',
 				token: '',
 				barcode: '',
+				orderNo: null,
 				dataList: [],
 				count: 0,
 				rowNum: '',
@@ -154,6 +166,7 @@
 				content: '',
 				barcodeFocus: true,
 				matFocus: false,
+				orderNoFocus: false,
 				matData: '',
 				removeNum: 0,
 			}
@@ -171,6 +184,13 @@
 				this.$refs.message.open()
 			},
 			// barcode input 浜嬩欢
+			orderNoInput() {
+				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+				setTimeout(() => {
+					var len = this.orderNo.length
+					// this.barcodeFocuss()
+				}, 200)
+			},
 			barcodeInput() {
 				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
 				setTimeout(() => {
@@ -208,8 +228,10 @@
 			findMat() {
 				let that = this
 				uni.request({
-					url: that.baseUrl + '/mat/auth',
+					url: that.baseUrl + '/mobile/scan/order/mats',
+					method: 'POST',
 					data: {
+						orderNo: that.orderNo,
 						matnr: that.matnr
 					},
 					header: {
@@ -237,9 +259,9 @@
 									},
 								},
 							});
-						} else if (res.code == 403) {
+						} else if (result.code == 403) {
 							uni.showToast({
-								title: res.msg,
+								title: result.msg,
 								icon: "none",
 								position: 'top'
 							})
@@ -250,24 +272,28 @@
 							}, 1000);
 						} else {
 							uni.showToast({
-								title: res.msg,
+								title: result.msg,
 								icon: "none",
 								position: 'top'
 							})
 						}
-
 					}
 				});
-
 			},
 			selectMat() {
 				let that = this
+				if (that.orderNo == null || that.orderNo == undefined ) {
+					that.messageText = '璇峰~鍐欒鍗曠紪鍙凤紒锛�'
+					that.messageToggle('error')
+					return;
+				}
+				
 				uni.navigateTo({
 					url: "../mat/matQuery",
 					success: function(res) {
 						// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
-						res.eventChannel.emit('commonUrl', {
-							commonUrl: ''
+						res.eventChannel.emit('orderNo', {
+							orderNo: that.orderNo
 						})
 					},
 					events: {
@@ -277,8 +303,6 @@
 							that.findMat(that.matnr)
 						},
 					},
-
-
 				});
 				that.matnr = ''
 			},
@@ -389,8 +413,9 @@
 					}
 				}
 				uni.request({
-					url: that.baseUrl + '/agvMobile/comb/auth',
+					url: that.baseUrl + '/mobile/comb/auth',
 					data: JSON.stringify({
+						orderNo: that.orderNo,
 						barcode: that.barcode,
 						combMats: that.dataList
 					}),
@@ -431,6 +456,7 @@
 			// 纭閲嶇疆
 			resetConfirm() {
 				this.dataList = []
+				this.barcode = ''
 				this.messageText = "閲嶇疆瀹屾垚"
 				this.messageToggle('success')
 			},
@@ -451,6 +477,9 @@
 <style>
 	@import url('../../static/css/wms.css/wms.css');
 
+	.list:first-child {
+		margin-top: 460rpx;
+	}
 	.code {
 		width: 100%;
 		position: fixed;
@@ -494,7 +523,7 @@
 		width: 100%;
 		background-color: white;
 		position: fixed;
-		margin-top: 200rpx;
+		margin-top: 300rpx;
 		z-index: 9;
 		/* border-top: 1px solid #DCDFE6; */
 		text-align: center;

--
Gitblit v1.9.1