From 6fb4635cafa48eeeed43d07d6992c1493bc678cf Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 14 Feb 2025 13:27:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E7=BB=99=E5=93=81=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 12 +++- .../issueSupplies/job/issueDetailBatch.vue | 57 ++++--------------- src/pages/issueSupplies/job/issueJob.vue | 8 ++- 3 files changed, 27 insertions(+), 50 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index 925c5fca..a6a9c1c6 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -1621,7 +1621,17 @@ export function issueJobSubmit(params) { data: params, }); } - +/** + * 补给品发料任务 提交 + * @param {*} params + */ +export function issueJobEopSubmit(params) { + return request({ + url: baseApi + "/wms/issue-job-main/executeEop", + method: "put", + data: params, + }); +} /** * 生产收料 任务列表 diff --git a/src/pages/issueSupplies/job/issueDetailBatch.vue b/src/pages/issueSupplies/job/issueDetailBatch.vue index c4f3535b..bbb2baf0 100644 --- a/src/pages/issueSupplies/job/issueDetailBatch.vue +++ b/src/pages/issueSupplies/job/issueDetailBatch.vue @@ -49,7 +49,7 @@ takeIssueJob, cancleTakeIssueJob, getIssueJobDetail, - issueJobSubmit, + issueJobEopSubmit, issueCheck, getBalanceByFilter } from '@/api/request2.js'; @@ -250,6 +250,7 @@ } detail.scaned = true } + this.continueScan() }, //继续扫描 @@ -261,52 +262,16 @@ this.scanPopupGetFocus(); } }, - - submit() { - uni.showLoading({ - title: "提交中....", - mask: true - }); - //目前任务只到一个库位 - var itemCodes = [] - let locationCode = this.toLocationCode - this.detailSource.forEach(toLocation => { - itemCodes.push(toLocation.itemCode) - }) - - //获取管理模式,封装参数 - getManagementPrecisions(itemCodes, locationCode, res => { - if (res.success) { - this.managementList = res.list; - this.submitJob(); - } else { - uni.hideLoading(); - this.showErrorMessage(res.message); - } - }); - + scanPopupGetFocus (){ + if (this.$refs.scanPopup ) { + this.$refs.scanPopup.packGetFocus(); + } }, submitJob() { - var params = this.setParams() - - // if (!params.subList || params.subList.length == 0) { - // uni.hideLoading() - // this.showErrorMessage("请扫描您需要提交的发料任务") - // return - // } - const isTrue = params.subList.some(item=>{ - return item.recordList.some(cur=>cur.scaned) == true - }) - - if(!isTrue){ - uni.hideLoading() - this.showErrorMessage("请扫描您需要提交的发料任务") - return - } - - console.log("提交参数", params); - issueJobSubmit(params).then(res => { + debugger + // var params = this.setParams() + issueJobEopSubmit(this.detailSource).then(res => { uni.hideLoading() if (res.data) { this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data) @@ -451,7 +416,7 @@ this.str1 = this.str1.substring(0,this.str1.length - 1) this.showErrorMessage(`${str1}库存不足`) }else{ - this.submit() + this.submitJob() } } }).catch(err => { @@ -511,7 +476,7 @@ }, closeScanPopup() { - // this.updateCommitBtn(); + this.$refs.scanPopup.closeScanPopup() }, confirmFromLocation(fromLocationCodeParams){ this.fromLocationCode = fromLocationCodeParams diff --git a/src/pages/issueSupplies/job/issueJob.vue b/src/pages/issueSupplies/job/issueJob.vue index 1bf97f69..42967dc9 100644 --- a/src/pages/issueSupplies/job/issueJob.vue +++ b/src/pages/issueSupplies/job/issueJob.vue @@ -464,7 +464,7 @@ .acceptUserName + "]承接,无法执行", res => { if (res) { if (this.$refs.scanPopup) { - this.$refs.scanPopup.getfocus() + this.$refs.scanPopup.packGetFocus() } this.getList('refresh') } @@ -491,7 +491,7 @@ this.$refs.comMessage.showErrorMessage(message, res => { if (res) { if (this.$refs.scanPopup) { - this.$refs.scanPopup.getfocus() + this.$refs.scanPopup.packGetFocus() } } }); @@ -545,7 +545,9 @@ this.selectItem(list[0]) } } else { - this.queryByItemCode(result) + uni.hideLoading() + // this.queryByItemCode(result) + this.showMessage('未查找到' + '【' + result.label.code + '】的发料任务'); } }).catch(error => { uni.hideLoading()