优化序列号号扫码:如果扫码结果和序列号重复,就直接跳过

This commit is contained in:
季圣华 2023-11-28 23:27:09 +08:00
parent c016e3dd7f
commit cccd9d2c76

View File

@ -806,7 +806,7 @@ export const BillModalMixin = {
let newDetailArr = []
for(let detail of detailArr){
if(detail.barCode) {
//如果条码重复就在给原来的数量加1
//如果扫码结果和条码重复就在给原来的数量加1
if(detail.barCode === this.scanBarCode) {
detail.operNumber = (detail.operNumber-0)+1
//由于改变了商品数量需要同时更新相关金额和价税合计
@ -817,6 +817,11 @@ export const BillModalMixin = {
detail.taxLastMoney = (detail.allPrice + detail.taxMoney).toFixed(2)-0
hasFinished = true
}
//如果扫码结果和序列号重复就直接跳过
if(detail.snList === this.scanBarCode) {
this.$message.warning('抱歉已经扫描过该序列号');
hasFinished = true
}
newDetailArr.push(detail)
}
}