|
|
@ -60,10 +60,18 @@ |
|
|
|
import { |
|
|
|
getDataSource, |
|
|
|
createRecordInfo, |
|
|
|
calcHandleQty, |
|
|
|
calcHandleNewQty, |
|
|
|
getScanCount |
|
|
|
} from '@/common/detail.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
calc |
|
|
|
} from '@/common/calc' |
|
|
|
|
|
|
|
import { |
|
|
|
Decimal |
|
|
|
} from 'decimal.js'; //引入 |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
|
import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue" |
|
|
@ -192,7 +200,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
|
calcHandleQty(this.detailSource) |
|
|
|
calcHandleNewQty(this.detailSource) |
|
|
|
// this.continueScan() |
|
|
|
this.$forceUpdate(); |
|
|
|
}, |
|
|
@ -203,7 +211,7 @@ |
|
|
|
var item =this.detailSource[i] |
|
|
|
for (var j = 0; j < item.subList.length; j++) { |
|
|
|
var sub =item.subList[j] |
|
|
|
if(sub.isRecommend&&!sub.scaned){ |
|
|
|
if(!sub.isRecommend&&!sub.scaned){ |
|
|
|
item.subList.splice(j,1) |
|
|
|
} |
|
|
|
} |
|
|
@ -239,8 +247,8 @@ |
|
|
|
itemCode:itemCode, |
|
|
|
packingNumber:packingNumber, |
|
|
|
batch:batch, |
|
|
|
handleQty:Number(result.balance.qty), |
|
|
|
qty:qty, |
|
|
|
handleQty:detail.qty<Number(result.balance.qty)?detail.qty:Number(result.balance.qty), |
|
|
|
qty:detail.qty, |
|
|
|
fromLocationCode:locationCode, |
|
|
|
inventoryStatus:inventoryStatus, |
|
|
|
toInventoryStatus:inventoryStatus, |
|
|
@ -253,49 +261,11 @@ |
|
|
|
newAdd.balance.packUnit = result.package.packUnit |
|
|
|
newAdd.scaned = true; |
|
|
|
detail.subList.push(newAdd) |
|
|
|
this.calcHandleQty(); |
|
|
|
} else { |
|
|
|
if (itemDetail.scaned) { |
|
|
|
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result |
|
|
|
.fromLocationCode + "】已经扫描") |
|
|
|
} else { |
|
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
|
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { |
|
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
itemStatus + |
|
|
|
']不一致,是否继续出库?', res => { |
|
|
|
if (res) { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.packQty = Number(result.package.packQty) |
|
|
|
itemDetail.balance.packUnit = result.package.packUnit |
|
|
|
this.calcHandleQty(); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
itemStatus + |
|
|
|
']不一致,不允许转移!', res => { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.packQty = Number(result.package.packQty) |
|
|
|
itemDetail.balance.packUnit = result.package.packUnit |
|
|
|
this.calcHandleQty(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -349,7 +319,7 @@ |
|
|
|
let str = '' |
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
if(cur.scaned){ |
|
|
|
if(!cur.isRecommend&&cur.scaned){ |
|
|
|
if (cur.qty != cur.handleQty) { |
|
|
|
var tempHandleQty =0 |
|
|
|
if(cur.handleQty){ |
|
|
@ -357,7 +327,7 @@ |
|
|
|
}else { |
|
|
|
tempHandleQty =0 |
|
|
|
} |
|
|
|
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` |
|
|
|
str += `物料号【${cur.itemCode}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|