diff --git a/src/api/request2.js b/src/api/request2.js index ffeb1630..2eb8b4c7 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -821,6 +821,10 @@ export function putawayRecordSubmit(params) { export function getIssueJobList(params) { return http.post("/wms/issue-job-detail/senior",params) } + +export function getIssueJobByProductionline() { + return http.get("/issue-job-mwmsain/getIssueJobByProductionline") +} /** * 发料任务明细 * @param {*} 任务id diff --git a/src/common/balance.js b/src/common/balance.js index a74cb3f0..9565bca8 100644 --- a/src/common/balance.js +++ b/src/common/balance.js @@ -134,6 +134,54 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) { callback(result); }) } +//通过父包装查询 +export function getBalanceByManagementPrecisionByPacking(label, packageInfo,locationCode, fromInventoryStatuses, callback) { + let result = { + list: [], + success: true, + message: '' + }; + let params = { + itemCodes: [label.itemCode], + locationCode: locationCode + }; + // let jsonParem = JSON.stringify(param) + getManagementPrecision(params).then(res => { + let managementPrecision = res.data[0].ManagementPrecision; + switch (managementPrecision) { + case 'BY_PACKAGING': + byPacking(label, packageInfo,locationCode, fromInventoryStatuses, res => { + res.managementPrecision = managementPrecision; + callback(res); + }); + break; + case 'BY_BATCH': + byBatch(label, locationCode, fromInventoryStatuses, res => { + res.managementPrecision = managementPrecision; + callback(res); + }); + break; + case 'BY_QUANTITY': + byQuantity(label, locationCode, fromInventoryStatuses, res => { + res.managementPrecision = managementPrecision; + callback(res); + }); + break; + case 'BY_UNIQUEID': + byUniqueId(label, fromInventoryStatuses, res => { + res.managementPrecision = managementPrecision; + callback(res); + }); + break; + } + }).catch(error => { + let result = { + success: false, + message: error + }; + callback(result); + }) +} export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { @@ -154,7 +202,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento let managementPrecision = res.data[0].ManagementPrecision; switch (managementPrecision) { case 'BY_PACKAGING': - byPacking(label, locationCode, fromInventoryStatuses, res => { + byPacking(label, "", locationCode, fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); @@ -199,6 +247,20 @@ export function byPacking(label, locationCode, fromInventoryStatuses, callback) data: {} }; var filters = [] + if (packageInfo&&packageInfo.parentNumber) { + var packingNumber = packageInfo.parentNumber + "," + label.packingNumber; + filters.push({ + column: "packingNumber", + action: "in", + value: packingNumber + }) + } else { + filters.push({ + column: "packingNumber", + action: "==", + value: label.packingNumber + }) + } filters.push({ column: "packingNumber", action: "==", diff --git a/src/mycomponents/balance/balance.vue b/src/mycomponents/balance/balance.vue index ac489bc6..a551224b 100644 --- a/src/mycomponents/balance/balance.vue +++ b/src/mycomponents/balance/balance.vue @@ -2,6 +2,7 @@ + diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue index 8c2b29cc..06c530cb 100644 --- a/src/mycomponents/job/jobFilter.vue +++ b/src/mycomponents/job/jobFilter.vue @@ -13,7 +13,8 @@ 生产线 - + + 来源库位 @@ -68,6 +69,10 @@ const props = defineProps({ isShowProductionLineCode: { type: Boolean, default: false + }, + productionline: { + type: Array, + default: [] } }) const dataContent = ref({}) diff --git a/src/mycomponents/jobList/jobList.vue b/src/mycomponents/jobList/jobList.vue index 0b54e7ee..35e424c6 100644 --- a/src/mycomponents/jobList/jobList.vue +++ b/src/mycomponents/jobList/jobList.vue @@ -23,13 +23,15 @@ import { ref } from 'vue' const list = ref([]) const show = ref(false) -const openList = (listParmas) => { +const isScanedASN = ref(false) +const openList = (listParmas, isScanedASNParmas = false) => { list.value = listParmas + isScanedASN.value = isScanedASNParmas show.value = true } const selectItem = (item, index) => { show.value = false - emit('selectItem', item) + emit('selectItem', item, isScanedASN.value) } // 传递给父类 diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index c2534e03..ad1aa8fe 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -44,7 +44,7 @@ import { ref, getCurrentInstance } from 'vue' import winComScan from '@/mycomponents/scan/winComScan.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' -import { getBalanceByManagementPrecision } from '@/common/balance.js' +import { getBalanceByManagementPrecisionByPacking } from '@/common/balance.js' import { getBasicLocationByCode } from '@/api/request2.js' @@ -210,10 +210,12 @@ const scanLocation = (scanResult) => { // this.packGetFocus(); checkPackage(scanResult) } else { + uni.hideLoading() const hint = getListLocationAreaTypeDesc(fromLocationAreaTypeList.value) showErrorMessage(`扫描库位[${fromLocationCode.value}]是[${getLocationAreaTypeName(result.areaType)}],需要的库区是[${hint}]`) } } else { + uni.hideLoading() showErrorMessage(`扫描库位[${fromLocationCode.value}]不可用`, (res) => { locationGetFocus() }) @@ -254,7 +256,7 @@ const checkPackage = (result) => { // mask: true // }) if (props.queryBalance == true) { - getBalanceByManagementPrecision(result.label, fromLocationCode.value, props.balanceFromInventoryStatuses ? fromInventoryStatuses.value : undefined, (res) => { + getBalanceByManagementPrecisionByPacking(result.label, fromLocationCode.value, props.balanceFromInventoryStatuses ? fromInventoryStatuses.value : undefined, (res) => { uni.hideLoading() if (res.success) { managementPrecision.value = res.managementPrecision @@ -267,6 +269,7 @@ const checkPackage = (result) => { // uni.hideLoading(); }) } else { + uni.hideLoading() packCallBack(null) } } diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index 8103d1fa..a3c7bc94 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -1,7 +1,7 @@