From 80c6ee8ea8adf91e4dd118c8deff948e46a8e043 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 11 四月 2024 23:59:13 +0800
Subject: [PATCH] #

---
 pages/phyz/orderOut/orderList.vue  |   37 ++------
 pages/phyz/orderOut/orderCheck.vue |  187 ++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 181 insertions(+), 43 deletions(-)

diff --git a/pages/phyz/orderOut/orderCheck.vue b/pages/phyz/orderOut/orderCheck.vue
index 7e57867..7cf5583 100644
--- a/pages/phyz/orderOut/orderCheck.vue
+++ b/pages/phyz/orderOut/orderCheck.vue
@@ -1,25 +1,53 @@
 <template>
 	<view>
-		<view class="list">
+		<view class="list shop-car">
 			<view class="list-left">
+				<view class="detl-threeCode" style="padding: 16rpx 0;">{{data.csocode}}</view>
+				<view>搴撲綅锛歿{data.locNo}}</view>
 				<view>缂栧彿锛歿{data.matnr}}</view>
 				<view>鍚嶇О锛歿{data.maktx}}</view>
+				<view>鑷敱椤癸細{{data.containerCode}}</view>
 				<view>瑙勬牸锛歿{data.specs}}</view>
 				<view>鎵瑰彿锛歿{data.batch}}</view>
-				<view class="list-anfme">鏁伴噺锛歿{data.anfme}}</view>
-				<view class="list-qty-1" v-if="data.anfme > data.qty">浣滀笟鏁伴噺锛歿{data.qty}}</view>
-				<view class="list-qty-2" v-if="data.anfme <= data.qty">浣滀笟鏁伴噺锛歿{data.qty}}</view>
-				<view>璐т綅锛歿{data.locNo}}</view>
-				<view style="display: flex;">鍑哄簱绔欙細
+				<view>搴撳瓨鏁伴噺锛歿{count}}</view>
+				<view class="detl-threeCode" style="display: flex;padding: 32rpx 0;align-items: center;font-size: 24px;">
+					<view>鍑哄簱鏁伴噺锛歿{data.anfme}}</view>
+					<view style="margin-left: 50rpx;" @click="revise()">
+						<uni-icons type="compose" size="30" color="#fff"></uni-icons>
+					</view>
+				</view>
+				
+				<view class="detl-threeCode" style="display: flex;padding: 0 0 32rpx 0;font-size: 24px;">鍑哄簱绔欙細
 					<view class="dropdown" @click="toggleDropdown(data)">
-						<input type="text" style="width: 270rpx;" v-model="data.agvStaNo" placeholder="璇烽�夋嫨鍑哄簱绔�">
-						<uni-icons :type="data.isOpen ? 'top' : 'bottom'" color="#c1c1c1" style="margin-left: 10rpx;"></uni-icons>
+						<input type="text" style="width: 270rpx;font-size: 20px;" v-model="data.agvStaNo" placeholder="璇烽�夋嫨鍑哄簱绔�" placeholder-style="color: #fff">
+						<uni-icons :type="data.isOpen ? 'top' : 'bottom'" color="#fff" style="margin-left: 10rpx;"></uni-icons>
 						<scroll-view scroll-y="ture" class="dropdown-content" v-if="data.isOpen">
 							<view class="dropdown-item" v-for="option in data.agvStaNos" @click="selected(option,data)">{{option}}</view>
 						</scroll-view>
 					</view>
 				</view>
 			</view>
+		</view>
+		<!-- 寮圭獥 -->
+		<view>
+			<uni-popup ref="addItem" type="dialog">
+				<view class="popup">
+					<!-- 鏍囬 -->
+					<view class="title">鍑哄簱鏁伴噺</view>
+					<view class="popup-item">
+						<uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
+					</view>
+					<view class="btn">
+						<view class="btn-left" @click="addClose">鍙栨秷</view>
+						<view class="btn-right" @click="addConfirm()">纭</view>
+					</view>
+				</view>
+			</uni-popup>
+		</view>
+		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+		<view class="buttom">
+			<button size="mini" @click="reset('warn')">绋嶅悗澶勭悊</button>
+			<button size="mini" type="primary" @click="combConfirm('warn')">绔嬪嵆鍑哄簱</button>
 		</view>
 	</view>
 </template>
@@ -31,7 +59,8 @@
 				baseUrl: '',
 				token: '',
 				data: {},
-				option: ''
+				option: '',
+				count: 0
 			}
 		},
 		onLoad() {
@@ -41,16 +70,21 @@
 			// const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
 			const eventChannel = this.getOpenerEventChannel();
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
-			eventChannel.on('item', function(data) {
-				for (let item of data.mats) {
-					_this.ids.push(item.id)
-				}
-				_this.getPakoutList(_this.ids)
+			eventChannel.on('mat', function(data) {
+				console.log(data);
+				let ids = [data.mat.id]
+				_this.getPakoutList(ids,data.mat.locNo)
 			})
 		},
 		methods: {
+			toggleDropdown(item) {
+				item.isOpen = !item.isOpen;
+			},
+			selected(option,item) {
+				item.agvStaNo = option
+			},
 			// 璁㈠崟鏄庣粏
-			getPakoutList(ids) {
+			getPakoutList(ids,locNo) {
 				let _this = this
 				uni.request({
 					url: `${_this.baseUrl}/out/pakout/preview/auth`,
@@ -61,14 +95,135 @@
 						res = res.data
 						console.log(res);
 						if (res.code === 200) {
+							for (let k of res.data) {
+								if (locNo == k.locNo) {
+									k['isOpen'] = false
+									_this.count = k.anfme
+									_this.data = k
+									return
+								}
+							}
 						} 
 					}
 				})
 			},
+			revise() {
+				this.$refs.addItem.open()
+			},
+			addClose() {
+				this.$refs.addItem.close()
+				this.data.anfme = 0
+			},
+			addConfirm() {
+				this.$refs.addItem.close()
+			},
+			changeValue(value) {
+				this.data.anfme = value
+			},
+			combConfirm() {
+				let _this = this
+				let combList = []
+				combList.push(_this.data)
+				uni.request({
+					url: `${_this.baseUrl}/out/pakout/auth`,
+					header: {'token': uni.getStorageSync('token')},
+					data: combList,
+					method: 'POST',
+					success(res) {
+						res = res.data
+						console.log(res);
+						if (res.code === 200) {
+							uni.showToast({ title: '鍑哄簱鎴愬姛', icon: "success", position: 'top'})
+							setTimeout(()=> {
+								uni.navigateBack({
+									delta: 2
+								});
+							},700)
+						}
+					}
+				})
+			}
 		}
 	}
 </script>
 
-<style>
+<style scoped>
 	@import url('../../../static/css/common/order.css');
+	.shop-car {
+		background-color: #2299ff;
+		color: #fff;
+	}
+	.detl-threeCode {
+		font-size: 34px;
+		font-weight: bold;
+	}
+	.dropdown-item {
+		font-size: 20px;
+		font-weight: bold;
+	}
+	
+	.popup {
+		width: 80vw;
+		min-height: 100rpx;
+		background-color: #FFF;
+		border-radius: 25rpx;
+		position: relative;
+	}
+	.title {
+		height: 100rpx;
+		line-height: 100rpx;
+		width: 100%;
+		color: #606266;
+		text-align: center;
+		font-size: 16px;
+	}
+	.popup-item {
+		height: 80rpx;
+		line-height: 80rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	.popup-item-left {
+		width: 16vw;
+		padding-right: 20rpx;
+		text-align: right;
+		color: #606266;
+	}
+	.popup-item-right {
+		display: flex;
+		align-items: center;
+		width: 50vw;
+		height: 50rpx;
+		padding: 2px 5px;
+		border: 1px solid #E4E7ED;
+		border-radius: 5rpx;
+	}
+	.popup-item-right input{
+		color: #606266;
+	}
+	.btn {
+		display: flex;
+		height: 90rpx;
+		margin-top: 20rpx;
+		border-top: 1px solid #DCDFE6;
+		justify-content: center;
+		align-items: center;
+	}
+	.btn-left {
+		display: flex;
+		flex: 1;
+		height: 100%;
+		justify-content: center;
+		align-items: center;
+		color: #606266;
+		border-right: 1px solid #DCDFE6;
+	}
+	.btn-right {
+		display: flex;
+		flex: 1;
+		justify-content: center;
+		align-items: center;
+		color: #409EFF;
+	}
 </style>
diff --git a/pages/phyz/orderOut/orderList.vue b/pages/phyz/orderOut/orderList.vue
index 1fe7fad..2f84f21 100644
--- a/pages/phyz/orderOut/orderList.vue
+++ b/pages/phyz/orderOut/orderList.vue
@@ -25,28 +25,7 @@
 				<uni-icons type="right" size="25"  color="#fff"></uni-icons>
 			</view> -->
 		</view>
-		<!-- 寮圭獥 -->
-		<view>
-			<uni-popup ref="pakoutPrive" type="dialog">
-				<view class="popup">
-					<!-- 鏍囬 -->
-					<view class="title">璇烽�夋嫨璐ф灦绫诲瀷</view>
-					<view class="popup-item">
-						<view class="dropdown" @click="toggleDropdown()">
-							<input type="text" style="width: 650rpx;" v-model="containerType"  placeholder="璇烽�夋嫨璐ф灦绫诲瀷">
-							<uni-icons :type="isOpen ? 'top' : 'bottom'" color="#c1c1c1" style="margin-left: 10rpx;"></uni-icons>
-							<scroll-view scroll-y="ture" class="dropdown-content" v-if="isOpen">
-								<view class="dropdown-item" v-for="option in selects" @click="selected(option)">{{option}}</view>
-							</scroll-view>
-						</view>
-					</view>
-					<view class="btn">
-						<view class="btn-left" @click="emptyOutClose">鍙栨秷</view>
-						<view class="btn-right" @click="emptyOutConfirm()">鍑哄簱</view>
-					</view>
-				</view>
-			</uni-popup>
-		</view>
+		
 		<!-- 鍨珮 -->
 		<view style="height: 340rpx;text-align: center;color: #b9b9b9;">
 			- 宸茬粡鍒板簳浜� -
@@ -65,7 +44,8 @@
 				containerType: '',
 				isOpen: true,
 				option: '',
-				selects: []
+				selects: [],
+				orderId: ''
 			}
 		},
 		onShow() {
@@ -77,11 +57,12 @@
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('item', function(data) {
 				console.log(data.item);
-				_this.getLocDetl(data.item.orderNo,data.item.threeCode,data.item.matnr)
+				_this.orderId = data.item.id
+				_this.getLocDetl(data.item.orderNo,data.item.threeCode,data.item.matnr,data.item.id)
 			})
 		},
 		methods: {
-			getLocDetl(orderNo,threeCode,matnr) {
+			getLocDetl(orderNo,threeCode,matnr,id) {
 				let _this = this
 				uni.request({
 					url: `${_this.baseUrl}/agvMobile/query/locDetl/v1`,
@@ -104,6 +85,7 @@
 								} else {
 									k['color'] = 'order-sts-end'
 								}
+								k['id'] = id
 							}
 							_this.dataList = res.data
 						}
@@ -112,12 +94,13 @@
 			},
 			pakoutPrive(item) {
 				let _this = this
+				console.log(item);
 				uni.navigateTo({
 					url: "./orderCheck",
 					success: function(res) {
 						// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
-						res.eventChannel.emit('item1', {
-							item: item,
+						res.eventChannel.emit('mat', {
+							mat: item,
 						})
 					},
 					events: {

--
Gitblit v1.9.1