From 17cc11393b92756f51a3e5d687e736e736170d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Mon, 13 May 2024 17:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=89=8D=E7=AB=AFpc=E3=80=91kitting?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=B0=81=E8=A3=85=E7=9B=B8=E5=85=B3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/api/wms-job.js | 4 +- fe/PC/src/mixins/drawerMixins.js | 37 +++++++++++-------- .../views/kittingManage/KittingIssueJob.vue | 2 +- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/fe/PC/src/api/wms-job.js b/fe/PC/src/api/wms-job.js index f5a37bc56..eafb8d86e 100644 --- a/fe/PC/src/api/wms-job.js +++ b/fe/PC/src/api/wms-job.js @@ -76,9 +76,9 @@ export function open(url, data) { } //任务流程——完成 -export function CompleteAsyncJob(url,data) { +export function CompleteJob(url,data) { return request({ - url: baseURL + url + '/CompleteAsync/' + data.id, + url: baseURL + url + '/Complete/' + data.id, method: 'post', }) } diff --git a/fe/PC/src/mixins/drawerMixins.js b/fe/PC/src/mixins/drawerMixins.js index 08037c38e..342c011bb 100644 --- a/fe/PC/src/mixins/drawerMixins.js +++ b/fe/PC/src/mixins/drawerMixins.js @@ -14,7 +14,7 @@ import { cancel, cancelAccept, open, - CompleteAsyncJob + CompleteJob } from '@/api/wms-job' export const drawerMixins = { data() { @@ -251,20 +251,25 @@ export const drawerMixins = { }).then(() => { that.Loading.appMainLoading = true getJobNumbersByRequestNumber(item.handleGetJobsUrl,this.propsData.number) - .then(res=>{ - console.log(res) + .then(res1=>{ let _numbers = [] - res.forEach(item=>{_numbers.push(item.number)}) - handleRequestIsHasNewJob((that.URL||item.handleRequestUrl),this.propsData.number,_numbers) - .then(res=>{ - that.$successMsg('执行成功') - getDetailed(that.propsData.id, that.URL).then(res => { - that.propsData = res - }) - that.paging() - that.Loading.appMainLoading = false - }) - .catch(err=>{ + res1.forEach(item=>{_numbers.push(item.number)}) + processRequest(that.propsData.id, that.URL + '/handle/') + .then(res2 => { + handleRequestIsHasNewJob((that.URL||item.handleRequestUrl),this.propsData.number,_numbers) + .then(res3=>{ + that.$successMsg('执行成功!'+res3) + getDetailed(that.propsData.id, that.URL).then(res4 => { + that.propsData = res4 + }) + that.paging() + that.Loading.appMainLoading = false + }) + .catch(err=>{ + that.Loading.appMainLoading = false + }) + }).catch(err => { + console.log(err) that.Loading.appMainLoading = false }) }) @@ -341,14 +346,14 @@ export const drawerMixins = { }); } // 新版独立操作 - else if(val == 'CompleteAsyncJob'){ + else if(val == 'CompleteJob'){ this.$confirm('是否确定完成任务?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { that.Loading.appMainLoading = true - CompleteAsyncJob(that.URL, {id: that.propsData.id}).then(res => { + CompleteJob(that.URL, {id: that.propsData.id}).then(res => { that.$successMsg('任务已完成') that.Loading.appMainLoading = false getDetailed(that.propsData.id, that.URL).then(res => { diff --git a/fe/PC/src/views/kittingManage/KittingIssueJob.vue b/fe/PC/src/views/kittingManage/KittingIssueJob.vue index fc1ade973..dea782e81 100644 --- a/fe/PC/src/views/kittingManage/KittingIssueJob.vue +++ b/fe/PC/src/views/kittingManage/KittingIssueJob.vue @@ -101,7 +101,7 @@ type: 'success', label: '完成', hide: false, - name: "CompleteAsyncJob", + name: "CompleteJob", hide: () => { return this.hideButton([1,2,4]) }, size: 'mini' },