From 32b10def2b0944c4afbe4d89e55261c39a690f1d Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 17 七月 2025 13:40:09 +0800
Subject: [PATCH] #

---
 pages/listing/matnrPalletising.vue |  197 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 132 insertions(+), 65 deletions(-)

diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 8d6a6d3..50618e4 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -46,20 +46,18 @@
 					</view>
 					<view class="cu-item">
 						<view class="content">
+							<text class="text-black">鐗╂枡缂栫爜:</text>
+							<text class="text-grey ">{{item.maktx}}</text>
+						</view>
+					</view>
+					<view class="cu-item">
+						<view class="content">
 							<text class="text-black">ASN:</text>
 						</view>
 						<view class="action">
 							<text class="text-grey ">{{item.asnCode}}</text>
 						</view>
-					</view>
-					<view class="cu-item">
-						<view class="content">
-							<text class="text-black">鐗╂枡鏉$爜:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey ">{{item.trackCode}}</text>
-						</view>
-					</view>
+					</view>					
 					<view class="cu-item">
 						<view class="content">
 							<text class="text-black">渚涘簲鍟嗘壒娆�:</text>
@@ -68,12 +66,9 @@
 							<text class="text-grey ">{{item.splrBatch}}</text>
 						</view>
 					</view>
-					<view class="cu-item">
+					<view class="cu-item">						
 						<view class="content">
-							<text class="text-black">搴撳瓨鎵规:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey ">{{item.batch}}</text>
+							<text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
 						</view>
 					</view>
 					<!-- <view class="cu-item">
@@ -100,7 +95,7 @@
 					<view class="cu-item">
 						<view class="content">
 							<text class="text-black">鍙粍鐩樻暟閲�: <text
-									class="text-grey ">{{item.anfme - item.workQty}}</text></text>
+									class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
 						</view>
 						
 					</view>
@@ -110,8 +105,8 @@
 								<view class="title text-blue"><text
 										class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺:
 								</view>
-								<uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
-									:step='1'></uni-number-box>
+								<uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="2" :step="0.01" v-model="item.receiptQty"
+									></uni-number-box>
 							</view>
 						</view>
 					</view>
@@ -163,56 +158,85 @@
 				find ? this.scrollTo() : this.getDet();
 
 			},
-			async getDet() {
+			getDet() {
 				let that = this;
-				const {
-					code,
-					data,
-					msg
-				} = await request('/asnOrderItem/trackCode', {
-					matnrCode: that.matnrCode,
-					asnCode: that.asnCode
-				}, "post")
-				if (code === 200) {
-					data.map(item => {
-						item.receiptQty = 0;
-						item.selected = false;
-					})
-					// for (var i = 0; i < data.length; i++) {
-					// 	data[i].receiptQty =1;
-					// 	data[i].selected = false;							
-					// }
-					if(data !== [] || data !== null){					
-					uni.navigateTo({
-							url: "../listing/itemSelect",
-							success: function(res) {
-								// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
-								res.eventChannel.emit('data', {
-									item: data
-								})
-							},
-							events: {
-								// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
-								backData: function(data) {									
-									that.showBackData(data.data)
-								},
-							},
+				uni.navigateTo({
+					url: "../listing/itemSelect",
+					success: function(res) {
+						// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+						res.eventChannel.emit('data', {
+							matnrCode: that.matnrCode,
+							asnCode: that.asnCode
+						})
+					},
+					events: {
+						// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
+						backData: function(data) {									
+							that.showBackData(data.data)
+						},
+					},
+				
+				
+				});
+			},
+			// async getDet() {
+			// 	let that = this;
+			// 	const {
+			// 		code,
+			// 		data,
+			// 		msg
+			// 	} = await request('/asnOrderItem/trackCode', {
+			// 		matnrCode: that.matnrCode,
+			// 		asnCode: that.asnCode
+			// 	}, "post")
+			// 	if (code === 200) {
+			// 		data.map(item => {
+			// 			item.receiptQty = 0;
+			// 			item.selected = false;
+			// 		})
+			// 		// for (var i = 0; i < data.length; i++) {
+			// 		// 	data[i].receiptQty =1;
+			// 		// 	data[i].selected = false;							
+			// 		// }
+			// 		if(data !== [] || data !== null){					
+			// 		uni.navigateTo({
+			// 				url: "../listing/itemSelect",
+			// 				success: function(res) {
+			// 					// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+			// 					res.eventChannel.emit('data', {
+			// 						item: data
+			// 					})
+			// 				},
+			// 				events: {
+			// 					// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
+			// 					backData: function(data) {									
+			// 						that.showBackData(data.data)
+			// 					},
+			// 				},
 						
 						
-						});
+			// 			});
 						
-					}
+			// 		}
 						
-					// this.list = data
-				} else {
+			// 		// this.list = data
+			// 	} else {
+			// 		uni.showToast({
+			// 			title: msg,
+			// 			icon: "none",
+			// 			position: 'top'
+			// 		})
+			// 	}
+			// },
+			async getList() {
+				if(this.container === '' || this.container === null){
 					uni.showToast({
-						title: msg,
+						title: "瀹瑰櫒鐮佷负绌�",
 						icon: "none",
 						position: 'top'
 					})
+					return ;
 				}
-			},
-			async getList() {
 				const {
 					code,
 					data,
@@ -221,7 +245,11 @@
 					barcode: this.container
 				})
 				if (code === 200) {
-					this.list = data
+					uni.showToast({
+						title: msg,
+						icon: "success",
+						position: 'top'
+					})
 				} else {
 					uni.showToast({
 						title: msg,
@@ -230,12 +258,35 @@
 					})
 				}
 			},
-			showBackData(data){
-				this.list = data.map(item => {					
-					return {
-						...item												
-					};
-				});
+			showBackData(data){				
+				let status ;
+				data.map(item => {					
+					this.list.push(item)
+				})	
+				let oldLength = this.list.length
+				this.list = this.list.filter((item, index, self) =>
+					self.findIndex(i => (
+						i.id === item.id // 鏍规嵁id鍘婚噸
+					)) === index && item.isptResult === self[0].isptResult
+				);
+				let newLength = this.list.length
+				
+				if(oldLength > newLength){	
+					this.showMsg("鏂版槑缁嗚杩囨护锛岃妫�鏌ョ姸鎬�")
+					
+				}
+								
+			},
+			showMsg(msg){				
+				setTimeout(function() {
+				 uni.showToast({
+				 	icon: "none",
+				 	position: 'top',
+				 	title: msg,
+				 	duration:2000,				 	
+				 })
+				}, 200);
+				
 			},
 			scrollTo() {
 				const ref = this.$refs[`${this.barcode}ref`][0];
@@ -265,7 +316,23 @@
 				this.isconfirm = false
 			},
 			async confirm() {
-				this.repeatClick = true
+				if(this.container === '' || this.container === null){
+					uni.showToast({
+						title: "瀹瑰櫒鐮佷负绌�",
+						icon: "none",
+						position: 'top'
+					})
+					return ;
+				}
+				if(this.list.length ===0 || this.list === null){
+					uni.showToast({
+						title: "鏈坊鍔犳槑缁�",
+						icon: "none",
+						position: 'top'
+					})
+					return ;
+				}
+				this.repeatClick = true				
 				const newArr = this.list.map(item => {
 					
 					return {

--
Gitblit v1.9.1