ysy пре 2 година
родитељ
комит
0ab11a28d1
1 измењених фајлова са 46 додато и 19 уклоњено
  1. 46 19
      pages/pda/jobBooking/index/index.vue

+ 46 - 19
pages/pda/jobBooking/index/index.vue

@@ -517,22 +517,7 @@
 				// 	return false
 				// 	return false
 				// }
 				// }
 
 
-				if (this.objData.productRecycleList.length > 0) {
-					let bol
-					bol = this.objData.productRecycleList.every(e => {
-						return e.recycleQuantity >= 0 && e.warehouseId
-					})
-
-
-					if (!bol) {
-						uni.showToast({
-							title: '请选择副产品回收处置',
-							icon: 'none'
-						})
-						return false
-					}
 
 
-				}
 
 
 				// 预制体
 				// 预制体
 				if (this.objData.instanceList.length > 0) {
 				if (this.objData.instanceList.length > 0) {
@@ -553,6 +538,26 @@
 				}
 				}
 
 
 
 
+
+
+				if (this.objData.productRecycleList.length > 0) { // 副产品
+
+					// let bol
+					// bol = this.objData.productRecycleList.every(e => {
+					// 	return e.recycleQuantity >= 0 && e.warehouseId
+					// })
+					const isRecycle = await this.checkRecycle()
+					if (!isRecycle) {
+						return false
+					}
+				}
+
+
+
+
+
+
+
 				if (this.taskType == 4) {
 				if (this.taskType == 4) {
 					const isPack = await this.checkPack()
 					const isPack = await this.checkPack()
 
 
@@ -580,8 +585,8 @@
 
 
 
 
 				jobSave(this.objData).then(res => {
 				jobSave(this.objData).then(res => {
-					
-			
+
+
 					uni.hideLoading();
 					uni.hideLoading();
 
 
 					if (this.taskType == 4) {
 					if (this.taskType == 4) {
@@ -589,10 +594,10 @@
 							title: '提示',
 							title: '提示',
 							content: '打包完成是否去入库!',
 							content: '打包完成是否去入库!',
 							confirmText: '确认', //这块是确定按钮的文字
 							confirmText: '确认', //这块是确定按钮的文字
-							success: rr=> {
+							success: rr => {
 								if (rr.confirm) {
 								if (rr.confirm) {
 									uni.navigateTo({
 									uni.navigateTo({
-									url: `/pages/pda/warehousing/index?workOrderId=${this.id}&taskId=${this.taskId}&workReportId=${res}`
+										url: `/pages/pda/warehousing/index?workOrderId=${this.id}&taskId=${this.taskId}&workReportId=${res}`
 									})
 									})
 								} else {
 								} else {
 									uni.navigateBack()
 									uni.navigateBack()
@@ -616,6 +621,28 @@
 			},
 			},
 
 
 
 
+			checkRecycle() {
+				uni.hideLoading();
+
+				return new Promise((resolve) => {
+					uni.showModal({
+						title: '提示',
+						content: '是否跳过副产品回收处置!',
+						confirmText: '确认', //这块是确定按钮的文字
+						success: function(res) {
+							if (res.confirm) {
+								resolve(true)
+							} else {
+								resolve(false)
+							}
+						}
+					})
+
+				})
+
+			},
+
+
 			checkPack() {
 			checkPack() {
 				uni.hideLoading();
 				uni.hideLoading();
 				return new Promise((resolve) => {
 				return new Promise((resolve) => {