From cab317e376ca9073eab95ed98a7cb61c58b8071b Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期六, 07 十月 2023 16:21:58 +0800
Subject: [PATCH] Merge branch 'bfwms' of http://47.97.1.152:5880/r/wms_app into bfwms

---
 pages/basics/matQuery.vue |  142 +++++++++++++++++++++++++++++-----------------
 1 files changed, 89 insertions(+), 53 deletions(-)

diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue
index bdfe3bd..e721812 100644
--- a/pages/basics/matQuery.vue
+++ b/pages/basics/matQuery.vue
@@ -1,29 +1,41 @@
 <template>
-	<scroll-view scroll-y>
-		<view>
-			<view class="container">
-				<view class="text-box">
-					<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">{{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"><input type="text" v-model="matData.batch"></view>
-				</view>
-				<view class="text-box">
-					<view class="text-title"><text>鏁伴噺</text></view>
-					<view class="text-title">
-						<view>
-							<uni-number-box v-model="matData.anfme" :max="9999" color="#747474"  @change="changeValue"/>
-						</view>
+	<view>
+		<view class="container">
+			<view class="text-box">
+				<view class="text-title text-desc"><text>鍟嗗搧缂栫爜</text></view>
+				<view class="text-title"><text>{{matData.matnr}}</text></view>
+			</view>
+			<view class="text-box">
+				<view class="text-title text-desc"><text>鍟嗗搧鍚嶇О</text></view>
+				<view class="text-title">{{matData.maktx}}</view>
+			</view>
+			<view class="text-box">
+				<view class="text-title text-desc"><text>瑙勬牸</text></view>
+				<view class="text-title">{{matData.specs}}</view>
+			</view>
+			<view class="text-box">
+				<view class="text-title text-desc"><text>鍏ュ簱鍖哄煙</text></view>
+				<view class="text-title">{{matData.matType$}}</view>
+			</view>
+			<view class="text-box">
+				<view class="text-title text-desc"><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-desc"><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-desc"><text>瀹㈡埛淇℃伅</text></view>
+				<uni-combox :candidates="owners" placeholder="璇烽�夋嫨瀹㈡埛绫诲埆"
+				v-model="matData.owner"></uni-combox>
+				<!-- <view class="text-title"><input type="text" v-model="matData.cstmr"></view> -->
+			</view>
+			<view class="text-box">
+				<view class="text-title text-desc"><text>鏁伴噺</text></view>
+				<view class="text-title">
+					<view>
+						<uni-number-box :value="matData.anfme" :max="9999999" color="#747474" @change="changeValue"/>
 					</view>
 				</view>
 			</view>
@@ -33,7 +45,7 @@
 				<button class="cu-btn bg-blue" @click="back()">鎻愬彇</button>
 			</label>
 		</view>
-	</scroll-view>
+	</view>
 </template>
 
 <script>
@@ -43,44 +55,59 @@
 				matData: {
 					matnr: null,
 					maktx: null,
-					specs: null,
 					batch: null,
 					anfme: null,
+					owner: null
 				},
+				owners: [],
+				owner: '',
 				baseIP:'',
 				basePORT:'',
+				commonUrl: ''
 			}
 		},
 		onLoad(option) {
-			this.baseIP = option.baseIP
-			this.basePORT = option.basePORT
-			this.matData.matnr = option.matnr
+			let that = this
+			// #ifdef APP-NVUE
+			const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+			// #endif
+			// #ifndef APP-NVUE
+			const eventChannel = this.getOpenerEventChannel();
+			// #endif
 			
-		},
-		onShow() {
-			this.getMat()
+			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+			eventChannel.on('matData', function(data) {
+			that.matData = data.data
+			that.matData.anfme = 0
+			})
+			
+			eventChannel.on('url', function(data) {
+				that.commonUrl = data.data
+			})
+			setTimeout(()=> {
+				this.locOwner()
+			},100)
 		},
 		methods: {
-			getMat() {
+			locOwner() {
 				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')
-				    },
+					url: 'http://10.10.10.100:8080/bfwms' + '/locOwner/list/auth',
+					data:{curr:1,limit:15},
+					header: { 'token':uni.getStorageSync('token') },
+					method:'GET',
 					success(res) {
-						var res = res.data;
+						res = res.data
 						if (res.code === 200) {
-							that.matData = {}
-							that.matData = res.data;
+							that.owner = res.data.records
+							for (let k of res.data.records) {
+								that.owners.push(k.owner)
+							}
 						}
+					},
+					fail(res) {
 					}
-				});	
+				})
 			},
 			blur() {
 				
@@ -88,12 +115,17 @@
 			focus() {
 				
 			},
-			changeValue() {
-				
+			changeValue(value) {
+				this.matData.anfme = value
 			},
 			back() {
-				uni.$emit('matData', this.matData);
-				// console.log(this.matData)
+				if (this.matData.anfme === 0) {
+					uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
+					return;
+				}
+				this.getOpenerEventChannel().emit('matList', {data: this.matData});
+				this.getOpenerEventChannel().emit('owner', {data: this.owner});
+				uni.vibrateShort();
 				uni.navigateBack({
 					
 				})
@@ -109,8 +141,9 @@
 		background-color: #ffffff;
 	}
 	.text-box {
+		display: flex;
 		height: 100rpx;
-		line-height: 100rpx;
+		/* line-height: 100rpx; */
 		margin-top: 20rpx;
 		margin-left: 10%;
 		width: 80%;
@@ -142,13 +175,16 @@
 		border-bottom: 1rpx solid #e8e8e8 ;
 		width: 100%;
 	}
-	
+	.text-desc {
+		line-height: 100rpx;
+	}
 	
 	.foot {
 		width: 100%;
 		height: 100rpx;
 		line-height: 100rpx;
 		background-color: rgba(255,255,255,1);
+		/* background-color: #434343; */
 		position: fixed;
 		bottom: 0%;
 		border-top: 1px solid #d8d8d8;

--
Gitblit v1.9.1