| 
					
				 | 
			
			
				@@ -14,9 +14,10 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let quantityMap={}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let rationGljGroup = _.groupBy(rationGLJDatas,'projectGLJID'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let IDarray =  this.getSubdivisionAndTechBillsLeavesID(billsDatas);//分别取分部分项和技术措施项目的所有叶子清单ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(IDarray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let billIDs = IDarray[0],tech_billIDS = IDarray[1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(let pglj of project_gljs ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let pg_index = this.getIndex(pglj,gljKeyArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let pg_index = this.getIndex(pglj,this.gljKeyArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             pglj.subdivisionQuantity = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             pglj.techQuantity = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             pglj.quantity = 0; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -31,7 +32,7 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(let pkey in mixRatioMap){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let mixRatioList = mixRatioMap[pkey]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for(let m of mixRatioList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                let m_index = gljOprObj.getIndex(m,gljKeyArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let m_index = this.getIndex(m,this.gljKeyArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 let m_glj = quantityMap[m_index]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 let p_glj = quantityMap[pkey]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(m_glj&&p_glj){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -67,7 +68,7 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(let ra of rations){//计算定额类型工料机的消耗量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(ra.type == rationType.gljRation&&ra.projectGLJID===pglj.id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(ra.type == this.rationType.gljRation&&ra.projectGLJID===pglj.id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 let r_quantity = scMathUtil.roundForObj(ra.quantity,q_decimal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 r_quantity = r_quantity?r_quantity:0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 quantity_sum = scMathUtil.roundForObj(quantity_sum+r_quantity,q_decimal); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,9 +87,9 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getSubdivisionAndTechBillsLeavesID:function (billsDatas) {//分别取分部分项和技术措施项目的所有叶子清单ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(projectObj){//存在,说明在前端调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return [projectObj.project.Bills.getSubdivisionProjectLeavesID(),projectObj.project.Bills.getTechLeavesID()]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // if(projectObj){//存在,说明在前端调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //     return [projectObj.project.Bills.getSubdivisionProjectLeavesID(),projectObj.project.Bills.getTechLeavesID()]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let parentMap ={}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let subdivisionBillID  = null,techBillID = null,sIDs = [],tIDS = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(let b of billsDatas){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -97,10 +98,11 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 parentMap[b.ParentID]= [b]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(this.isFlag(b)&&b.flagsIndex.fixed.flag==this.fixedFlag.SUB_ENGINERRING) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let flag = this.getFalg(b); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(this.isDef(flag)&&flag.flag == this.fixedFlag.SUB_ENGINERRING){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 subdivisionBillID = b.ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(this.isFlag(b)&&b.flagsIndex.fixed.flag==this.fixedFlag.CONSTRUCTION_TECH){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(this.isDef(flag)&&flag.flag == this.fixedFlag.CONSTRUCTION_TECH){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 techBillID = b.ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -122,6 +124,10 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getFalg:function (b) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return _.find(b.flags,{"fieldName":"fixed"}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getGLJPrice:function (glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let result = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         result.marketPrice = this.getMarketPrice(glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -281,4 +287,11 @@ let gljUtil = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         EQUIPMENT: 5 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      notEditType : [202, 203,204, 301, 4], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     gljKeyArray : ['code','name','specs','unit','type'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      rationType : { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ration: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        volumePrice: 2, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        gljRation: 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        install:4 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |