From bd22cf1b35738f1556c9a45a8b3a55fe2959581c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 19 八月 2024 11:04:05 +0800
Subject: [PATCH] #

---
 manifest.json                            |    4 
 pages/phyz/processOrder/orderCheck2.vue  |  274 +++++++++++++++++++++++++++++++++++++++
 pages/phyz/processOrder/processOrder.vue |    2 
 pages/phyz/processOrder/orderCheck.vue   |  107 ++++++++------
 4 files changed, 337 insertions(+), 50 deletions(-)

diff --git a/manifest.json b/manifest.json
index 523c686..1db4c24 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
     "name" : "涓壃WMS",
     "appid" : "__UNI__DA5854D",
     "description" : "",
-    "versionName" : "20240809A",
-    "versionCode" : 126,
+    "versionName" : "20240819A",
+    "versionCode" : 127,
     "transformPx" : false,
     /* 5+App鐗规湁鐩稿叧 */
     "app-plus" : {
diff --git a/pages/phyz/processOrder/orderCheck.vue b/pages/phyz/processOrder/orderCheck.vue
index ffe43a2..87d356f 100644
--- a/pages/phyz/processOrder/orderCheck.vue
+++ b/pages/phyz/processOrder/orderCheck.vue
@@ -1,32 +1,33 @@
 <template>
 	<view>
-		<view class="list shop-car">
+		<view class="list shop-car" v-for="item in dataList">
 			<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>宸ュ簭锛歿{data.processSts$}}</view>
-				<view>搴撳瓨鏁伴噺锛歿{count}}</view>
+				<view class="detl-threeCode" style="padding: 16rpx 0;">{{item.csocode}}</view>
+				<view>搴撲綅锛歿{item.locNo}}</view>
+				<view>缂栧彿锛歿{item.matnr}}</view>
+				<view>鍚嶇О锛歿{item.maktx}}</view>
+				<view>鑷敱椤癸細{{item.containerCode}}</view>
+				<view>瑙勬牸锛歿{item.specs}}</view>
+				<view>鎵瑰彿锛歿{item.batch}}</view>
+				<view>搴撳瓨鏁伴噺锛歿{item.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()">
+					<view>鍑哄簱鏁伴噺锛歿{item.anfme}}</view>
+					<view style="margin-left: 50rpx;" @click="revise(item)">
 						<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;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>
+					<view class="dropdown" @click="toggleDropdown(item)">
+						<!-- <view style="height: 100%;width: 100%; position: fixed;background-color: rgba(0,0,0,.4);left:0;top:0" v-if = "item.isOpen"></view> -->
+						<input type="text" style="width: 270rpx;font-size: 20px;" v-model="item.agvStaNo" placeholder="璇烽�夋嫨鍑哄簱绔�" placeholder-style="color: #fff">
+						<uni-icons :type="item.isOpen ? 'top' : 'bottom'" color="#fff" style="margin-left: 10rpx;"></uni-icons>
+						<scroll-view scroll-y="ture" class="dropdown-content" v-if="item.isOpen">
+							<view class="dropdown-item" v-for="option in options" @click="selected(option,item)">{{option}}</view>
 						</scroll-view>
 					</view>
 				</view>
+				<button @click="combConfirm(item)" :disabled="combDis">绔嬪嵆鍑哄簱</button>
 			</view>
 		</view>
 		<!-- 寮圭獥 -->
@@ -37,7 +38,7 @@
 					<view class="title">鍑哄簱鏁伴噺</view>
 					<view class="popup-item">
 						<view>
-							<uni-number-box :value="data.anfme" :step='1' :min="0" :max="count" color="#747474" @change="changeValue" />
+							<uni-number-box :value="data.anfme" :step='1' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
 						</view>
 						
 					</view>
@@ -54,11 +55,12 @@
 				</view>
 			</uni-popup>
 		</view>
+		<view style="height: 100rpx;"></view>
 		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
-		<view class="buttom">
+		<!-- <view class="buttom">
 			<button size="mini" @click="reset('warn')">绋嶅悗澶勭悊</button>
 			<button size="mini" type="primary" @click="combConfirm('warn')" :disabled="combDis">绔嬪嵆鍑哄簱</button>
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -69,9 +71,12 @@
 				baseUrl: '',
 				token: '',
 				data: {},
+				dataList: [],
 				option: '',
-				count: 0,
-				combDis: false
+				options: [],
+				combDis: false,
+				maxCount: 0,
+				orderType: ''
 			}
 		},
 		onShow() {
@@ -81,17 +86,31 @@
 			// const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
 			const eventChannel = this.getOpenerEventChannel();
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
-			eventChannel.on('mat', function(data) {
-				let ids = [data.mat.id]
-				_this.getPakoutList(ids,data.mat.locNo)
+			// eventChannel.on('mat', function(data) {
+			// 	let ids = [data.mat.id]
+			// 	_this.getPakoutList(ids,data.mat.locNo)
+			// })
+			eventChannel.on('item', function(data) {
+				let ids = [data.item.id]
+				_this.getPakoutList(ids)
+			})
+			eventChannel.on('type', function(data) {
+				console.log(data);
+				if (data) {
+					_this.orderType = data.type
+				}
 			})
 		},
 		methods: {
 			max() {
-				 this.data.anfme = this.count
+				this.data.anfme = this.data.count
 			},
 			toggleDropdown(item) {
+				this.options = []
 				item.isOpen = !item.isOpen;
+				for	(let k of item.agvStaNos) {
+					this.options.push(k)
+				}
 			},
 			selected(option,item) {
 				item.agvStaNo = option
@@ -106,26 +125,18 @@
 					method: 'POST',
 					success(res) {
 						res = res.data
-						console.log(res);
 						if (res.code === 200) {
 							for (let k of res.data) {
-								if (locNo == k.locNo) {
+								if (k.locNo != null) {
 									k['isOpen'] = false
-									_this.count = k.anfme
-									// k.anfme = 0
-									switch (k.processSts) {
-										case 1: 
-											k["processSts$"] = "寰呭姞宸�"
-											break;
-										case 2:
-											k["processSts$"] = "宸插姞宸�"
-											break;
-										case 3:
-											k["processSts$"] = "鏃犻渶鍔犲伐"
-											break;
+									k['count'] = k.anfme
+									k.anfme = 0
+									if (_this.orderType == 'bcp') {
+										if (k.locNo.substring(k.locNo.length - 1, k.locNo.length) == 1) {
+											continue
+										}
 									}
-									_this.data = k
-									return
+									_this.dataList.push(k)
 								}
 							}
 						} else if (res.code == 403) {
@@ -137,12 +148,14 @@
 					}
 				})
 			},
-			revise() {
+			revise(item) {
+				this.data = item
+				this.maxCount = item.count 
 				this.$refs.addItem.open()
 			},
 			addClose() {
 				this.$refs.addItem.close()
-				// this.data.anfme = 0
+				this.data.anfme = 0
 			},
 			addConfirm() {
 				this.$refs.addItem.close()
@@ -150,7 +163,7 @@
 			changeValue(value) {
 				this.data.anfme = value
 			},
-			combConfirm() {
+			combConfirm(item) {
 				let _this = this
 				_this.combDis = true
 				if (_this.data.anfme == 0) {
@@ -159,9 +172,9 @@
 				}
 				uni.showLoading({})
 				let combList = []
-				combList.push(_this.data)
+				combList.push(item)
 				uni.request({
-					url: `${_this.baseUrl}/process/out/pakout/auth`,
+					url: `${_this.baseUrl}/out/pakout/auth`,
 					header: {'token': uni.getStorageSync('token')},
 					data: combList,
 					method: 'POST',
diff --git a/pages/phyz/processOrder/orderCheck2.vue b/pages/phyz/processOrder/orderCheck2.vue
new file mode 100644
index 0000000..ffe43a2
--- /dev/null
+++ b/pages/phyz/processOrder/orderCheck2.vue
@@ -0,0 +1,274 @@
+<template>
+	<view>
+		<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>宸ュ簭锛歿{data.processSts$}}</view>
+				<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;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">
+						<view>
+							<uni-number-box :value="data.anfme" :step='1' :min="0" :max="count" color="#747474" @change="changeValue" />
+						</view>
+						
+					</view>
+					<view class="popup-item">
+						<view>
+							<view @click="max()" style="padding: 0rpx 16rpx;background-color: #d9d9d9;font-size: 10px;">MAX</view>
+						</view>
+						
+					</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')" :disabled="combDis">绔嬪嵆鍑哄簱</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				baseUrl: '',
+				token: '',
+				data: {},
+				option: '',
+				count: 0,
+				combDis: false
+			}
+		},
+		onShow() {
+			let _this = this
+			this.baseUrl = uni.getStorageSync('baseUrl');
+			this.token = uni.getStorageSync('token');
+			// const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+			const eventChannel = this.getOpenerEventChannel();
+			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+			eventChannel.on('mat', function(data) {
+				let ids = [data.mat.id]
+				_this.getPakoutList(ids,data.mat.locNo)
+			})
+		},
+		methods: {
+			max() {
+				 this.data.anfme = this.count
+			},
+			toggleDropdown(item) {
+				item.isOpen = !item.isOpen;
+			},
+			selected(option,item) {
+				item.agvStaNo = option
+			},
+			// 璁㈠崟鏄庣粏
+			getPakoutList(ids,locNo) {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/out/pakout/preview/auth`,
+					header: {'token': uni.getStorageSync('token')},
+					data: ids,
+					method: 'POST',
+					success(res) {
+						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
+									// k.anfme = 0
+									switch (k.processSts) {
+										case 1: 
+											k["processSts$"] = "寰呭姞宸�"
+											break;
+										case 2:
+											k["processSts$"] = "宸插姞宸�"
+											break;
+										case 3:
+											k["processSts$"] = "鏃犻渶鍔犲伐"
+											break;
+									}
+									_this.data = k
+									return
+								}
+							}
+						} else if (res.code == 403) {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+							setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+						} else {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+						}
+					}
+				})
+			},
+			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
+				_this.combDis = true
+				if (_this.data.anfme == 0) {
+					uni.showToast({ title: '鍑哄簱鏁伴噺涓嶈兘涓�0锛�', icon: "error", position: 'top'})
+					return
+				}
+				uni.showLoading({})
+				let combList = []
+				combList.push(_this.data)
+				uni.request({
+					url: `${_this.baseUrl}/process/out/pakout/auth`,
+					header: {'token': uni.getStorageSync('token')},
+					data: combList,
+					method: 'POST',
+					success(res) {
+						_this.combDis = false
+						res = res.data
+						if (res.code === 200) {
+							uni.hideLoading({})
+							uni.showToast({ title: '鍑哄簱鎴愬姛', icon: "success", position: 'top'})
+							setTimeout(()=> {
+								uni.navigateBack({
+									delta: 2
+								});
+							},700)
+						} else if (res.code == 403) {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+							setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+						} else {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+						}
+					},
+					fail(res) {
+						_this.combDis = false
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<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/processOrder/processOrder.vue b/pages/phyz/processOrder/processOrder.vue
index 524cb53..76052e3 100644
--- a/pages/phyz/processOrder/processOrder.vue
+++ b/pages/phyz/processOrder/processOrder.vue
@@ -203,7 +203,7 @@
 				}
 				let _this = this
 				uni.navigateTo({
-					url: './processList',
+					url: './orderCheck',
 					success(res) {
 						res.eventChannel.emit('item', {
 							item: item

--
Gitblit v1.9.1