From 424d5b1cb1779166d6d07a03d01dbaa4abc1ef9e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 06 五月 2023 08:10:29 +0800
Subject: [PATCH] #

---
 pages/order/orderPutOn.vue |   56 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/pages/order/orderPutOn.vue b/pages/order/orderPutOn.vue
index 3a17edd..49ac8f3 100644
--- a/pages/order/orderPutOn.vue
+++ b/pages/order/orderPutOn.vue
@@ -7,12 +7,12 @@
 					@input="orderInput()" disabled>
 			</view> -->
 			<view class="item">
-				<view class="code-decs">鎵樼洏鐮�:</view>
+				<view class="code-decs">搴撲綅鍙�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
 					@confirm="barcodeInput()">
 			</view>
 			<view class="item">
-				<view class="code-decs">搴撲綅鍙�:</view>
+				<view class="code-decs">鐗╂枡鍙�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
 				<view class="item-right">
 					<button></button>
@@ -71,7 +71,7 @@
 		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
 		<view class="buttom">
 			<button size="mini" @click="reset('warn')">閲嶇疆</button>
-			<button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+			<button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
 		</view>
 		<!-- 寮圭獥 -->
 		<!-- 淇敼鏁伴噺 -->
@@ -240,28 +240,34 @@
 				var len = this.dataList.length
 				var add = true ,sameItem = false
 				for (var i = 0; i < len; i++) {
-					if (mat.matnr == this.dataList[i].matnr) {
-						for (var j = 0; j < len; j++) {
-							if (mat.batch == this.dataList[j].batch) {
-								sameItem = true
+					if (mat.orderNo != this.dataList[i].orderNo) {
+						add = true
+						break;
+					} else {
+						if (mat.matnr == this.dataList[i].matnr) {
+							for (var j = 0; j < len; j++) {
+								if (mat.batch == this.dataList[j].batch) {
+									sameItem = true
+								}
 							}
-						}
-						// 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿  鏂板姞鍒楄〃
-						if (mat.batch != this.dataList[i].batch) {
-							this.$forceUpdate() // 寮哄埗鍒锋柊
-							if (sameItem) {
-								add = false
+							// 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿  鏂板姞鍒楄〃
+							if (mat.batch != this.dataList[i].batch) {
+								this.$forceUpdate() // 寮哄埗鍒锋柊
+								if (sameItem) {
+									add = false
+								} else {
+									add = true
+								}
+								
 							} else {
-								add = true
+								// 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
+								this.dataList[i].anfme += mat.anfme
+								this.$forceUpdate() // 寮哄埗鍒锋柊
+								add = false
 							}
-							
-						} else {
-							// 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
-							this.dataList[i].anfme += mat.anfme
-							this.$forceUpdate() // 寮哄埗鍒锋柊
-							add = false
 						}
 					}
+					
 				}
 				if (add) {
 					this.dataList.unshift(mat)
@@ -294,9 +300,9 @@
 					}
 				}
 				uni.request({
-					url: that.baseUrl + '/mobile/comb/auth',
+					url: that.baseUrl + '/mobile/manDetl/in',
 					data: JSON.stringify({
-						locno: that.barcode,
+						locNo: that.barcode,
 						combMats: that.dataList
 					}),
 					method: 'POST',
@@ -381,6 +387,12 @@
 			changeValue(value) {
 				this.count = value
 			},
+			// 娓呯┖
+			resst() {
+				this.dataList = []
+				this.barcode = ''
+				this.barcodeFocuss()
+			},
 		}
 	}
 </script>

--
Gitblit v1.9.1