Browse Source

【前端pc】kitting操作封装相关修改

ag_report_nev
安虹睿 12 months ago
parent
commit
17cc11393b
  1. 4
      fe/PC/src/api/wms-job.js
  2. 37
      fe/PC/src/mixins/drawerMixins.js
  3. 2
      fe/PC/src/views/kittingManage/KittingIssueJob.vue

4
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({ return request({
url: baseURL + url + '/CompleteAsync/' + data.id, url: baseURL + url + '/Complete/' + data.id,
method: 'post', method: 'post',
}) })
} }

37
fe/PC/src/mixins/drawerMixins.js

@ -14,7 +14,7 @@ import {
cancel, cancel,
cancelAccept, cancelAccept,
open, open,
CompleteAsyncJob CompleteJob
} from '@/api/wms-job' } from '@/api/wms-job'
export const drawerMixins = { export const drawerMixins = {
data() { data() {
@ -251,20 +251,25 @@ export const drawerMixins = {
}).then(() => { }).then(() => {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
getJobNumbersByRequestNumber(item.handleGetJobsUrl,this.propsData.number) getJobNumbersByRequestNumber(item.handleGetJobsUrl,this.propsData.number)
.then(res=>{ .then(res1=>{
console.log(res)
let _numbers = [] let _numbers = []
res.forEach(item=>{_numbers.push(item.number)}) res1.forEach(item=>{_numbers.push(item.number)})
handleRequestIsHasNewJob((that.URL||item.handleRequestUrl),this.propsData.number,_numbers) processRequest(that.propsData.id, that.URL + '/handle/')
.then(res=>{ .then(res2 => {
that.$successMsg('执行成功') handleRequestIsHasNewJob((that.URL||item.handleRequestUrl),this.propsData.number,_numbers)
getDetailed(that.propsData.id, that.URL).then(res => { .then(res3=>{
that.propsData = res that.$successMsg('执行成功!'+res3)
}) getDetailed(that.propsData.id, that.URL).then(res4 => {
that.paging() that.propsData = res4
that.Loading.appMainLoading = false })
}) that.paging()
.catch(err=>{ that.Loading.appMainLoading = false
})
.catch(err=>{
that.Loading.appMainLoading = false
})
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
}) })
@ -341,14 +346,14 @@ export const drawerMixins = {
}); });
} }
// 新版独立操作 // 新版独立操作
else if(val == 'CompleteAsyncJob'){ else if(val == 'CompleteJob'){
this.$confirm('是否确定完成任务?', '提示', { this.$confirm('是否确定完成任务?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
that.Loading.appMainLoading = true 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.$successMsg('任务已完成')
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => { getDetailed(that.propsData.id, that.URL).then(res => {

2
fe/PC/src/views/kittingManage/KittingIssueJob.vue

@ -101,7 +101,7 @@
type: 'success', type: 'success',
label: '完成', label: '完成',
hide: false, hide: false,
name: "CompleteAsyncJob", name: "CompleteJob",
hide: () => { return this.hideButton([1,2,4]) }, hide: () => { return this.hideButton([1,2,4]) },
size: 'mini' size: 'mini'
}, },

Loading…
Cancel
Save