From 6680177b03517192349b20ef287875d0384b0cca Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 03 一月 2025 16:37:00 +0800
Subject: [PATCH] #

---
 pages/pakin/pakin.vue |   59 ++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index f5b5a30..f8808aa 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -6,6 +6,7 @@
 				<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="matnr" :focus="matFocus" @input="findMat()">
@@ -14,6 +15,11 @@
 					<text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
 					<uni-icons type="right" color="#c1c1c1"></uni-icons>
 				</view>
+			</view>
+			<view class="item">
+				<view class="code-decs">澶囨敞:</view>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locname" :focus="barcodeFocus"
+					>
 			</view>
 		</view>
 		<view class="mat-list-title">
@@ -47,11 +53,15 @@
 						</view>
 					</view>
 					<view class="list-left-item">
+						<view class="desc">鍖呰鍙凤細</view>
+						<view class="left-item">{{item.itemNum}}</view>
+					</view>					
+					<!-- <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>
@@ -82,14 +92,19 @@
 								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>
 					<view class="popup-item">
+						<view class="popup-item-left">鍖呰鍙�:</view>
+						<view class="popup-item-right"><input type="text" v-model="itemNum"></view>
+					</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;">
@@ -156,6 +171,8 @@
 				matFocus: false,
 				matData: '',
 				removeNum: 0,
+				locname:'',
+				itemNum:''
 			}
 		},
 		onLoad() {
@@ -287,13 +304,13 @@
 				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
-							}
-						}
+						// for (var j = 0; j < len; j++) {
+						// 	if (mat.batch == this.dataList[j].batch) {
+						// 		sameItem = true
+						// 	}
+						// }
 						// 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿  鏂板姞鍒楄〃
-						if (mat.batch != this.dataList[i].batch) {
+						if (mat.batch != this.dataList[i].batch || mat.itemNum != this.dataList[i].itemNum) {
 							this.$forceUpdate() // 寮哄埗鍒锋柊
 							if (sameItem) {
 								add = false
@@ -317,7 +334,8 @@
 			revise(item, i) {
 				this.matnr = this.dataList[i].matnr
 				this.count = this.dataList[i].anfme
-				this.batch = this.dataList[i].batch
+				this.batch = this.dataList[i].batch				
+				this.itemNum = this.dataList[i].itemNum
 				this.weight = this.dataList[i].weight
 				this.rowNum = i
 				this.eject()
@@ -347,6 +365,8 @@
 			reviseConfirm() {
 				this.dataList[this.rowNum].anfme = this.count
 				this.dataList[this.rowNum].batch = this.batch
+				this.dataList[this.rowNum].units = this.units
+				this.dataList[this.rowNum].memo = this.memo
 				this.dataList[this.rowNum].weight = this.weight
 				this.matnr = ''
 				this.messageText = "淇敼鎴愬姛"
@@ -392,6 +412,7 @@
 					url: that.baseUrl + '/mobile/comb/auth',
 					data: JSON.stringify({
 						barcode: that.barcode,
+						locname: that.locname,
 						combMats: that.dataList
 					}),
 					method: 'POST',
@@ -431,6 +452,9 @@
 			// 纭閲嶇疆
 			resetConfirm() {
 				this.dataList = []
+				this.barcode = ''
+				this.locname = ''
+				this.matnr = ''
 				this.messageText = "閲嶇疆瀹屾垚"
 				this.messageToggle('success')
 			},
@@ -442,6 +466,7 @@
 			resst() {
 				this.dataList = []
 				this.barcode = ''
+				this.locname = ''
 				this.barcodeFocuss()
 			},
 		}
@@ -450,6 +475,10 @@
 
 <style>
 	@import url('../../static/css/wms.css/wms.css');
+	
+	.list:first-child {
+		margin-top: 300rpx;
+	}
 
 	.code {
 		width: 100%;
@@ -462,7 +491,7 @@
 	.item {
 		display: flex;
 		align-items: center;
-		height: 100rpx;
+		height: 70rpx;
 		margin-left: 20rpx;
 		border-bottom: 1px solid #DCDFE6;
 	}
@@ -489,12 +518,12 @@
 	}
 
 	.mat-list-title {
-		height: 80rpx;
-		line-height: 80rpx;
+		height: 60rpx;
+		line-height: 60rpx;
 		width: 100%;
 		background-color: white;
 		position: fixed;
-		margin-top: 200rpx;
+		margin-top: 210rpx;
 		z-index: 9;
 		/* border-top: 1px solid #DCDFE6; */
 		text-align: center;

--
Gitblit v1.9.1