| 
					
				 | 
			
			
				@@ -285,7 +285,13 @@ class ReportMemoryMaterial { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async _getMaterialStageGatherBills(tender_id, stage_id, stage_order, stageSelf) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const decimal = this.materialGatherBase.decimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const billsData = this.ctx.helper.clone(this.materialGatherBase.billsData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //const billsData = this.ctx.helper.clone(this.materialGatherBase.billsData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const billsData = this.materialGatherBase.billsData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        billsData.forEach(x => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (const prop of ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp']) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                x[prop] = undefined; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const curStageBills = await this.ctx.service.stageBills.getStagesData(tender_id, stage_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.ctx.helper.assignRelaData(billsData, [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { data: curStageBills, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid' }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -294,7 +300,13 @@ class ReportMemoryMaterial { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billsTree.loadDatas(billsData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billsTree.calculateAll(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const posData = this.ctx.helper.clone(this.materialGatherBase.posData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //const posData = this.ctx.helper.clone(this.materialGatherBase.posData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const posData = this.materialGatherBase.posData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        posData.forEach(x => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (const prop of ['contract_qty', 'qc_qty']) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                x[prop] = undefined; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const curStage = await this.ctx.service.stagePos.getStagesData(tender_id, stage_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.ctx.helper.assignRelaData(posData, [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { data: curStage, fields: ['contract_qty', 'qc_qty'], prefix: '', relaId: 'pid' }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -313,7 +325,10 @@ class ReportMemoryMaterial { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const materialNotJoin = this.materialGatherBase.materialNotJoin; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const helper = this.ctx.helper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.time('calcMaterialBills'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (const g of gatherUtil.gclList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!g.contract_qty && !g.qc_qty) continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             g.sid = stage_id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             g.sorder = stage_order; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             g.jiacha = 0; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -339,6 +354,7 @@ class ReportMemoryMaterial { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 g.jiacha_qty = helper.add(g.jiacha_qty, x.gather_qty); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.timeEnd('calcMaterialBills'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return [gatherUtil.gclList, gatherUtil.leafXmjs]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |