|
|
@@ -517,22 +517,7 @@
|
|
|
// 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) {
|
|
|
@@ -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) {
|
|
|
const isPack = await this.checkPack()
|
|
|
|
|
|
@@ -580,8 +585,8 @@
|
|
|
|
|
|
|
|
|
jobSave(this.objData).then(res => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
uni.hideLoading();
|
|
|
|
|
|
if (this.taskType == 4) {
|
|
|
@@ -589,10 +594,10 @@
|
|
|
title: '提示',
|
|
|
content: '打包完成是否去入库!',
|
|
|
confirmText: '确认', //这块是确定按钮的文字
|
|
|
- success: rr=> {
|
|
|
+ success: rr => {
|
|
|
if (rr.confirm) {
|
|
|
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 {
|
|
|
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() {
|
|
|
uni.hideLoading();
|
|
|
return new Promise((resolve) => {
|