From c318e9f47bc8788f8b18fc9416c55f34fa1879a9 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 2 Sep 2024 19:51:32 +0800 Subject: [PATCH] =?UTF-8?q?HL-5725=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseReceipt/job/receiptDetail.vue | 174 +++++++++--------- src/pages/putaway/job/putawayDetail.vue | 15 +- 2 files changed, 96 insertions(+), 93 deletions(-) diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index dbc696f3..66662c4b 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -517,93 +517,93 @@ this.managementList = res.list; var params = this.setParams(); let that =this - purchaseReceiptJobSubmit(params).then(res => { - if (res.data) { - let isCheckPrint = getSwitchInfoByCode(this.switchCode) - if (!isCheckPrint) { - uni.hideLoading() - - // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number) - uni.redirectTo({ - url: '/pages/pointPutawayJob/index?number='+that.jobContent.number - }) - } else { - // if (res.data == '打印任务已发送,等待打印机处理!') { - // this.showCommitSuccessMessage(res.data) - // const purchaseReceiptDetailPointParams = { - // printDeafult: this.printDeafult, - // templateDeafult: this.templateDeafult, - // } - // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams) - // } else { - // this.showErrorMessage(res.data) - // } - uni.showLoading({ - title: "提交成功,将跳转到打印页面", - mask: true - }); - - // 获取上架任务 - let timerCount = 0 - const timer1 = setInterval(async () => { - if (timerCount == 15) { - clearInterval(timer1) - this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请") - return; - } - await getPutawayJobList({ - filters: [{ - column: "purchaseReceiptRecordNumber", - action: "in", - value: res.data.number - }], - pageNo: 1, - pageSize: 1000, - }).then(res1 => { - timerCount = timerCount + 1 - if (res1.data && res1.data.list && res1 - .data - .list.length && (res1.data.total >= res - .data.detailCount)) { - uni.hideLoading() - clearInterval(timer1) - const dataParams = { - toLocationCode: res1.data.list[ - 0] - .toLocationCode, - number: res1.data.list[0] - .number, - creator: res1.data.list[0] - .creator, - createTime: res1.data.list[0] - .createTime, - ids: res1.data.list.map(item => - item.masterId).join( - ',') - } - console.log(dataParams) - uni.hideLoading() - uni.redirectTo({ - url: '/pages/pointPutawayJob/index?number='+that.jobContent.number+'&data=' + - encodeURIComponent(JSON.stringify(dataParams)) - }) - } - }) - }, 2000) - - } - - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.$refs.comMessage.showErrorMessage(error, res => { - if (res) { - navigateBack(1) - } - }); - }) + // purchaseReceiptJobSubmit(params).then(res => { + // if (res.data) { + // let isCheckPrint = getSwitchInfoByCode(this.switchCode) + // if (!isCheckPrint) { + // uni.hideLoading() + + // // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number) + // uni.redirectTo({ + // url: '/pages/pointPutawayJob/index?number='+that.jobContent.number + // }) + // } else { + // // if (res.data == '打印任务已发送,等待打印机处理!') { + // // this.showCommitSuccessMessage(res.data) + // // const purchaseReceiptDetailPointParams = { + // // printDeafult: this.printDeafult, + // // templateDeafult: this.templateDeafult, + // // } + // // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams) + // // } else { + // // this.showErrorMessage(res.data) + // // } + // uni.showLoading({ + // title: "提交成功,将跳转到打印页面", + // mask: true + // }); + + // // 获取上架任务 + // let timerCount = 0 + // const timer1 = setInterval(async () => { + // if (timerCount == 15) { + // clearInterval(timer1) + // this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请") + // return; + // } + // await getPutawayJobList({ + // filters: [{ + // column: "purchaseReceiptRecordNumber", + // action: "in", + // value: res.data.number + // }], + // pageNo: 1, + // pageSize: 1000, + // }).then(res1 => { + // timerCount = timerCount + 1 + // if (res1.data && res1.data.list && res1 + // .data + // .list.length && (res1.data.total >= res + // .data.detailCount)) { + // uni.hideLoading() + // clearInterval(timer1) + // const dataParams = { + // toLocationCode: res1.data.list[ + // 0] + // .toLocationCode, + // number: res1.data.list[0] + // .number, + // creator: res1.data.list[0] + // .creator, + // createTime: res1.data.list[0] + // .createTime, + // ids: res1.data.list.map(item => + // item.masterId).join( + // ',') + // } + // console.log(dataParams) + // uni.hideLoading() + // uni.redirectTo({ + // url: '/pages/pointPutawayJob/index?number='+that.jobContent.number+'&data=' + + // encodeURIComponent(JSON.stringify(dataParams)) + // }) + // } + // }) + // }, 2000) + + // } + + // } else { + // this.showErrorMessage("提交失败[" + res.msg + "]") + // } + // }).catch(error => { + // uni.hideLoading() + // this.$refs.comMessage.showErrorMessage(error, res => { + // if (res) { + // navigateBack(1) + // } + // }); + // }) } else { uni.hideLoading(); this.showErrorMessage(res.message); diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index 2c3eb71f..68c1013c 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -16,7 +16,7 @@ @@ -43,7 +43,6 @@ --> @@ -194,6 +193,10 @@ if (res.data.subList.length > 0) { that.jobContent = res.data; that.jobStatus = res.data.status + //赋值给真实的状态 + res.data.subList.forEach(item => { + item.inventoryStatus = item.inspectResult + }) that.subList = res.data.subList; that.detailSource = getTreeDataSource(that.subList) that.fromLocationCode = that.subList[0].fromLocationCode @@ -461,10 +464,10 @@ } else { //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { - if (res) { - this.openScanPopup(); - } - }); + if (res) { + this.openScanPopup(); + } + }); } } },