|
|
@ -55,7 +55,7 @@ import { ref, getCurrentInstance, nextTick } from 'vue' |
|
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
|
import { purchaseReceiptJobSubmit, getPurchaseReceiptJobDetail, takePurchaseReceiptJob, cancleTakePurchaseReceiptJob, productDismantleJobClose, getPutawayJobList } from '@/api/request2.js' |
|
|
|
|
|
|
|
import { goHome, getCurrDateTime, getPackingNumberAndBatch, compareAsc, navigateBack } from '@/common/basic.js' |
|
|
|
import { goHome, getCurrDateTime, getPackingNumberAndBatch, compareAsc, navigateBack, getSwitchInfoByCode } from '@/common/basic.js' |
|
|
|
|
|
|
|
import { getDirectoryItemArray } from '@/common/directory.js' |
|
|
|
|
|
|
@ -91,6 +91,7 @@ const isAllReceived = ref(false) |
|
|
|
const operation = ref('') |
|
|
|
const scanedPackingNumber = ref('') |
|
|
|
const status = ref('') |
|
|
|
const switchCode = ref('') |
|
|
|
const comMessageRef = ref() |
|
|
|
const locationCompareRef = ref() |
|
|
|
const scanPopup = ref() |
|
|
@ -101,6 +102,7 @@ onLoad((option) => { |
|
|
|
scanedPackingNumber.value = option.scaned || '' |
|
|
|
status.value = option.status || '' |
|
|
|
operation.value = option.operation |
|
|
|
switchCode.value = 'purchasereceiptPrintPDA' |
|
|
|
}) |
|
|
|
|
|
|
|
onShow(() => { |
|
|
@ -182,6 +184,7 @@ const getDetail = () => { |
|
|
|
s.cancleScanedHiht = true |
|
|
|
s.copyContent = `HPQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}` |
|
|
|
scanPopup.value.simulateScan(s) |
|
|
|
scanedPackingNumber.value = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -391,50 +394,57 @@ const submitJob = () => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
// showCommitSuccessMessage(`提交成功<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 += 1 |
|
|
|
if (res1.data && res1.data.list && res1.data.list.length && res1.data.total >= res.data.detailCount) { |
|
|
|
uni.hideLoading() |
|
|
|
const isCheckPrint = getSwitchInfoByCode(switchCode.value) |
|
|
|
if (!isCheckPrint) { |
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
showCommitSuccessMessage(`提交成功<br>生成采购收货记录<br>${res.data.number}`) |
|
|
|
} else { |
|
|
|
uni.showLoading({ |
|
|
|
title: '提交成功,将跳转到打印页面', |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
// 获取上架任务 |
|
|
|
let timerCount = 0 |
|
|
|
const timer1 = setInterval(async () => { |
|
|
|
if (timerCount == 15) { |
|
|
|
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))}` |
|
|
|
uni.showToast({ |
|
|
|
title: '跳转打印页面失败', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
await getPutawayJobList({ |
|
|
|
filters: [ |
|
|
|
{ |
|
|
|
column: 'purchaseReceiptRecordNumber', |
|
|
|
action: 'in', |
|
|
|
value: res.data.number |
|
|
|
} |
|
|
|
], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000 |
|
|
|
}).then((res1) => { |
|
|
|
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 { |
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
} |
|
|
|