|
@ -78,7 +78,8 @@ |
|
|
productReceiptJobsubmit, |
|
|
productReceiptJobsubmit, |
|
|
getPrintProductReceiptList, |
|
|
getPrintProductReceiptList, |
|
|
getBalanceToPackage, |
|
|
getBalanceToPackage, |
|
|
batchPrintingLable |
|
|
batchPrintingLable, |
|
|
|
|
|
isCheckMesCode |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
@ -245,42 +246,50 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
|
|
|
let that = this; |
|
|
//TODO缺少零件号的对应关系 |
|
|
//TODO缺少零件号的对应关系 |
|
|
let that = this; |
|
|
//查询mes码是否完工 |
|
|
if (that.detailSource.length > 0) { |
|
|
isCheckMesCode(result.content).then(res=>{ |
|
|
let item = that.detailSource[0]; //应该按零件号查找 |
|
|
if(res.data){ |
|
|
result.uom = item.uom; |
|
|
if (that.detailSource.length > 0) { |
|
|
if (item.subList.length > 0) { |
|
|
let item = that.detailSource[0]; //应该按零件号查找 |
|
|
let subItem = item.subList[0]; |
|
|
result.uom = item.uom; |
|
|
subItem.scaned = true; |
|
|
if (item.subList.length > 0) { |
|
|
if (subItem.fgList == undefined) { |
|
|
let subItem = item.subList[0]; |
|
|
subItem.fgList = []; |
|
|
subItem.scaned = true; |
|
|
} |
|
|
if (subItem.fgList == undefined) { |
|
|
|
|
|
subItem.fgList = []; |
|
|
if (subItem.fgList.length == 0) { |
|
|
} |
|
|
subItem.fgList.push(result); |
|
|
|
|
|
that.calcFgQty(this.detailSource); |
|
|
if (subItem.fgList.length == 0) { |
|
|
} else { |
|
|
subItem.fgList.push(result); |
|
|
var itemIndex = subItem.fgList.findIndex(r => |
|
|
|
|
|
r.itemCode == result.itemCode && |
|
|
|
|
|
r.productDate == result.productDate && |
|
|
|
|
|
r.order == result.order); |
|
|
|
|
|
if (itemIndex == -1) { |
|
|
|
|
|
subItem.fgList.push(result); |
|
|
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除', confirm => { |
|
|
|
|
|
subItem.fgList.splice(itemIndex, 1) |
|
|
|
|
|
that.calcFgQty(this.detailSource); |
|
|
that.calcFgQty(this.detailSource); |
|
|
}) |
|
|
} else { |
|
|
|
|
|
var itemIndex = subItem.fgList.findIndex(r => |
|
|
|
|
|
r.itemCode == result.itemCode && |
|
|
|
|
|
r.productDate == result.productDate && |
|
|
|
|
|
r.order == result.order); |
|
|
|
|
|
if (itemIndex == -1) { |
|
|
|
|
|
subItem.fgList.push(result); |
|
|
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除', confirm => { |
|
|
|
|
|
subItem.fgList.splice(itemIndex, 1) |
|
|
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}, 500) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}, 500) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}).catch(error=>{ |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
calcFgQty() { |
|
|
calcFgQty() { |
|
@ -448,7 +457,9 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
subitem.handleQty=subitem.qty |
|
|
if(!subitem.handleQty){ |
|
|
|
|
|
subitem.handleQty=subitem.qty |
|
|
|
|
|
} |
|
|
subitem.scaned = true |
|
|
subitem.scaned = true |
|
|
this.submitJob(); |
|
|
this.submitJob(); |
|
|
} |
|
|
} |
|
@ -508,7 +519,6 @@ |
|
|
res.outsideItemCode = res.itemCode |
|
|
res.outsideItemCode = res.itemCode |
|
|
res.outsideProduceDate = res.productDate |
|
|
res.outsideProduceDate = res.productDate |
|
|
res.outsideSerialNumber = res.order |
|
|
res.outsideSerialNumber = res.order |
|
|
res.lowerLim=res.content |
|
|
|
|
|
}) |
|
|
}) |
|
|
}else { |
|
|
}else { |
|
|
detail.fgList=[] |
|
|
detail.fgList=[] |
|
|