From 12966b4ef9d35b25760fcd4fcdd569bef9aa8547 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 30 七月 2025 14:10:30 +0800
Subject: [PATCH] #

---
 pages/basics/pakin.vue |   61 ++++++++++++++++++++++--------
 1 files changed, 44 insertions(+), 17 deletions(-)

diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue
index e1a916a..acfd335 100644
--- a/pages/basics/pakin.vue
+++ b/pages/basics/pakin.vue
@@ -22,14 +22,14 @@
 					<view class="title-text"><text>妫�绱㈠晢鍝�</text></view>
 				</view>
 				<view class="square-content">
-					<view class="content-input-btn">
+					<view class="content-input">
 						<input v-model="matnr" type="text" placeholder="鎵爜 / 杈撳叆" @input="findMat()"
 						:focus="focus" placeholder-style="line-height:  85rpx;">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
 					</view>
-					<view class="content-btn">
+					<!-- <view class="content-btn">
 						<button class="cu-btn bg-blue pda-btn" @click="selectMat()">+鎻愬彇</button>
-					</view>
+					</view> -->
 				</view>
 			</view>
 			
@@ -52,11 +52,20 @@
 						<!-- <view>
 							<checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
 						</view> -->
+						<view ><text style="width: 400rpx;">鍗曟嵁锛歿{item.orderNo}}</text></view>
 						<view class="matnr"><text style="width: 400rpx;">缂栫爜锛歿{item.matnr}}</text></view>
 						<view><text style="width: 400rpx;">鍝佸悕锛歿{item.maktx}}</text></view>
-						<view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view>
+						<view><text style="width: 400rpx;">瑙勬牸锛歿{item.specs}}</text></view>
+					<!-- 	<view><text style="width: 400rpx;">鍨嬪彿锛歿{item.model}}</text></view> -->
+						<view><text style="width: 400rpx;">鎵规锛歿{item.batch}}</text></view>
+						<view style="width: 500rpx;"><text>鍨嬪彿锛歿{item.model}}</text></view>
+						<view><text style="width: 400rpx;">搴撳瓨鐘舵�侊細{{item.cstateid$}}</text></view>
+						<!-- <view><text style="width: 400rpx;">澶囨敞锛歿{item.memo}}</text></view> -->
 						<view>
-							<text style="width: 400rpx;">鏁伴噺锛歿{item.anfme}}</text>
+							<text style="width: 400rpx;">涓绘暟閲忥細{{item.anfme}}</text>
+						</view>
+						<view>
+							<text style="width: 400rpx;">杈呮暟閲忥細{{item.weight}}</text>
 						</view>
 					</view>
 					<view class="data-list-right">
@@ -80,6 +89,9 @@
 			<label class="label-btn" style="width: 150rpx;">
 				<button class="cu-btn" @click="resst()">閲嶇疆</button>
 			</label>
+			<label>
+				鎬昏杈呮暟閲忥細{{ countWeight }}
+			</label>
 			<label class="label-btn">
 				<button class="cu-btn bg-blue " @click="comb()">缁勬墭</button>
 			</label>
@@ -91,16 +103,16 @@
 			<view class="revise-box ">
 				<view class="revise-box-top">
 					<view class="color-block-blue"></view>
-					<text class="title">淇敼鎵瑰彿/鏁伴噺</text>
+					<text class="title">淇敼鏁伴噺</text>
 				</view>
-				<view class="" style="position: relative;left: 50px;margin-bottom: 20px;">
-					<text style="display: inline-block;float: left;width: 50px;">鎵瑰彿锛�</text>
+			<!-- 	<view class="" style="position: relative;left: 50px;margin-bottom: 20px;">
+					<text style="display: inline-block;float: left;width: 60px;">鎵规锛�</text>
 					<input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="batch">
-				</view>
+				</view> -->
 				<view class="changeBox">
 					<view class="num-box">
-						<text style="display: inline-block;float: left;width: 50px;">鎵瑰彿锛�</text>
-						<uni-number-box :value="count" :max="9999" color="#747474"  @change="changeValue"/>
+						<text style="display: inline-block;float: left;width: 60px;">涓绘暟閲忥細</text>
+						<uni-number-box :value="count" :max="99999999" color="#747474"  @change="changeValue"/>
 					</view> 
 				</view>
 				<view class="revise-box-buttom">
@@ -136,7 +148,8 @@
 				check:false,
 				checkText:'鍏ㄩ��',
 				checkedData:[],
-				batch:''
+				batch:'',
+				countWeight: 0
 			}
 		},
 		onShow() {
@@ -238,7 +251,7 @@
 				}
 				uni.showLoading();
 				uni.request({
-				    url: that.commonUrl + '/mobile/comb/auth',
+				    url: that.commonUrl + '/mobile/comb2/auth',
 				    data: JSON.stringify({
 						barcode: that.barcode,
 						combMats: that.matList
@@ -293,7 +306,7 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.commonUrl + '/mat/auth',
+				    url: that.commonUrl + '/mobile/mat/auth',
 				    data: {
 						matnr:that.matnr
 				    },
@@ -305,13 +318,17 @@
 						let res = result.data
 						if (res.code === 200 && res.data) {
 							that.matData = res.data
+							
+							let tiaoma = that.matnr;
 							that.matnr = ''
 							uni.navigateTo({
 								url: "matQuery",
 								events: {
 								    // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 								    matList: function(data) {
-										that.checkMat(data.data)
+										let resultData = data.data;
+										resultData.tiaoma = tiaoma;
+										that.checkMat(resultData)
 										// that.matList.push(data.data)
 									},
 								},
@@ -344,7 +361,11 @@
 				var len = this.matList.length
 				var add = true
 				for (var i = 0; i < len; i++) {
-					if (mat.matnr == this.matList[i].matnr) {
+					if (mat.tiaoma == this.matList[i].tiaoma){
+						uni.showToast({title: "鏉$爜閲嶅鎵簡", icon: "none", position: 'top'})
+						add = false
+					}
+					if (mat.matnr == this.matList[i].matnr && mat.batch == this.matList[i].batch) {
 						this.matList[i].anfme += mat.anfme 
 						this.$forceUpdate() // 寮哄埗鍒锋柊
 						add = false
@@ -352,6 +373,12 @@
 				}
 				if (add) {
 					this.matList.unshift(mat)
+					
+					let count = 0;
+					this.matList.forEach((item) => {
+						count += item.weight;
+					})
+					this.countWeight = count;
 				}
 			},
 			change(e) {
@@ -576,7 +603,7 @@
 	}
 	.data-list {
 		border-bottom: 1px solid #d8d8d8;
-		height: 180rpx;
+		height: 450rpx;
 		margin: 15rpx;
 		border-radius: 20rpx;
 	}

--
Gitblit v1.9.1