|
|
@ -85,7 +85,24 @@ export function getThreeDataSource(data) { |
|
|
|
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) { |
|
|
|
let items = []; |
|
|
|