From 3e49cb378dacaae5cc41d75dbf3040bd085bf225 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 22 四月 2024 20:08:13 +0800
Subject: [PATCH] #

---
 pages/phyz/stationManage/stationDetl.vue   |    3 
 pages/phyz/stationManage/pickAgainDetl.vue |   22 ++++
 pages.json                                 |    8 +
 pages/phyz/stationManage/pickAgain.vue     |  220 ++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 245 insertions(+), 8 deletions(-)

diff --git a/pages.json b/pages.json
index 5e5210d..c6bb47e 100644
--- a/pages.json
+++ b/pages.json
@@ -662,6 +662,14 @@
         		"navigationBarTitleText" : "鍐嶆鎷f枡",
         		"enablePullDownRefresh" : false
         	}
+        },
+        {
+        	"path" : "pages/phyz/stationManage/pickAgainDetl",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "鍐嶆鎷f枡鏄庣粏",
+        		"enablePullDownRefresh" : false
+        	}
         }
     ],
 	"globalStyle": {
diff --git a/pages/phyz/stationManage/pickAgain.vue b/pages/phyz/stationManage/pickAgain.vue
index 882e262..2749241 100644
--- a/pages/phyz/stationManage/pickAgain.vue
+++ b/pages/phyz/stationManage/pickAgain.vue
@@ -1,7 +1,45 @@
 <template>
 	<view>
+		<view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index">
+			<view class="list-left">
+				<view class="detl-threeCode">{{orderDetl.threeCode}}</view>
+				<view>涓诲崟鍙凤細{{orderDetl.orderNo}}</view>
+				<view>缂栧彿锛歿{orderDetl.matnr}}</view>
+				<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
+				<view>搴撳瓨鏁伴噺锛歿{orderDetl.anfme}}</view>
+				<view>璁㈠崟鍙嚭鏁伴噺锛歿{orderDetl.stock}}</view>
+				<view>鍏ュ簱鏁伴噺锛歿{orderDetl.pakinQty}}</view>
+			</view>
+			<view class="list-right" @click="addItem(index)">
+				<uni-icons type="folder-add" size="25"  color="#fff"></uni-icons>
+			</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="shop-car" @click="orderCar()">
+			<view class="car-left">
+				<uni-icons type="cart-filled" size="35"  color="#fff"></uni-icons>
+			</view>
+			<view class="car-right">
+				<text>{{orderCarList.length}}</text>
+			</view>
 		</view>
 	</view>
 </template>
@@ -10,7 +48,10 @@
 	export default {
 		data() {
 			return {
-				
+				dataList: [],
+				orderCarList: [],
+				pickList: [],
+				count: ''
 			}
 		},
 		onShow() {
@@ -22,21 +63,44 @@
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('item', function(data) {
 				console.log(data);
+				_this.pickList = data.wrkDetls
+				_this.getLocDetl(data.item.sourceLocNo)
 			})
 		},
 		methods: {
-			getLocDetl() {
+			getLocDetl(locNo) {
 				let _this = this
 				uni.request({
-					url: `${_this.baseUrl}/agvMobile/query/locDetl/v1`,
+					url: `${_this.baseUrl}/agv/locDetl/list/auth/v2`,
 					header: { 'token': uni.getStorageSync('token') },
 					data: {
+						curr: 1,
+						limit: 999,
+						loc_no: locNo
 					},
-					method: 'POST',
+					method: 'GET',
 					success(res) {
 						res = res.data
 						console.log(res);
 						if (res.code === 200) {
+							let enbleList = []
+							for (let k of res.data.records) {
+								for (let j of _this.pickList) {
+									if (j.matnr == k.matnr && j.threeCode == k.threeCode) {
+										break
+									} else {
+										if (k.stock == -1) {
+											k['color'] = 'order-sts-end'
+										} else {
+											k.stock = k.stock >= k.anfme ? k.anfme : k.stock
+											k['color'] = 'order-sts-start'
+										}
+										enbleList.push(k)
+									}
+								}
+								
+							}
+							_this.dataList = enbleList
 							
 						} else if (res.code == 403) {
 							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
@@ -46,11 +110,153 @@
 						}
 					}
 				})
-			}
+			},
+			// 宸查�夋嫞鏂欏垪琛�
+			orderCar() {
+				
+			},
+			// 娣诲姞鍏ュ簱鍟嗗搧鑷� 寰呯粍鎵樺垪琛�
+			addItem(index) {
+				// 鍒ゆ柇娣诲姞鐨勫晢鍝佹槸鍚﹀拰宸茬粡娣诲姞鐨勯噸澶�
+				let dataList = this.dataList
+				for (let k of this.orderCarList) {
+					if (k.orderNo == dataList[index].orderNo 
+						&& k.threeCode == dataList[index].threeCode 
+						&& k.matnr == dataList[index].matnr) {
+							uni.showToast({ title: '璇峰嬁閲嶅娣诲姞鍟嗗搧锛�', icon: "none", position: 'top' })
+							return
+					}
+				}
+				this.index = index
+				this.$refs.addItem.open()
+			},
+			addClose() {
+				this.$refs.addItem.close()
+				this.count = 0
+			},
+			addConfirm() {
+				// if (this.count == 0) {
+				// 	uni.showToast({ title: '鍏ュ簱鏁伴噺涓嶅悎娉曪紒', icon: "none", position: 'top' })
+				// 	return
+				// }
+				this.dataList[this.index]['used'] = true
+				this.dataList[this.index]['pakinQty'] = this.count
+				this.orderCarList.push(this.dataList[this.index])
+				this.index = 0
+				this.count = 0
+				this.$refs.addItem.close()
+			},
+			changeValue(value) {
+				this.count = value
+			},
 		}
 	}
 </script>
 
 <style>
-
+	@import url('../../../static/css/common/order.css');
+	.list-font-color {
+		color: #fff;
+		/* background-color: #33bb44; */
+	}
+	.order-sts-start {
+		background-color: #3eb689;
+	}
+	.order-sts-working {
+		background-color: #ff9d46;
+	}
+	.order-sts-end {
+		background-color: #ff7356;
+	}
+	.detl-threeCode {
+		font-size: 28px;
+		font-weight: bold;
+	}
+	.shop-car {
+		position: fixed;
+		left: 22rpx;
+		bottom: 150rpx;
+		background-color: #2299ff;
+		width: 260rpx;
+		height: 90rpx;
+		display: flex;
+		align-items: center;
+		box-shadow: 0 0 10px 5px rgba(0, 0, 0, .6);
+		border-radius: 10rpx;
+		color: #fff;
+		font-size: 28px;
+		font-weight: bold;
+	}
+	.car-left {
+		padding: 16rpx;
+		flex: 5;
+	}
+	.car-right {
+		flex: 4;
+	}
+	
+	.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/stationManage/pickAgainDetl.vue b/pages/phyz/stationManage/pickAgainDetl.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/pages/phyz/stationManage/pickAgainDetl.vue
@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>
diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue
index 4090640..4c3ffa8 100644
--- a/pages/phyz/stationManage/stationDetl.vue
+++ b/pages/phyz/stationManage/stationDetl.vue
@@ -562,7 +562,8 @@
 					url: './pickAgain',
 					success(res) {
 						res.eventChannel.emit('item', {
-							item: item
+							item: item,
+							wrkDetls: _this.wrkDetls
 						})
 					},
 					events: {

--
Gitblit v1.9.1