Sfoglia il codice sorgente

子目增加费添加计算管理费

zhangweicheng 5 anni fa
parent
commit
c05eb7be72

+ 3 - 1
modules/main/models/project_consts.js

@@ -73,7 +73,9 @@ const rationType = {
     ration: 1,
     volumePrice: 2,
     gljRation: 3,
-    install:4
+    install:4,
+    overHeight: 5, // 超高子目
+    itemIncrease: 6//子目增加
 };
 module.exports = {
     projectConst: projectConst,

+ 1 - 1
web/building_saas/main/js/models/calc_program.js

@@ -151,7 +151,7 @@ let calcTools = {
         return this.isRationCategory(treeNode) && treeNode.data.type === rationType.ration;
     },
     isCalcManageRation:function(treeNode){
-      return this.isRationCategory(treeNode) && (treeNode.data.type === rationType.ration || treeNode.data.type === rationType.install);
+      return this.isRationCategory(treeNode) && (treeNode.data.type === rationType.ration || treeNode.data.type === rationType.install|| treeNode.data.type === rationType.itemIncrease);
     },
     isVolumePrice: function (treeNode) {
         return this.isRationCategory(treeNode) && treeNode.data.type === rationType.volumePrice;

+ 3 - 0
web/building_saas/main/js/views/item_increase_fee_view.js

@@ -356,9 +356,11 @@ let itemIncreaseFeeObj = {
         let td = getDecimal("ration.totalPrice");
         let gd = getDecimal('glj.quantity');
         let preID="",serialNo=1;
+        let manageFeeRate = null;
         for(let rationNode of node.children){
             rationCodeMap[rationNode.data.code] = rationNode;
             if(rationNode.data.type == rationType.ration || rationNode.data.type == rationType.volumePrice ){//先只汇总定额和量价类型,不考虑自动生成的
+                if(manageFeeRate == null) manageFeeRate = rationNode.data.manageFeeRate;
                 //计算人工费,材料费,机械费
                 if(rationNode.data.feesIndex){
                     let labour = rationNode.data.feesIndex.labour && rationNode.data.feesIndex.labour.totalFee?parseFloat(rationNode.data.feesIndex.labour.totalFee):0;
@@ -410,6 +412,7 @@ let itemIncreaseFeeObj = {
                         serialNo = serialNo+1;
                         let newRationData = this.inserNewItemNodes(node.data.ID,node.data.quantity,preID,serialNo,code,s.name,total,datas);
                         preID = newRationData.ID;
+                        newRationData.manageFeeRate = manageFeeRate;
                     }
                 }else { //如果total小于0,但又存在的话,删除定额(同时后端处理时记得要删除定额工料机)
                     if(ZMZJFnode){