From 166b9c6d7517fbff3a400e07d47d1f33c8634c69 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 05 七月 2025 15:08:47 +0800
Subject: [PATCH] #

---
 pages/basics/matQuery.vue |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue
index 4530ce2..4be2b34 100644
--- a/pages/basics/matQuery.vue
+++ b/pages/basics/matQuery.vue
@@ -3,26 +3,43 @@
 		<view>
 			<view class="container">
 				<view class="text-box">
-					<view class="text-title"><text>鍟嗗搧缂栫爜</text></view>
+					<view class="text-title"><text>鍝佸彿</text></view>
 					<view class="text-title"><text>{{matData.matnr}}</text></view>
 				</view>
 				<view class="text-box">
-					<view class="text-title"><text>鍟嗗搧鍚嶇О</text></view>
+					<view class="text-title"><text>鍝佸悕</text></view>
 					<view class="text-title">{{matData.maktx}}</view>
 				</view>
 				<view class="text-box">
 					<view class="text-title"><text>瑙勬牸</text></view>
 					<view class="text-title">{{matData.specs}}</view>
 				</view>
+				<!-- <view class="text-box">
+					<view class="text-title"><text>宸ュ簭</text></view>
+					<view class="text-title">{{matData.sku}}</view>
+				</view> -->
 				<view class="text-box">
-					<view class="text-title"><text>鍚堝悓鍙�</text></view>
+					<view class="text-title"><text>鎵规</text></view>
 					<view class="text-title"><input type="text" v-model="matData.batch"></view>
 				</view>
+				<!-- <view class="text-box">
+					<view class="text-title"><text>澶囨敞</text></view>
+					<view class="text-title"><input type="text" v-model="matData.memo"></view>
+				</view> -->
+				
 				<view class="text-box">
-					<view class="text-title"><text>鏁伴噺</text></view>
+					<view class="text-title"><text>涓绘暟閲�</text></view>
 					<view class="text-title">
 						<view>
-							<uni-number-box :value="matData.anfme" :max="9999" color="#747474" @change="changeValue"/>
+							<uni-number-box v-model="matData.anfme" :value="matData.anfme" :max="99999999" color="#747474" @change="changeValue"/>
+						</view>
+					</view>
+				</view>
+				<view class="text-box">
+					<view class="text-title"><text>杈呮暟閲�</text></view>
+					<view class="text-title">
+						<view>
+							<uni-number-box v-model="matData.weight" :value="matData.weight" :max="99999999" color="#747474" @change="changeValue2"/>
 						</view>
 					</view>
 				</view>
@@ -45,6 +62,8 @@
 					maktx: null,
 					batch: null,
 					anfme: null,
+					anfme2: null,
+					origin: null,
 				},
 				baseIP:'',
 				basePORT:'',
@@ -62,7 +81,6 @@
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('matData', function(data) {
 			that.matData = data.data
-			that.matData.anfme = 0
 			})
 			
 			
@@ -75,13 +93,22 @@
 				
 			},
 			changeValue(value) {
-				this.matData.anfme = value
+				// this.matData.anfme = value
+			},
+			changeValue2(value) {
+				let arr = this.matData.origin.split("/")
+				let mainAnfme = value * parseFloat(arr[1]) * parseFloat(arr[0])
+				let flooredNum = Math.floor(mainAnfme * 10000) / 10000; // 鎴柇鍒板皬鏁扮偣鍚�4浣�
+				this.matData.weight = value
+				this.matData.anfme = flooredNum
 			},
 			back() {
 				if (this.matData.anfme === 0) {
 					uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
 					return;
 				}
+				
+				console.log(this.matData);
 				this.getOpenerEventChannel().emit('matList', {data: this.matData});
 				uni.vibrateShort();
 				uni.navigateBack({

--
Gitblit v1.9.1