From 0af78626a7ef168684f14ccc0da90f6f8a1b1978 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 20 Aug 2024 10:40:36 +0800 Subject: [PATCH] =?UTF-8?q?HL-5486PDA=E7=BF=BB=E5=8C=85=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 12 +++++++++- src/pages/package/job/overPackageJob.vue | 30 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/api/request2.js b/src/api/request2.js index c20c616f..a20af74d 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -2610,7 +2610,17 @@ export function deliverRequestClose(id) { data: {}, }); } - +/** + * 翻包任务 关闭任务 + * @param {*} params + */ +export function packageoverRequestClose(id) { + return request({ + url: baseApi + "/wms/packageover-job-main/close?id=" + id, + method: "put", + data: {}, + }); +} /** * 制品发货申请 提交审批 * @param {*} params diff --git a/src/pages/package/job/overPackageJob.vue b/src/pages/package/job/overPackageJob.vue index f1473476..f30f0323 100644 --- a/src/pages/package/job/overPackageJob.vue +++ b/src/pages/package/job/overPackageJob.vue @@ -34,6 +34,7 @@ import { cancleTakeOverPageJob, getOverPageJobList, + packageoverRequestClose } from '@/api/request2.js'; import { goHome, @@ -113,6 +114,14 @@ onReady() { this.detailOptions = getDetailOption(); this.detailGiveupOptions = getDetailGiveupOption(); + this.detailOptions = [...this.detailOptions,{ + text:"关闭", + style:{ + backgroundColor:"#F56C6C" + } + }] + console.log('this.detailGiveupOptions',this.detailGiveupOptions) + console.log('this.detailOptions',this.detailOptions) }, onReachBottom() { //避免多次触发 @@ -278,12 +287,33 @@ this.cancleJob(dataContent.masterId); } }); + } else if (e.content.text == "关闭") { + this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?", + res => { + if (res) { + this.closeJob(dataContent.masterId); + } + }); } }, openjobInfoPopup(item) { this.$refs.jobInfoPopup.openPopup(item) }, + closeJob(id){ + packageoverRequestClose(id).then(res => { + if(res.data){ + this.getList("refresh") + uni.showToast({ + title:"关闭任务成功" + }) + }else { + this.showMessage("关闭任务失败") + } + }).catch(error => { + this.showMessage(error) + }) + }, cancleJob(id) { cancleTakeOverPageJob(id).then(res => {