Browse Source

YT-1580物料隔离,pda扫描标签报错

intex_20241211
zhang_li 2 months ago
parent
commit
41755fe069
  1. 15
      src/common/label.js

15
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;
}

Loading…
Cancel
Save