|
|
@ -25,7 +25,9 @@ import { getRepleinshJobList, cancleTakeRepleinshJob, closeTakeRepleinshJob } fr |
|
|
|
import { goHome, updateTitle } from '@/common/basic.js' |
|
|
|
|
|
|
|
import { getDetailOption, getDetailGiveupOption, getDetailCloseOption } from '@/common/array.js' |
|
|
|
|
|
|
|
import { |
|
|
|
getBusinessType |
|
|
|
} from '@/common/record.js'; |
|
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
|
|
|
|
@ -59,7 +61,11 @@ const filter = ref() |
|
|
|
const comMessageRef = ref() |
|
|
|
const jobInfoPopupRef = ref() |
|
|
|
const jobListPopupRef = ref() |
|
|
|
|
|
|
|
const businessTypeCode = ref('Repleinment') |
|
|
|
const businessType = ref(null) |
|
|
|
const scanBalance = ref({}) |
|
|
|
const outInventoryStatus = ref("") |
|
|
|
const inInventoryStatus = ref("") |
|
|
|
onShow(() => { |
|
|
|
nextTick(() => { |
|
|
|
getList('refresh') |
|
|
@ -67,6 +73,7 @@ onShow(() => { |
|
|
|
}) |
|
|
|
onLoad((option) => { |
|
|
|
title.value = option.title |
|
|
|
getBusinessTypeFunc() |
|
|
|
}) |
|
|
|
onReady(() => { |
|
|
|
detailOptions.value = getDetailOption() |
|
|
@ -310,14 +317,28 @@ const showMessage = (message) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
const openScanPopup = () => { |
|
|
|
scanPopup.value.openScanPopup() |
|
|
|
if (businessType.value == null) { |
|
|
|
getBusinessTypeFunc() |
|
|
|
} else { |
|
|
|
scanPopup.value.openScanPopup(businessType.value) |
|
|
|
} |
|
|
|
} |
|
|
|
const selectItem = (item) => { |
|
|
|
scanPopup.value.closeScanPopup() |
|
|
|
openJobDetail(item, scanMessage.value) |
|
|
|
} |
|
|
|
const getScanResult = (result) => { |
|
|
|
scanMessage.value = '' |
|
|
|
let balance = result.balance; |
|
|
|
if (balance != null) { |
|
|
|
scanMessage.value = "" |
|
|
|
if (!result.label.batch) { |
|
|
|
this.showMessage("批次为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!result.label.itemCode) { |
|
|
|
this.showMessage("物料号为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!result.label.batch) { |
|
|
|
showMessage('批次为空') |
|
|
|
return |
|
|
@ -347,6 +368,11 @@ const getScanResult = (result) => { |
|
|
|
column: 'accept_user_id', |
|
|
|
action: '==', |
|
|
|
value: store.id |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: balance.locationCode |
|
|
|
} |
|
|
|
] |
|
|
|
getRepleinshJobList({ |
|
|
@ -384,6 +410,19 @@ const getScanResult = (result) => { |
|
|
|
showMessage(e.message) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const getBusinessTypeFunc = ()=> { |
|
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.businessType = res.businessType; |
|
|
|
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); |
|
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
|
|
|
// this.openScanPopup(); |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.message) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"></style> |
|
|
|