From 722736f9a56cf64b615e37ed1722dd430ad90d2d Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期三, 26 十月 2022 08:48:31 +0800
Subject: [PATCH] #

---
 pages/basics/matQuery.vue |   97 ++++++++++++++++++++++--------------------------
 1 files changed, 45 insertions(+), 52 deletions(-)

diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue
index a73e3c2..c8103fe 100644
--- a/pages/basics/matQuery.vue
+++ b/pages/basics/matQuery.vue
@@ -4,15 +4,15 @@
 			<view class="container">
 				<view class="text-box">
 					<view class="text-title"><text>鍟嗗搧缂栫爜</text></view>
-					<view class="text-title"><text>{{matData.matnr}}</text></view>
+					<view class="text-title"><text>{{matData.matNo}}</text></view>
 				</view>
 				<view class="text-box">
 					<view class="text-title"><text>鍟嗗搧鍚嶇О</text></view>
-					<view class="text-title">{{matData.maktx}}</view>
+					<view class="text-title">{{matData.matName}}</view>
 				</view>
 				<view class="text-box">
 					<view class="text-title"><text>瑙勬牸</text></view>
-					<view class="text-title">{{matData.specs}}</view>
+					<view class="text-title">{{matData.str2}}</view>
 				</view>
 				<view class="text-box">
 					<view class="text-title"><text>鎵瑰彿</text></view>
@@ -22,14 +22,14 @@
 					<view class="text-title"><text>鏁伴噺</text></view>
 					<view class="text-title">
 						<view>
-							<uni-number-box color="#747474"  @change="changeValue"/>
+							<uni-number-box :value="matData.count" :max="999999999" color="#747474" @change="changeValue"/>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<view class="foot flex justify-center">
-			<label for="">
+			<label>
 				<button class="cu-btn bg-blue" @click="back()">鎻愬彇</button>
 			</label>
 		</view>
@@ -41,57 +41,51 @@
 		data() {
 			return {
 				matData: {
-					matnr: null,
-					maktx: null,
-					specs: null,
-					batch: null,
-					anfme: 0
+					matNo: null,
+					matName: null,
+					str2: null,
+					count: null,
 				},
 				baseIP:'',
 				basePORT:'',
 			}
 		},
 		onLoad(option) {
-			this.baseIP = option.baseIP
-			this.basePORT = option.basePORT
-			this.matData.matnr = option.matnr
-			this.getMat()
+			let that = this
+			// #ifdef APP-NVUE
+			const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+			// #endif
+			// #ifndef APP-NVUE
+			const eventChannel = this.getOpenerEventChannel();
+			// #endif
+			
+			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+			eventChannel.on('matData', function(data) {
+			that.matData = data.data
+			that.matData.count = 0
+			})
+			
+			
 		},
 		methods: {
-			getMat() {
-				let that = this
-				uni.request({
-					url: 'http://localhost:8081/jkwms/mat/auth',
-				    // url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
-				    data: {
-						matnr: that.matData.matnr
-				    },
-				    header: {
-						'token':uni.getStorageSync('token')
-				    },
-					success(res) {
-						var res = res.data;
-						console.log(res);
-						if (res.code === 200) {
-							that.matData = res.data;
-						}
-					}
-				});	
-			},
 			blur() {
 				
 			},
 			focus() {
 				
 			},
-			changeValue() {
-				
+			changeValue(value) {
+				this.matData.count = value
 			},
 			back() {
-				this.matData.anfme = 5.9
-				uni.$emit('matData', this.matData);
+				if (this.matData.count === 0) {
+					uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
+					return;
+				}
+				this.getOpenerEventChannel().emit('matList', {data: this.matData});
+				uni.vibrateShort();
 				uni.navigateBack({
-					delta: 1
+					
 				})
 			}
 		}
@@ -110,36 +104,35 @@
 		margin-top: 20rpx;
 		margin-left: 10%;
 		width: 80%;
-		font-size: 36rpx;
-		font-weight: 700;
+		font-size: 32rpx;
+		font-weight: 400;
 		color: #434343;
 		border-bottom: 1rpx solid #e8e8e8;
 	}
 	.text-box:last-child {
 		border-bottom: none;
 	}
-	.text-box:last-child .text-title:last-child {
-		display: flex;
-		height: 100%;
-		align-items: center;
-	}
 	.text-box .text-title {
 		width: 30%;
+		height: 100rpx;
 		float: left;
 		display: inline-block;
 	}
-	.text-box .text-value {
-		width: 70%;
-		padding: 0 20upx;
-	}
 	.text-box .text-title:last-child {
 		display: inline-block;
-		margin-left: 10%;
-		width: 60%;
+		margin-left: 5%;
+		width: 65%;
 		font-size: 30rpx;
 		font-weight: 400;
 		color: #747474;
+		display: flex;
+		align-items: center;
 	}
+	.text-box .text-title:last-child input {
+		border-bottom: 1rpx solid #e8e8e8 ;
+		width: 100%;
+	}
+	
 	
 	.foot {
 		width: 100%;

--
Gitblit v1.9.1