diff --git a/common/balance.js b/common/balance.js index 6e72e2cf..827b4067 100644 --- a/common/balance.js +++ b/common/balance.js @@ -38,7 +38,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) { }) } -export function getBalanceByManagementPrecision(label, locationCode, callback) { +export function getBalanceByManagementPrecision(label, locationCode,fromInventoryStatuses, callback) { let result = { list: [], success: true, @@ -53,25 +53,25 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) { let managementPrecision = res.data[0].ManagementPrecision; switch (managementPrecision) { case 'BY_PACKAGING': - byPacking(label, locationCode, res => { + byPacking(label, locationCode,fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_BATCH': - byBatch(label, locationCode, res => { + byBatch(label, locationCode,fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_QUANTITY': - byQuantity(label, locationCode, res => { + byQuantity(label, locationCode,fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_UNIQUEID': - byUniqueId(label, res => { + byUniqueId(label,fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); @@ -90,7 +90,7 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byPacking(label, locationCode, callback) { +export function byPacking(label, locationCode,fromInventoryStatuses, callback) { let result = { success: true, message: '', @@ -98,12 +98,12 @@ export function byPacking(label, locationCode, callback) { }; var filters = [] filters.push({ - column: "packing_number", + column: "packingNumber", action: "==", value: label.packingNumber }) filters.push({ - column: "item_code", + column: "itemCode", action: "==", value: label.itemCode }) @@ -113,10 +113,18 @@ export function byPacking(label, locationCode, callback) { value: label.batch }) filters.push({ - column: "location_code", + column: "locationCode", action: "==", value: locationCode }) + if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + filters.push({ + column: "inventoryStatus", + action: "in", + value: fromInventoryStatuses + }) + } + var params = { filters: filters, @@ -149,10 +157,10 @@ export function byPacking(label, locationCode, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byBatch(label, locationCode, callback) { +export function byBatch(label, locationCode,fromInventoryStatuses, callback) { var filters = [] filters.push({ - column: "item_code", + column: "itemCode", action: "==", value: label.itemCode }) @@ -162,10 +170,18 @@ export function byBatch(label, locationCode, callback) { value: label.batch }) filters.push({ - column: "location_code", + column: "locationCode", action: "==", value: locationCode }) + + if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + filters.push({ + column: "inventoryStatus", + action: "in", + value: fromInventoryStatuses + }) + } var params = { filters: filters, @@ -202,7 +218,7 @@ export function byBatch(label, locationCode, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byQuantity(label, locationCode, callback) { +export function byQuantity(label, locationCode,fromInventoryStatuses, callback) { let result = { success: true, message: '', @@ -211,15 +227,23 @@ export function byQuantity(label, locationCode, callback) { var filters = [] filters.push({ - column: "item_code", + column: "itemCode", action: "==", value: label.itemCode }) filters.push({ - column: "location_code", + column: "locationCode", action: "==", value: locationCode }) + + if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + filters.push({ + column: "inventoryStatus", + action: "in", + value: fromInventoryStatuses + }) + } var params = { filters: filters, @@ -250,7 +274,7 @@ export function byQuantity(label, locationCode, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byUniqueId(label, locationCode, callback) { +export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) { let param = { packingNumber: label.packingNumber }; @@ -262,10 +286,18 @@ export function byUniqueId(label, locationCode, callback) { var filters = [] filters.push({ - column: "packing_number", + column: "packingNumber", action: "==", value: label.packingNumber }) + + if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + filters.push({ + column: "inventoryStatus", + action: "in", + value: fromInventoryStatuses + }) + } var params = { filters: filters, @@ -305,7 +337,7 @@ export function balanceByLocation(locationCode, callback) { var filters = [] filters.push({ - column: "location_code", + column: "locationCode", action: "==", value: locationCode }) diff --git a/mycomponents/qty/compareQty.vue b/mycomponents/qty/compareQty.vue index f519e3c5..165ce424 100644 --- a/mycomponents/qty/compareQty.vue +++ b/mycomponents/qty/compareQty.vue @@ -3,7 +3,7 @@ - + {{Number(handleQty)}} @@ -14,7 +14,7 @@ {{Number(handleQty)}} - / + / {{Number(recommendQty)}} diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue index 0a1ae1d1..829dce48 100644 --- a/mycomponents/scan/winScanPackAndLocation.vue +++ b/mycomponents/scan/winScanPackAndLocation.vue @@ -96,7 +96,8 @@ locationOnFocus: false, businessType: {}, inventoryStatus: [], - managementPrecision: '' + managementPrecision: '', + fromInventoryStatuses:"" } }, created() { @@ -135,7 +136,8 @@ } } this.$refs.popup.open('bottom'); - this.inventoryStatus = []; //出库库存状态 + this.fromInventoryStatuses = jobContent.outInventoryStatuses + this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //出库库存状态 }, @@ -201,7 +203,7 @@ } else { if (result.label != null) { this.scanResult = result; - getBalanceByManagementPrecision(result.label,this.fromLocationCode,res=>{ + getBalanceByManagementPrecision(result.label,this.fromLocationCode,this.fromInventoryStatuses,res=>{ if(res.success){ this.managementPrecision =res.managementPrecision this.afterQueryBalance(res.data.list); diff --git a/pages/inspect/job/inspectDetail.vue b/pages/inspect/job/inspectDetail.vue index 1dc9b5bf..9344f778 100644 --- a/pages/inspect/job/inspectDetail.vue +++ b/pages/inspect/job/inspectDetail.vue @@ -45,7 +45,7 @@ } from '@/common/basic.js'; import { getInventoryStatusName, - + getDirectoryItemArray } from '@/common/directory.js'; import { @@ -84,14 +84,13 @@ jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 - toLocationInfo: {}, businessTypeInfo: {}, - locationTypeList: [], + fromInventoryStatuses :"", managementList: [], selectedItem: {}, failedQty: 0, crackQty: 0, - inspectType: "" + inspectType: "", }; }, onLoad(option) { @@ -195,6 +194,9 @@ res.photos = "" res.inspectResult = "" }) + // that.jobContent.outInventoryStatuses='INSP,OK' + that.jobContent.outInventoryStatuses='HOLD' + that.fromInventoryStatuses = that.jobContent.outInventoryStatuses that.detailSource = getDataSource(that.subList); } else { that.showMessage('列表数据为0'); @@ -380,15 +382,6 @@ }) }, - - getLocationInfo(locationCode) { - getBasicLocationByCode(locationCode).then(res => { - if (res.data.list.length > 0) { - this.toLocationInfo = res.data.list[0] - } - }) - }, - showMessage(message) { this.$refs.comMessage.showMessage(message, res => { if (res) { diff --git a/pages/purchaseReceipt/job/receiptDetail.vue b/pages/purchaseReceipt/job/receiptDetail.vue index 59b50fd7..76488b19 100644 --- a/pages/purchaseReceipt/job/receiptDetail.vue +++ b/pages/purchaseReceipt/job/receiptDetail.vue @@ -5,7 +5,7 @@ + @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @@ -19,7 +19,7 @@ + :locationTypeList="toLocationTypeList"> @@ -89,7 +89,7 @@ jobContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 - locationTypeList: [], + toLocationTypeList: [], toLocationCode: '', toLocationInfo: {}, businessTypeInfo: {}, @@ -173,8 +173,8 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; - that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); - // that.jobContent.locationTypeList = that.locationTypeList; + that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); + // that.jobContent.toLocationTypeList = that.toLocationTypeList; that.subList = res.data.subList; this.toLocationCode = that.subList[0].toLocationCode that.detailSource = getDataSource(that.subList)