|  | @@ -380,7 +380,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                  rootId: -1,
 | 
	
		
			
				|  |  |                  keys: ['id', 'tender_id', 'ledger_id'],
 | 
	
		
			
				|  |  |                  stageId: 'id',
 | 
	
		
			
				|  |  | -                calcFields: ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp', 'pre_contract_tp', 'pre_qc_tp', 'pre_gather_tp', 'end_contract_tp', 'end_qc_tp', 'end_gather_tp'],
 | 
	
		
			
				|  |  | +                calcFields: ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp', 'contract_pc_tp', 'qc_pc_tp', 'pc_tp', 'pre_contract_tp', 'pre_qc_tp', 'pre_gather_tp'],
 | 
	
		
			
				|  |  |                  calc: function (node) {
 | 
	
		
			
				|  |  |                      if (node.children && node.children.length === 0) {
 | 
	
		
			
				|  |  |                          node.pre_gather_qty = helper.add(node.pre_contract_qty, node.pre_qc_qty);
 | 
	
	
		
			
				|  | @@ -406,9 +406,9 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                  id: 'id', ledgerId: 'lid',
 | 
	
		
			
				|  |  |                  calc: function (node) {
 | 
	
		
			
				|  |  |                      node.pre_gather_qty = helper.add(node.pre_contract_qty, node.pre_qc_qty);
 | 
	
		
			
				|  |  | -                    node.gather_qty = helper.add(node.contract_qty, node.qc_qty);
 | 
	
		
			
				|  |  | -                    node.end_contract_qty = helper.add(node.pre_contract_qty, node.contract_qty);
 | 
	
		
			
				|  |  | -                    node.end_qc_qty = helper.add(node.pre_qc_qty, node.qc_qty);
 | 
	
		
			
				|  |  | +                    node.gather_tp = helper.sum([node.contract_tp, node.qc_tp, node.pc_tp]);
 | 
	
		
			
				|  |  | +                    node.end_contract_tp = helper.sum([node.pre_contract_tp, node.contract_tp, node.contract_pc_tp]);
 | 
	
		
			
				|  |  | +                    node.end_qc_tp = helper.sum([node.pre_qc_tp, node.qc_tp, node.qc_pc_tp]);
 | 
	
		
			
				|  |  |                      node.end_gather_qty = helper.add(node.pre_gather_qty, node.gather_qty);
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |              });
 | 
	
	
		
			
				|  | @@ -426,7 +426,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                  await this.ctx.service.stage.doCheckStage(preStage);
 | 
	
		
			
				|  |  |                  const endStage = await this.ctx.service.stageBillsFinal.getFinalData(tender, preStage.order);
 | 
	
		
			
				|  |  |                  sumAssignRelaData(billsIndexData, [
 | 
	
		
			
				|  |  | -                    {data: endStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: 'pre_', relaId: 'lid'},
 | 
	
		
			
				|  |  | +                    { data: endStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: 'pre_', relaId: 'lid' },
 | 
	
		
			
				|  |  |                  ]);
 | 
	
		
			
				|  |  |                  const endStagePos = await this.ctx.service.stagePosFinal.getFinalData(tender, preStage.order);
 | 
	
		
			
				|  |  |                  sumAssignRelaData(posIndexData, [
 |