From d7fe8ae3888c8e2b1eea3c1e3769be0d42a21cc9 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 16 十月 2023 09:03:47 +0800
Subject: [PATCH] Merge branch '1.0.3' of http://139.186.142.91:10010/r/productDev/dmMes into 1.0.3

---
 minipro_standard/pages/OutOperation/OutOperation.vue |   83 +++++++++++++++++++++++++----------------
 1 files changed, 50 insertions(+), 33 deletions(-)

diff --git a/minipro_standard/pages/OutOperation/OutOperation.vue b/minipro_standard/pages/OutOperation/OutOperation.vue
index 80bb6f3..01809b9 100644
--- a/minipro_standard/pages/OutOperation/OutOperation.vue
+++ b/minipro_standard/pages/OutOperation/OutOperation.vue
@@ -208,7 +208,8 @@
 		onLoad(option) {
 			this.type = option.type
 			this.id = option.id
-			this.isZKD = this.type == QRCodeType.ZKD
+			this.isZKD = this.type == QRCodeType.ZKD
+			this.dbid = option.dbid
 			if (option.dbid) {
 				this.getDBs(option.dbid)
 			} else {
@@ -242,16 +243,16 @@
 				} else if (this.type == QRCodeType.ZKD) {
 					infoAction = wTransferForInOut
 					data.wTransferType = '0'
-				}
+				}
 				infoAction(data).then(res => {
-					// this.warehouseId = this.info.wtransferWarehouseList[0].warehouseId
-					console.log(this.type == QRCodeType.ZKD);
 					if (this.isZKD) {
 						this.info = res.data.wtransfer
-						this.warehouseList = res.data.wtransferWarehouseList
+						this.warehouseList = res.data.wtransferWarehouseList
+						this.warehouseId = this.warehouseList[0].warehouseId
 					} else {
 						this.info = res.data.woutbound
-						this.woutboundDetailsWait = res.data.woutboundDetailsWait
+						this.woutboundDetailsWait = res.data.woutboundDetailsWait
+						this.warehouseId = this.woutboundDetailsWait[0].warehouseId
 					}
 				}).catch(err => {
 					uni.$u.toast(err)
@@ -270,31 +271,38 @@
 			selectMaterail(v) {
 				let tempList = this.warehouseList[0].wtransferDetailList
 				let materials = v.materials
-
-				materials.forEach(materail => {
-					tempList.forEach(item => {
-						if (materail.materialId == item.materialId && materail.procedureId == item
-							.procedureId && materail.qualityType == item.qualityType && materail.batch ==
-							item.batch) {
-							let isExist = false
-							this.outboundList.forEach(selected => {
-								if (selected.newId == materail.id) {
-									isExist = true
-									return
-								}
-							})
-							if (isExist) {
-								uni.$u.toast('璇ョ墿鏂欐壒娆″凡瀛樺湪')
-								return
-							}
-							let obj = JSON.parse(JSON.stringify(materail))
-							obj.newId = item.id
-							this.outboundList.push(obj)
-						}
+				
+				materials.forEach(materail => {
+					
+					tempList.forEach(item => {
+						item.wstockExtListVOList.forEach(hw => {
+							if (materail.materialId == hw.materialId && materail.procedureId == hw
+								.procedureId && materail.qualityType == hw.qualityType && materail.batch ==
+								hw.batch) {
+								let isExist = false
+								this.outboundList.forEach(selected => {
+									if (selected.newId == materail.id) {
+										isExist = true
+										return
+									}
+								})
+								if (isExist) {
+									uni.$u.toast('璇ョ墿鏂欐壒娆″凡瀛樺湪')
+									return
+								}
+								let obj = JSON.parse(JSON.stringify(materail))
+								obj.newId = item.id
+								this.outboundList.push(obj)
+							}
+						})
+						
 					})
 				})
+			},
+			dele(index) {
+				 this.outboundList.splice(index, 1)
 			},
-			submit() {
+			submit() {
 				if (this.type == QRCodeType.ZKD) {
 					if (this.outboundList.length > 0) {
 						let result = this.outboundList.reduce((a, b) => {
@@ -344,8 +352,14 @@
 							wtransferId: this.id
 						}).then(res => {
 							if (res.code === 200) {
-								this.$store.dispatch.dispatch('getUpcomingNum')
-								uni.$u.toast('鎿嶄綔鎴愬姛')
+								this.$store.dispatch('getUpcomingNum')
+								uni.$u.toast('鎿嶄綔鎴愬姛')
+								uni.redirectTo({
+									url: `/pages/warehousingDetails/warehousingDetails?id=${this.info.id}&dbid=${this.dbid}`
+								})
+								// uni.redirectTo({
+								// 	url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}&dbid=${this.dbid}`
+								// })
 								// setTimeout(() => {
 								//   router.replace({ name: 'wTransferDetail', query: { id: info.value.wtransfer.id, dbid: route.query.dbid } })
 								// }, 2000)
@@ -360,8 +374,11 @@
 						wOutboundType: 0
 					}).then(res => {
 						if (res.code === 200) {
-							this.$store.dispatch.dispatch('getUpcomingNum')
-							uni.$u.toast('鎿嶄綔鎴愬姛')
+							this.$store.dispatch('getUpcomingNum')
+							uni.$u.toast('鎿嶄綔鎴愬姛')
+							uni.redirectTo({
+								url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}`
+							})
 							// setTimeout(() => {
 							//   // router.go(-1)
 							//   router.replace({ name: 'wOutboundDetail', query: { id: info.value.wtransfer.id } })
@@ -733,7 +750,7 @@
 		bottom: 0;
 		left: 30rpx;
 		padding-bottom: 68rpx;
-
+		z-index: 9999;
 		.page_footer_qr {
 			flex: 1;
 			height: 88rpx;

--
Gitblit v1.9.3