|
|
@ -49,8 +49,7 @@ |
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
<win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true" |
|
|
|
:pdaCountBalanceQuery="true" |
|
|
|
:isShowHistory="false" @getCountScanResult='getCountScanResult'> |
|
|
|
:pdaCountBalanceQuery="true" :isShowHistory="false" @getCountScanResult='getCountScanResult'> |
|
|
|
</win-scan-pack-and-location> |
|
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
@ -134,7 +133,7 @@ |
|
|
|
dataList: [], |
|
|
|
managementList: [], |
|
|
|
isOpen: false, |
|
|
|
manageMode:"" |
|
|
|
manageMode: "" |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
@ -170,12 +169,12 @@ |
|
|
|
|
|
|
|
computed() {}, |
|
|
|
methods: { |
|
|
|
getManageMode(value){ |
|
|
|
var manageMode="" |
|
|
|
if(value=='BY_BATCH'){ |
|
|
|
manageMode="按批次" |
|
|
|
}else if(value=='BY_QUANTITY') { |
|
|
|
manageMode="按数量" |
|
|
|
getManageMode(value) { |
|
|
|
var manageMode = "" |
|
|
|
if (value == 'BY_BATCH') { |
|
|
|
manageMode = "按批次" |
|
|
|
} else if (value == 'BY_QUANTITY') { |
|
|
|
manageMode = "按数量" |
|
|
|
} |
|
|
|
return manageMode |
|
|
|
}, |
|
|
@ -192,7 +191,7 @@ |
|
|
|
} else { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobContent.status = "2"; |
|
|
|
that.manageMode=that.jobContent.manageMode |
|
|
|
that.manageMode = that.jobContent.manageMode |
|
|
|
that.locationCode = that.jobContent.locationCode; |
|
|
|
|
|
|
|
that.dataList = res.data.subList; |
|
|
@ -209,12 +208,32 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
refreshData(recordList) { |
|
|
|
refreshData(returnData) { |
|
|
|
//记录的数据刷新列表 |
|
|
|
//列表中删除了已经扫描的数据 |
|
|
|
if (returnData.recordList.length == 0) { |
|
|
|
if (this.manageMode == "BY_BATCH") { |
|
|
|
var mainItem = this.dataList.find(r => |
|
|
|
r.itemCode == returnData.itemCode && |
|
|
|
r.batch == returnData.batch && |
|
|
|
r.inventoryStatus == returnData.inventoryStatus) |
|
|
|
if (mainItem) { |
|
|
|
mainItem.recordList = [] |
|
|
|
} else if (this.manageMode == "BY_QUANTITY") { |
|
|
|
var mainItem = this.dataList.find(r => |
|
|
|
r.itemCode == returnData.itemCode && |
|
|
|
r.inventoryStatus == returnData.inventoryStatus) |
|
|
|
|
|
|
|
if (mainItem) { |
|
|
|
mainItem.recordList = [] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
var addList = [] |
|
|
|
recordList.forEach(subItem => { |
|
|
|
returnData.recordList.forEach(subItem => { |
|
|
|
|
|
|
|
if(this.manageMode=="BY_BATCH"){ |
|
|
|
if (this.manageMode == "BY_BATCH") { |
|
|
|
let mainItem = this.dataList.find(r => |
|
|
|
r.itemCode == subItem.itemCode && |
|
|
|
r.batch == subItem.batch && |
|
|
@ -254,8 +273,8 @@ |
|
|
|
detail.recordList.push(recordItem) |
|
|
|
addList.push(detail) |
|
|
|
} |
|
|
|
}else if(this.manageMode=="BY_QUANTITY"){ |
|
|
|
let mainItem = this.dataList.find(r => |
|
|
|
} else if (this.manageMode == "BY_QUANTITY") { |
|
|
|
var mainItem = this.dataList.find(r => |
|
|
|
r.itemCode == subItem.itemCode && |
|
|
|
r.inventoryStatus == subItem.inventoryStatus) |
|
|
|
//主列表存在数据 |
|
|
@ -295,13 +314,11 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
if (addList.length > 0) { |
|
|
|
this.dataList = this.dataList.concat(addList) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.updateList(false); |
|
|
|
|
|
|
@ -429,7 +446,7 @@ |
|
|
|
|
|
|
|
//已经存在,数量累加 |
|
|
|
if (subItem) { |
|
|
|
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(subItem.handleQty)) |
|
|
|
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(scanItem.handleQty)) |
|
|
|
} else { |
|
|
|
mainItem.recordList.unshift(scanItem) |
|
|
|
} |
|
|
@ -570,13 +587,13 @@ |
|
|
|
|
|
|
|
calcScanCount() { |
|
|
|
this.dataList.forEach(main => { |
|
|
|
if (main.recordList) { |
|
|
|
var handleQty = 0; |
|
|
|
if (main.recordList) { |
|
|
|
main.recordList.forEach(item => { |
|
|
|
handleQty = calc.add(handleQty, Number(item.handleQty)) |
|
|
|
}) |
|
|
|
main.currentQty = handleQty |
|
|
|
} |
|
|
|
main.currentQty = handleQty |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|