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