|
|
@ -73,7 +73,8 @@ |
|
|
|
getCurrDateTime, |
|
|
|
getPackingNumberAndBatch, |
|
|
|
compareAsc, |
|
|
|
navigateBack |
|
|
|
navigateBack, |
|
|
|
getSwitchInfoByCode |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -134,7 +135,8 @@ |
|
|
|
isAllReceived: false, |
|
|
|
operation: '', |
|
|
|
scanedPackingNumber: '', |
|
|
|
status:'' |
|
|
|
status:'', |
|
|
|
switchCode:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -143,7 +145,10 @@ |
|
|
|
this.id = option.id; |
|
|
|
this.scanedPackingNumber = option.scaned || ''; |
|
|
|
this.operation = option.operation; |
|
|
|
this.status = option.status; |
|
|
|
this.status = option.status; |
|
|
|
this.switchCode = "purchasereceiptPrintPDA" |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onShow(){ |
|
|
@ -471,60 +476,71 @@ |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams() |
|
|
|
purchaseReceiptJobSubmit(params).then(res => { |
|
|
|
if (res.data) { |
|
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录<br><br>将跳转到打印页面<br>" + res.data) |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交成功,将跳转到打印页面", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
// 获取上架任务 |
|
|
|
let timerCount = 0 |
|
|
|
const timer1 = setInterval(async () => { |
|
|
|
if (timerCount == 15) { |
|
|
|
clearInterval(timer1) |
|
|
|
uni.showToast({ |
|
|
|
title: "跳转打印页面失败", |
|
|
|
icon: "none" |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
await getPutawayJobList({ |
|
|
|
filters: [{ |
|
|
|
column: "purchaseReceiptRecordNumber", |
|
|
|
action: "in", |
|
|
|
value: res.data.number |
|
|
|
}], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000, |
|
|
|
}).then(res1 => { |
|
|
|
timerCount = timerCount + 1 |
|
|
|
if (res1.data && res1.data.list && res1.data |
|
|
|
.list.length && (res1.data.total >= res |
|
|
|
.data.detailCount)) { |
|
|
|
uni.hideLoading() |
|
|
|
clearInterval(timer1) |
|
|
|
const dataParams = { |
|
|
|
toLocationCode: res1.data.list[0] |
|
|
|
.toLocationCode, |
|
|
|
number: res1.data.list[0].number, |
|
|
|
creator: res1.data.list[0].creator, |
|
|
|
createTime: res1.data.list[0] |
|
|
|
.createTime, |
|
|
|
ids: res1.data.list.map(item => |
|
|
|
item.masterId).join(',') |
|
|
|
} |
|
|
|
console.log(dataParams) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/pointPutawayJob/index?data=' + |
|
|
|
encodeURIComponent(JSON |
|
|
|
.stringify(dataParams)) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
|
|
|
|
purchaseReceiptJobSubmit(params).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
if (res.data) { |
|
|
|
let isCheckPrint = getSwitchInfoByCode(this.switchCode) |
|
|
|
if(!isCheckPrint){ |
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成采购收货记录<br>" + res.data.number) |
|
|
|
}else{ |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交成功,将跳转到打印页面", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
// 获取上架任务 |
|
|
|
let timerCount = 0 |
|
|
|
const timer1 = setInterval(async () => { |
|
|
|
if (timerCount == 15) { |
|
|
|
clearInterval(timer1) |
|
|
|
uni.showToast({ |
|
|
|
title: "跳转打印页面失败", |
|
|
|
icon: "none" |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
await getPutawayJobList({ |
|
|
|
filters: [{ |
|
|
|
column: "purchaseReceiptRecordNumber", |
|
|
|
action: "in", |
|
|
|
value: res.data.number |
|
|
|
}], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000, |
|
|
|
}).then(res1 => { |
|
|
|
timerCount = timerCount + 1 |
|
|
|
if (res1.data && res1.data.list && res1.data |
|
|
|
.list.length && (res1.data.total >= res |
|
|
|
.data.detailCount)) { |
|
|
|
uni.hideLoading() |
|
|
|
clearInterval(timer1) |
|
|
|
const dataParams = { |
|
|
|
toLocationCode: res1.data.list[0] |
|
|
|
.toLocationCode, |
|
|
|
number: res1.data.list[0].number, |
|
|
|
creator: res1.data.list[0].creator, |
|
|
|
createTime: res1.data.list[0] |
|
|
|
.createTime, |
|
|
|
ids: res1.data.list.map(item => |
|
|
|
item.masterId).join(',') |
|
|
|
} |
|
|
|
console.log(dataParams) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/pointPutawayJob/index?data=' + |
|
|
|
encodeURIComponent(JSON |
|
|
|
.stringify(dataParams)) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
@ -677,9 +693,10 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
|
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
// navigateBack(1) |
|
|
|
navigateBack(1) |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|