| 
					
				 | 
			
			
				@@ -247,6 +247,45 @@ let nodeTools = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getNodeByID: function (ID){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return cbTools.getNodeByID(ID); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    cutNodeForSave(treeNode){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /*  subType、quantity、calcBase、programID、marketUnitFee等等字段较为特殊,它们的改变一定会触发计算并导致计算 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            结果的变化,从而引发保存动作。将这些字段放在该位置跟计算结果一起保存,可减少前端跟后端的通讯频率。              */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            projectID: projectObj.project.ID(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ID: treeNode.data.ID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            unit: treeNode.data.unit,   //对清单来说,改变单位,工程量精度会跟着改变从而影响计算。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            subType: treeNode.data.subType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quantity: treeNode.data.quantity, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            calcBase: treeNode.data.calcBase, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            calcBaseValue: treeNode.data.calcBaseValue, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            programID: treeNode.data.programID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            marketUnitFee: treeNode.data.marketUnitFee, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            marketTotalFee: treeNode.data.marketTotalFee, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fees: treeNode.data.fees, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            isFromDetail:treeNode.data.isFromDetail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            feeRate: treeNode.data.feeRate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            feeRateID: treeNode.data.feeRateID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            contain: treeNode.data.contain, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            quantityEXP: treeNode.data.quantityEXP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 定额大类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (nodeTools.isRationCategory(treeNode)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data.isSubcontract = treeNode.data.isSubcontract; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //定额类型的工料机做特殊处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(nodeTools.isGljRation(treeNode)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data.code = treeNode.data.code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data.projectGLJID = treeNode.data.projectGLJID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            delete data.marketUnitFee; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (treeNode.data.summaryFees) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data.summaryFees = treeNode.data.summaryFees; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -494,16 +533,28 @@ const rationCalcBaser = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return assistCalcer.estimateFee(node, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包定额基价人工费': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.定额基价人工费(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包定额基价材料费': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.定额基价材料费(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包定额基价机械费': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.定额基价机械费(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包主材费': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.主材费(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包设备费': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.设备费(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     '分包人工工日': function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (node.data.isSubcontract) return this.人工工日(node) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -889,37 +940,10 @@ class CalcProgram { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let me = this; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         me.project.beginUpdate(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (let node of treeNodes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (node.changed){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                let data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ID: node.data.ID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    projectID: me.project.ID(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    unit:node.data.unit,//对清单来说,改变单位,工程量精度会跟着改变从而影响计算。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    /*  subType、quantity、calcBase、programID、marketUnitFee等等字段较为特殊,它们的改变一定会触发计算并导致计算 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    结果的变化,从而引发保存动作。将这些字段放在该位置跟计算结果一起保存,可减少前端跟后端的通讯频率。              */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    subType: node.data.subType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    quantity: node.data.quantity, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    calcBase: node.data.calcBase, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    calcBaseValue: node.data.calcBaseValue, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    programID: node.data.programID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    marketUnitFee: node.data.marketUnitFee, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    marketTotalFee: node.data.marketTotalFee, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    fees: node.data.fees, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    isFromDetail:node.data.isFromDetail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    feeRate: node.data.feeRate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    feeRateID: node.data.feeRateID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    contain:node.data.contain, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    quantityEXP:node.data.quantityEXP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (node.data.summaryFees) data.summaryFees = node.data.summaryFees; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(node.sourceType==ModuleNames.ration && node.data.type==rationType.gljRation){//定额类型的工料机做特殊处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    data.code=node.data.code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    data.projectGLJID = node.data.projectGLJID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    delete data.marketUnitFee; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let data = nodeTools.cutNodeForSave(node); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 let newData = {'updateType': 'ut_update', 'updateData': data}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 me.project.push(node.sourceType, [newData]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |