|
@@ -104,6 +104,7 @@ class loadGclBaseTree {
|
|
|
quantity: 0,
|
|
|
is_leaf: source.is_leaf,
|
|
|
hasPos: false,
|
|
|
+ sub_up: source.unit_price || 0,
|
|
|
};
|
|
|
this.keyNodeId += 1;
|
|
|
parent.children.push(node);
|
|
@@ -278,7 +279,7 @@ class updateReviseGclTree extends loadGclBaseTree {
|
|
|
}
|
|
|
}
|
|
|
gather(source, parent) {
|
|
|
- const node = this.ignoreParent ? this.addNodeWithoutParent(source) : this.addNode(source, parent);
|
|
|
+ const node = this.ignoreParent ? this.addNodeWithoutParent(source) : this.addNode(source, parent);
|
|
|
node.deal_qty = this.ctx.helper.add(node.deal_qty, source.deal_qty);
|
|
|
node.sgfh_qty = this.ctx.helper.add(node.sgfh_qty, source.sgfh_qty);
|
|
|
node.qtcl_qty = this.ctx.helper.add(node.qtcl_qty, source.qtcl_qty);
|
|
@@ -489,7 +490,7 @@ class sumLoad {
|
|
|
|
|
|
async loadGatherGcl(select, maxId, tenders, defaultData, subUp) {
|
|
|
this.loadTree = new loadLedgerGclTree(this.ctx, {
|
|
|
- parent: select, maxId, type: 'ledger', defaultData, subUp,
|
|
|
+ parent: select, maxId, type: 'ledger', defaultData, useSubUp: subUp,
|
|
|
});
|
|
|
for (const tender of tenders) {
|
|
|
const billsData = await this.ctx.service.ledger.getData(tender.tid);
|
|
@@ -517,10 +518,10 @@ class sumLoad {
|
|
|
return this.loadTree;
|
|
|
}
|
|
|
|
|
|
- async updateGatherGcl(select, maxId, tenders, defaultData) {
|
|
|
+ async updateGatherGcl(select, maxId, tenders, defaultData, subUp) {
|
|
|
const ignoreParent = this.ctx.tender.info.fun_rela.sum_load.ignoreParent;
|
|
|
this.loadTree = new updateReviseGclTree(this.ctx, {
|
|
|
- parent: select, maxId, type: 'ledger', defaultData, ignoreParent,
|
|
|
+ parent: select, maxId, type: 'ledger', defaultData, ignoreParent, useSubUp: subUp,
|
|
|
});
|
|
|
const posterity = await this.ctx.service.reviseBills.getPosterityByParentId(this.ctx.tender.id, select.ledger_id);
|
|
|
const pos = await this.ctx.service.revisePos.getData(this.ctx.tender.id);
|