瀏覽代碼

量价计算调整

chenshilong 5 年之前
父節點
當前提交
fa30aff949

+ 3 - 0
web/building_saas/main/js/models/calc_program.js

@@ -647,6 +647,9 @@ let calcTools = {
                 };
             }
         };
+
+        let nodeQ = isTender ? calcTools.uiNodeTenderQty(treeNode) : calcTools.uiNodeQty(treeNode);
+        result = (result * nodeQ).toDecimal(decimalObj.ration.totalPrice);
         return result;
     },
     partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) {     // isRationPirce 为true时表示取定额价。如:甲供定额材料费

+ 9 - 4
web/building_saas/main/js/views/calc_program_view.js

@@ -16,13 +16,15 @@ let calcProgramObj = {
             {headerName: "费率", headerWidth: CP_Col_Width.feeRate, dataCode: "feeRate", dataType: "Number"},
             // {headerName: "单价", headerWidth: CP_Col_Width.unitFee, dataCode: "unitFee", dataType: "Number"},
             {headerName: "金额", headerWidth: CP_Col_Width.totalFee, dataCode: "totalFee", dataType: "Number"},
+            //{headerName: "调后单价", headerWidth: CP_Col_Width.unitFee, dataCode: "tenderUnitFee", dataType: "Number"},
+            {headerName: "调后金额", headerWidth: CP_Col_Width.totalFee, dataCode: "tenderTotalFee", dataType: "Number"},
             {headerName: "费用类别", headerWidth:CP_Col_Width.displayFieldName, dataCode:"displayFieldName", dataType: "String", hAlign: "center"},
             {headerName: "基数说明", headerWidth: CP_Col_Width.statement, dataCode: "statement", dataType: "String"},
             {headerName: "备注", headerWidth: CP_Col_Width.memo, dataCode: "memo", dataType: "String"}
         ],
         view: {
             comboBox: [],
-            lockColumns: [0,1,2,3,4,5,6,7,8,9],
+            lockColumns: [0,1,2,3,4,5,6,7,8],
             colHeaderHeight: CP_Col_Width.colHeader,
             rowHeaderWidth: CP_Col_Width.rowHeader
         }
@@ -33,8 +35,8 @@ let calcProgramObj = {
         me.sheet = sheet;
         for (let col of me.setting.header){
             if (col.headerName == '费率') col.tofix = decimalObj.feeRate;
-            if (col.headerName == '单价') col.tofix = decimalObj.ration.unitPrice;
-            if (col.headerName == '合价') col.tofix = decimalObj.ration.totalPrice;
+            if (col.headerName == '单价' || col.headerName == '调后单价') col.tofix = decimalObj.ration.unitPrice;
+            if (col.headerName == '合价' || col.headerName == '调后合价') col.tofix = decimalObj.ration.totalPrice;
         };
         sheetCommonObj.initSheet(me.sheet, me.setting, 1);
     },
@@ -50,7 +52,7 @@ let calcProgramObj = {
             case 1:
                 // doNothing
                 break;
-            case 2:
+            case 2, 4:
                 projectObj.project.calcProgram.innerCalc(treeNode, []);
                 projectObj.project.calcProgram.rationMap = null;
                 delete treeNode.changed;
@@ -62,6 +64,9 @@ let calcProgramObj = {
 
         if (!me.sheet) return;
         me.datas = treeNode.data.calcTemplate ? treeNode.data.calcTemplate.calcItems : [];
+        if (refreshKind === 4) {
+            return;
+        } 
         sheetCommonObj.initSheet(me.sheet, me.setting, me.datas.length);
         sheetCommonObj.showData(me.sheet, me.setting, me.datas);
         customRowHeader(me.sheet, me.datas.length);