diff --git a/src/common/detail.js b/src/common/detail.js index 89721e7a..3171ca38 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -141,6 +141,7 @@ export function createRecordInfo(detail, balance) { //计算实际数量 export function calcHandleQty(detailSource) { + console.log(999,detailSource) for (let item of detailSource) { item.handleQty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber(); @@ -190,6 +191,8 @@ export function calcTreeHandleQty(detailSource) { detail.handleQty = calc.add(detail.handleQty, pack.handleQty); } } + }else{ + detail.handleQty = new Decimal(0).toNumber(); } if(detail.handleQty){ item.handleQty = calc.add(item.handleQty, detail.handleQty); diff --git a/src/common/label.js b/src/common/label.js index 4615e948..82bec5b7 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -14,7 +14,7 @@ import { getManagementPrecisions } from '@/common/balance.js'; -export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { +export function getLabelInfo(scanMsg, headerType, callBack,locationCode,isHavePackNumber) { if (scanMsg.length == 0) { return null } @@ -42,17 +42,17 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { let type = header.substring(header.length - 1, header.length); if (type == 'Q') //qrcode { - getQRCodeInfo(header, version, scanMsg, callBack,locationCode); + getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber); } // else if (type == 'B') //barcode // { // getBarCodeInfo(header, version, items[2], callBack); // } else { //直接输入文本 - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); } } else { - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); // let labelResult = { // label: { // labelType: "", @@ -67,7 +67,7 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { } } -export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { +export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) { //获取包装信息 let labelItem = labelDic.find(r => r.header == header && r.version == version); if (labelItem == undefined) { @@ -92,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { }; labelDic.push(newItem); - getLabelItems(newItem, scanMsg, callBack,locationCode); + getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber); } }).catch(err => { labelResult.success = false; @@ -100,7 +100,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { callBack(err); }) } else { - getLabelItems(labelItem, scanMsg, callBack,locationCode); + getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber); } } @@ -117,7 +117,9 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { const managementList = res.list; managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING' if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ - packingNumber = '' + if(!isHavePackNumber){ + packingNumber = '' + } } } }) diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue index 8e583b13..6e30e527 100644 --- a/src/mycomponents/package/packageCard.vue +++ b/src/mycomponents/package/packageCard.vue @@ -6,7 +6,8 @@ - + + @@ -19,12 +20,12 @@ + :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" :isShowStatus="isShowStatus" :isShowRecommendQty='isShowRecommendQty'> - + @@ -90,7 +91,15 @@ type: String, default: '库位' }, - + // 采购订单单独显示的包装号 + isShowPackingNumberProps:{ + type:Boolean, + default:false + }, + isShowRecommendQty: { + type: Boolean, + default: true + } }, watch: { // 模拟扫描功能 diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index 9d39d966..a4458dd7 100644 --- a/src/mycomponents/package/packageList.vue +++ b/src/mycomponents/package/packageList.vue @@ -1,13 +1,13 @@