Browse Source

修改发料任务显示

intex
lijuncheng 2 days ago
parent
commit
01bf5b211a
  1. 19
      src/common/detail.js

19
src/common/detail.js

@ -85,7 +85,24 @@ export function getThreeDataSource(data) {
return items; return items;
} }
export function getDataSourceBatch(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode )
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
}
export function getDataSource(subList) { export function getDataSource(subList) {
let items = []; let items = [];

Loading…
Cancel
Save