|
|
@ -40,6 +40,7 @@ |
|
|
|
</view> |
|
|
|
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index" |
|
|
|
@editItem="editItem" :settingParam="jobContent" @remove="updateData" |
|
|
|
:isShowRecommendQty ="false" |
|
|
|
@updateData="updateData"> |
|
|
|
</comCountDetailcards> |
|
|
|
</view> |
|
|
@ -66,7 +67,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
<win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" :queryBalance="false" @getResult='getScanResult'> |
|
|
|
<win-scan-pack-and-location |
|
|
|
:allowModifyLocation="false" |
|
|
|
ref="scanPopup" :noShowBalanceMessage="true" :queryBalance="true" @getResult='getScanResult'> |
|
|
|
</win-scan-pack-and-location> |
|
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
|
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> |
|
|
@ -242,15 +245,15 @@ |
|
|
|
} else { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobStatus = res.data.status; |
|
|
|
that.fromLocationCode = that.jobContent.locationCode; |
|
|
|
// res.data.subList.forEach(item => { |
|
|
|
// item.recommendQty = item.qty |
|
|
|
// item.handleQty = 0 |
|
|
|
// item.countTime = new Date() |
|
|
|
// item.fromLocationCode =that.fromLocationCode; |
|
|
|
// }) |
|
|
|
// that.allDetails = res.data.subList; |
|
|
|
// that.allCount = res.data.subList.length; |
|
|
|
that.fromLocationCode = that.jobContent.countSplitCode; |
|
|
|
res.data.subList.forEach(item => { |
|
|
|
item.recommendQty = item.qty |
|
|
|
item.handleQty = 0 |
|
|
|
item.countTime = new Date() |
|
|
|
item.fromLocationCode =that.fromLocationCode; |
|
|
|
}) |
|
|
|
that.allDetails = res.data.subList; |
|
|
|
that.allCount = res.data.subList.length; |
|
|
|
that.initList() |
|
|
|
} |
|
|
|
|
|
|
@ -335,8 +338,8 @@ |
|
|
|
var packingNumber = result.label.packingNumber |
|
|
|
var pack = result.package |
|
|
|
var batch = result.label.batch |
|
|
|
var inventoryStatus = "OK" |
|
|
|
var qty = result.label.qty ? result.label.qty : 0; |
|
|
|
var inventoryStatus = result.balance ? result.balance.inventoryStatus : "OK" |
|
|
|
var qty = result.balance ? result.balance.qty : 0; |
|
|
|
|
|
|
|
//按物料、箱码、批次、状态匹配 |
|
|
|
let items = this.allDetails.filter(r => |
|
|
@ -346,13 +349,21 @@ |
|
|
|
r.inventoryStatus === inventoryStatus) |
|
|
|
//不在任务列表中,是否添加库存 |
|
|
|
if (items.length == 0) { |
|
|
|
var detail = this.createAddDetailInfo(pack,qty) |
|
|
|
detail.countTime = new Date(); |
|
|
|
this.allDetails.push(detail) |
|
|
|
this.updateList(); |
|
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(detail, |
|
|
|
null); |
|
|
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("包装【" + result.label.packingNumber + |
|
|
|
"】不在任务列表中,是否要添加到列表中?", |
|
|
|
res => { |
|
|
|
//创建盘点信息,标记为已经扫描 |
|
|
|
if (res) { |
|
|
|
var detail = this.createAddDetailInfo(pack,qty) |
|
|
|
detail.countTime = new Date(); |
|
|
|
this.allDetails.push(detail) |
|
|
|
this.updateList(); |
|
|
|
this.$refs.countQtyEdit.openEditPopupShowSeconds(detail, |
|
|
|
null); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
var selectItem = items[0] |
|
|
|
//已经扫描 |
|
|
@ -372,7 +383,7 @@ |
|
|
|
} else { |
|
|
|
//未扫描,赋值 |
|
|
|
selectItem.scaned = true; |
|
|
|
selectItem.recommendQty =Number(qty); |
|
|
|
selectItem.balanceQty= Number(qty) |
|
|
|
selectItem.handleQty = Number(qty) |
|
|
|
selectItem.packQty = pack.packQty |
|
|
|
selectItem.packUnit = pack.packUnit |
|
|
@ -424,7 +435,7 @@ |
|
|
|
//创建盘盈的明细 |
|
|
|
createAddDetailInfo(pack,qty) { |
|
|
|
var detail = { |
|
|
|
id: this.jobContent.masterId, //新增的明细 |
|
|
|
masterId: this.jobContent.id, //新增的明细 |
|
|
|
scaned: true, |
|
|
|
countDetailNumber: "", |
|
|
|
ownerCode: "", |
|
|
@ -448,6 +459,7 @@ |
|
|
|
countQty: 0, |
|
|
|
balanceQty: 0, |
|
|
|
fromLocationCode: this.fromLocationCode, |
|
|
|
locationCode:this.fromLocationCode, |
|
|
|
creator: this.$store.state.user.id, |
|
|
|
countTime: new Date() |
|
|
|
} |
|
|
|