Browse Source

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

ag_report_nev
安虹睿 12 months ago
parent
commit
17cc11393b
  1. 4
      fe/PC/src/api/wms-job.js
  2. 25
      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({
url: baseURL + url + '/CompleteAsync/' + data.id,
url: baseURL + url + '/Complete/' + data.id,
method: 'post',
})
}

25
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,15 +251,16 @@ 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)})
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(res=>{
that.$successMsg('执行成功')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
.then(res3=>{
that.$successMsg('执行成功'+res3)
getDetailed(that.propsData.id, that.URL).then(res4 => {
that.propsData = res4
})
that.paging()
that.Loading.appMainLoading = false
@ -267,6 +268,10 @@ export const drawerMixins = {
.catch(err=>{
that.Loading.appMainLoading = false
})
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
})
.catch(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 => {

2
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'
},

Loading…
Cancel
Save