|
|
@ -98,10 +98,13 @@ |
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
import locationCompare from '@/mycomponents/location/locationCompare.vue' |
|
|
|
import comReceiptDetailCard from '@/pages/purchaseReceipt/coms/comReceiptDetailCard.vue' |
|
|
|
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
|
|
|
import { |
|
|
|
productDismantleJobClose |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
|
|
|
import { |
|
|
|
productDismantleJobClose |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
nextTick |
|
|
|
} from 'vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'receipt_detail', |
|
|
@ -137,7 +140,7 @@ |
|
|
|
|
|
|
|
onLoad(option) { |
|
|
|
this.id = option.id; |
|
|
|
// this.scanedPackingNumber = option.scaned || ''; |
|
|
|
this.scanedPackingNumber = option.scaned || ''; |
|
|
|
this.operation = option.operation; |
|
|
|
if (this.id != undefined) { |
|
|
|
//新建的任务自动接收 |
|
|
@ -219,13 +222,19 @@ |
|
|
|
that.jobStatus = res.data.status |
|
|
|
that.jobToLocationCode = that.subList[0].toLocationCode |
|
|
|
that.detailSource = getTreeDataSource(that.subList) |
|
|
|
that.detailSource.forEach(r => { |
|
|
|
r.subList.forEach(s => { |
|
|
|
if (this.scanedPackingNumber && this.scanedPackingNumber == s |
|
|
|
.packingNumber) s.scaned = true |
|
|
|
that.isAllReceived = false; |
|
|
|
nextTick(() => { |
|
|
|
that.detailSource.forEach(r => { |
|
|
|
r.subList.forEach(s => { |
|
|
|
if (this.scanedPackingNumber && this |
|
|
|
.scanedPackingNumber == s |
|
|
|
.packingNumber) { |
|
|
|
s.scaned = true |
|
|
|
this.$refs.scanPopup.simulateScan(s); |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
that.isAllReceived = false; |
|
|
|
} else { |
|
|
|
that.showMessage('列表数据为0'); |
|
|
|
} |
|
|
@ -395,11 +404,11 @@ |
|
|
|
} else if (this.scanCount < this.subList.length) { |
|
|
|
//扫描数量小于任务数量,判断是否允许部分提交 |
|
|
|
if (this.jobContent.allowPartialComplete == "TRUE") { |
|
|
|
//提交 |
|
|
|
this.$refs.comMessage.showQuestionMessage('还有未扫描的物料,是否继续提交?', res => { |
|
|
|
if (res) { |
|
|
|
this.submitJob(); |
|
|
|
} |
|
|
|
//提交 |
|
|
|
this.$refs.comMessage.showQuestionMessage('还有未扫描的物料,是否继续提交?', res => { |
|
|
|
if (res) { |
|
|
|
this.submitJob(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
//不允许部分提交,提示 |
|
|
@ -417,21 +426,21 @@ |
|
|
|
|
|
|
|
reject() { |
|
|
|
this.$refs.comMessage.showQuestionMessage('是否要拒收任务<br>[' + this.jobContent.asnNumber + ']?', res => { |
|
|
|
if (res) { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
productDismantleJobClose(this.id).then(res => { |
|
|
|
console.log('拒收',res) |
|
|
|
if (res.data) { |
|
|
|
navigateBack(1) |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.msg) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
if (res) { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
productDismantleJobClose(this.id).then(res => { |
|
|
|
console.log('拒收', res) |
|
|
|
if (res.data) { |
|
|
|
navigateBack(1) |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.msg) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
@ -459,11 +468,11 @@ |
|
|
|
title: "提交成功,将跳转到打印页面", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 获取上架任务 |
|
|
|
let timerCount = 0 |
|
|
|
const timer1 = setInterval(async ()=>{ |
|
|
|
if(timerCount == 15){ |
|
|
|
const timer1 = setInterval(async () => { |
|
|
|
if (timerCount == 15) { |
|
|
|
clearInterval(timer1) |
|
|
|
uni.showToast({ |
|
|
|
title: "跳转打印页面失败", |
|
|
@ -479,26 +488,33 @@ |
|
|
|
}], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000, |
|
|
|
}).then(res1=>{ |
|
|
|
}).then(res1 => { |
|
|
|
timerCount = timerCount + 1 |
|
|
|
if(res1.data && res1.data.list&&res1.data.list.length&&(res1.data.total >= res.data.detailCount)){ |
|
|
|
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(',') |
|
|
|
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)) |
|
|
|
url: '/pages/pointPutawayJob/index?data=' + |
|
|
|
encodeURIComponent(JSON |
|
|
|
.stringify(dataParams)) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
},2000) |
|
|
|
|
|
|
|
}, 2000) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|