diff --git a/src/common/label.js b/src/common/label.js index 9eafd6eb..c54fcc2a 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -146,7 +146,6 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { labelResult.package.number = packingNumber1 ? packingNumber1 : '' labelResult.package.packingNumber='' labelResult.managementType = managementType - console.log(999,labelResult) callBack(labelResult); // labelResult.success = false; // labelResult.message = '在条码中未解析到箱码'; @@ -180,8 +179,17 @@ export function analysisQRCodeLabel(labelItem, scanMsg) { let scanItems = scanMsg.split(separators); if (scanItems.length > 0) { scanItems.forEach((item, index) => { - let type = item.substring(0, 1); - let value = item.substring(1, item.length); + let type = '' + let value = '' + if(item.includes('PU')||item.includes('PQ')){ + type = item.substring(0, 2); + value = item.substring(2, item.length); + }else{ + type = item.substring(0, 1); + value = item.substring(1, item.length); + } + // let type = item.substring(0, 1); + // let value = item.substring(1, item.length); if (type == 'H') { labelResult.label.header = item; } else if (type == 'V') { @@ -202,7 +210,6 @@ export function analysisQRCodeLabel(labelItem, scanMsg) { } } - // console.log('标签', labelResult.label) return labelResult; }