Browse Source

HL-5676 直接发料支持扫描多个物料

hella_online_20240803
lijuncheng 3 months ago
parent
commit
da22c63950
  1. 50
      src/pages/issue/record/directIssue.vue

50
src/pages/issue/record/directIssue.vue

@ -4,19 +4,13 @@
<com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<view class="header-view">
<view class="header_item">
来源库位 : {{fromLocationCode}}
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowFromLocation="true" @removeItem="removeItem(index,item)"
:isShowToLocation="false" :isShowParentToLocation="false" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
@ -79,7 +73,6 @@
getBusinessType,
createItemInfo,
createDetailInfo,
calcTreeHandleQty,
calcHandleQty
} from '@/common/record.js';
@ -200,11 +193,11 @@
let pack = result.package;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额")
return;
}
// if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
// this.showErrorMessage("[" + balance.packingNumber + "[" + balance.batch + "][" + this
// .fromLocationCode + "]")
// return;
// }
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
@ -212,15 +205,13 @@
}
})
if (item == undefined) {
if (this.itemCode != "" && this.itemCode != balance.itemCode) {
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
return;
}
if (this.fromWarehouseCode == '') {
this.fromWarehouseCode = balance.warehouseCode;
}
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.fromLocationCode=balance.locationCode
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
@ -237,7 +228,7 @@
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.fromLocationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
@ -249,7 +240,8 @@
if (pack.parentNumber) {
var checkData = item.subList.find(r => {
if (r.packingNumber == pack.parentNumber &&
r.batch == balance.batch) {
r.batch == balance.batch&&
r.fromLocationCode == balance.locationCode) {
return r;
}
})
@ -264,6 +256,7 @@
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
@ -273,7 +266,8 @@
//
var checkData = item.subList.find(r => {
if (r.parentNumber == pack.number &&
r.batch == balance.batch) {
r.batch == balance.batch&&
r.fromLocationCode == balance.locationCode) {
return r;
}
})
@ -288,6 +282,7 @@
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
@ -297,6 +292,7 @@
console.log("扫描的是父包装,是否移除子包装")
} else {
let newDetail = createDetailInfo(balance, pack);
newDetail.fromLocationCode=balance.locationCode
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
@ -326,18 +322,6 @@
});
},
calcTreeHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty, detail.qty)
}
}
}
this.$forceUpdate();
},
showSelect() {
// if (this.editPosition) {
this.show = true

Loading…
Cancel
Save