|
|
@ -10,6 +10,9 @@ |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<record-com-detail-card :dataContent="item" :index="index" |
|
|
|
:isShowToLocation="false" |
|
|
|
:isShowParentToLocation="false" |
|
|
|
:allowModifyQty="true" |
|
|
|
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> |
|
|
|
</record-com-detail-card> |
|
|
|
</view> |
|
|
@ -22,7 +25,7 @@ |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber" |
|
|
|
<packageTarget ref="toPackingRef" title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber" |
|
|
|
@getScanResult='getToPackingNumber'></packageTarget> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
@ -150,7 +153,9 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
itemp.containerNumber="" |
|
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
|
|
|
|
|
itemp.subList.push(newDetail); |
|
|
|
this.currentItemCode = balance.itemCode; |
|
|
|
this.detailSource.push(itemp) |
|
|
@ -275,7 +280,7 @@ |
|
|
|
detail.toPackingNumber = this.toPackingNumber; |
|
|
|
|
|
|
|
detail.fromBatch = detail.batch; |
|
|
|
detail.toBatch = detail.batch; |
|
|
|
detail.toBatch = this.toBatch; |
|
|
|
|
|
|
|
detail.fromLocationCode = detail.locationCode; |
|
|
|
// detail.toLocationCode = detail.toLocationCode; |
|
|
@ -294,13 +299,6 @@ |
|
|
|
if (res) {} |
|
|
|
}); |
|
|
|
}, |
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
if (res) { |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
showScanMessage(message) { |
|
|
|
this.$refs.comMessage.showScanMessage(message); |
|
|
@ -333,24 +331,22 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
updateData() { |
|
|
|
this.calcHandleQty(); |
|
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
|
let item = this.detailSource[i]; |
|
|
|
if (item.qty == 0) { |
|
|
|
this.detailSource.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getToPackingNumber(result) { |
|
|
|
if(this.currentItemCode!=result.label.itemCode){ |
|
|
|
this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode + |
|
|
|
this.showErrorMessage("当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode + |
|
|
|
"]不一致,请扫描相同物料号") |
|
|
|
return; |
|
|
|
} |
|
|
|
this.toPackingNumber = result.label.packingNumber; |
|
|
|
this.toBatch =result.label.batch |
|
|
|
|
|
|
|
var item =this.detailSource[0].subList.find(r=>r.packingNumber==result.label.packingNumber) |
|
|
|
if(item){ |
|
|
|
this.showErrorMessage("目标箱码[" + result.label.packingNumber + "与来源箱码[" + item.packingNumber + |
|
|
|
"]一致,请扫描不同箱码") |
|
|
|
return; |
|
|
|
}else { |
|
|
|
this.toPackingNumber = result.label.packingNumber; |
|
|
|
this.toBatch =result.label.batch |
|
|
|
this.$refs.toPackingRef.closePack() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|