Browse Source

YT-1073计划外入库任务PDA扫描的样式与需求不符(详见截图)

intex
zhang_li 3 days ago
parent
commit
864173480d
  1. 20
      src/common/detail.js
  2. 21
      src/pages/unPlanned/job/receiptJobDetail.vue

20
src/common/detail.js

@ -155,7 +155,25 @@ export function calcHandleQty(detailSource) {
}
}
}
//计算计划外入库实际数量和任务数量
export function calcHandleQtyPlanOut(detailSource) {
console.log(999,detailSource)
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
console.log(detail.isRecommend)
if(detail.isRecommend){
item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
}
//计算推荐和扫描的不是用一个的数量
export function calcHandleNewQty(detailSource) {
for (let item of detailSource) {

21
src/pages/unPlanned/job/receiptJobDetail.vue

@ -68,7 +68,8 @@
getDataSource,
createRecordInfo,
calcHandleQty,
getScanCount
getScanCount,
calcHandleQtyPlanOut
} from '@/common/detail.js';
import {
@ -242,7 +243,7 @@
}
}
}
calcHandleQty(this.detailSource);
calcHandleQtyPlanOut(this.detailSource);
this.$forceUpdate()
},
@ -289,7 +290,7 @@
batch:batch,
handleQty:Number(result.label.qty),
qty:detail.qty,
toLocationCode:locationCode,
// toLocationCode:locationCode,
// inventoryStatus:inventoryStatus,
// toInventoryStatus:inventoryStatus,
balance:{},
@ -308,20 +309,14 @@
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail
.toLocationCode;
// itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail
// .toLocationCode;
itemDetail.packQty = result.package.packQty
itemDetail.labelQty = Number(result.label.qty);
this.continueScan()
}
}
let array = []
this.detailSource.forEach((item=>{
let obj = {...item}
obj.subList=item.subList.filter(cur=>cur.isRecommend == true)
array.push(obj)
}))
calcHandleQty(array);
calcHandleQtyPlanOut(this.detailSource);
}
} catch (e) {
@ -352,7 +347,7 @@
.toLocationCode;
itemDetail.packQty = result.package.packQty
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
calcHandleQtyPlanOut(this.detailSource);
this.continueScan()
}
}

Loading…
Cancel
Save