From 4b7763fcfd84b51ffd186a196ff2e02825152b83 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 5 Jul 2024 16:44:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=80=E6=96=99=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E4=B9=8B=E5=89=8D=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/api/claimAndRefund/return.js | 8 ++++ .../return/receive/component/handlePage.vue | 39 ++++++++++++------- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/sgzb-ui/src/api/claimAndRefund/return.js b/sgzb-ui/src/api/claimAndRefund/return.js index e5255680..b41c5c92 100644 --- a/sgzb-ui/src/api/claimAndRefund/return.js +++ b/sgzb-ui/src/api/claimAndRefund/return.js @@ -218,6 +218,14 @@ export function getRecord(query) { params: query }) } +// 退料完成之前 判断所有设备是否全部操作退料 +export function endBackBeforeQueryApi(query) { + return request({ + url: 'backReceive/getReceiveViewWebNum', + method: 'post', + query + }) +} // 退料接收 撤回操作 export function revoke(data) { diff --git a/sgzb-ui/src/views/claimAndreturn/return/receive/component/handlePage.vue b/sgzb-ui/src/views/claimAndreturn/return/receive/component/handlePage.vue index 58854589..03030565 100644 --- a/sgzb-ui/src/views/claimAndreturn/return/receive/component/handlePage.vue +++ b/sgzb-ui/src/views/claimAndreturn/return/receive/component/handlePage.vue @@ -693,6 +693,7 @@ import { getRecord, endBack, revoke, + endBackBeforeQueryApi, } from '@/api/claimAndRefund/return' import { getTypeList } from '@/api/store/warehousing' import { equipmentTypeTree } from '@/api/store/tools' @@ -907,24 +908,32 @@ export default { }, //完成退料接收 async completeBack() { - let param1 = { + // let param1 = { + // parentId: this.queryParams.id, + // } + // const res1 = await getRecord(param1) + const { data: res } = await endBackBeforeQueryApi({ + id: this.queryParams.id, + }) + + if (res == 0) { + this.$message.error( + '当前存在未退料机具,请处理之后再点击完成退料!', + ) + return + } + let param = { + createBy: this.createBy, parentId: this.queryParams.id, + taskId: this.queryParams.taskId, } - const res1 = await getRecord(param1) - if (res1.code == 200) { - let param = { - createBy: this.createBy, - parentId: this.queryParams.id, - taskId: this.queryParams.taskId, + endBack(param).then((response) => { + if (response.code == 200) { + this.$modal.msgSuccess('操作成功') + // this.back() + this.$emit('goBackPage') } - endBack(param).then((response) => { - if (response.code == 200) { - this.$modal.msgSuccess('操作成功') - // this.back() - this.$emit('goBackPage') - } - }) - } + }) }, //查看数据 handleViewCode(row) {