瀏覽代碼

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost into 1.0.0_online

zhongzewei 6 年之前
父節點
當前提交
35ff493d15
共有 2 個文件被更改,包括 19 次插入20 次删除
  1. 9 4
      web/building_saas/main/js/models/calc_program.js
  2. 10 16
      web/over_write/js/chongqing_2018.js

+ 9 - 4
web/building_saas/main/js/models/calc_program.js

@@ -365,10 +365,15 @@ let calcTools = {
         };
 
         if (priceType == priceTypes.ptDiffPrice){
-            if (gljTypes == baseMaterialTypes)
-                result = (temp - temp2).toDecimal(decimalObj.ration.unitPrice)
-            else
-                result = (temp.toDecimal(decimalObj.ration.unitPrice) - temp2.toDecimal(decimalObj.ration.unitPrice)).toDecimal(decimalObj.ration.unitPrice);
+            if (typeof isCQ2018 != 'undefined'){
+                result = (temp - temp2).toDecimal(decimalObj.ration.unitPrice)    // 重庆2018所有都是先汇总相减后再取舍
+            }
+            else{
+                if (gljTypes == baseMaterialTypes)
+                    result = (temp - temp2).toDecimal(decimalObj.ration.unitPrice)
+                else
+                    result = (temp.toDecimal(decimalObj.ration.unitPrice) - temp2.toDecimal(decimalObj.ration.unitPrice)).toDecimal(decimalObj.ration.unitPrice);
+            };
         }
         else{
             result = result.toDecimal(decimalObj.ration.unitPrice);

+ 10 - 16
web/over_write/js/chongqing_2018.js

@@ -46,6 +46,7 @@ if(typeof materialComponent !== 'undefined'){
 }
 
 // CSL, 2018-08-21 计算程序、基数 的覆盖。---------------------------------------------------------------------------------
+let isCQ2018 = true;
 baseMaterialTypes.push(gljType.OTHER_MATERIAL);
 allMaterialTypes.delete(gljType.EQUIPMENT);
 baseMachineTypes.delete(gljType.MACHINE_COMPOSITION);
@@ -85,7 +86,7 @@ function overwriteRationCalcBases (taxType){
         rationCalcBases['材料费价差'] = function (node, isTender) {
             return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptDiffPrice, isTender);
         };
-        if (isJY){
+/*        if (isJY){
             rationCalcBases['计价材料价差'] = function (node, isTender) {
                 let baseMaterialTypesWithoutOtherMaterial = [
                     gljType.GENERAL_MATERIAL,
@@ -97,7 +98,7 @@ function overwriteRationCalcBases (taxType){
                 ];
                 return calcTools.rationBaseFee(node, baseMaterialTypesWithoutOtherMaterial, priceTypes.ptDiffPrice, isTender);
             };
-        };
+        };*/
         rationCalcBases['机上人工费价差'] = function (node, isTender) {
             return calcTools.rationBaseFee(node, [gljType.MACHINE_LABOUR], priceTypes.ptDiffPrice, isTender);
         };
@@ -109,32 +110,25 @@ function overwriteRationCalcBases (taxType){
                 return calcTools.rationBaseFee(node, [gljType.OTHER_MACHINE_USED], priceTypes.ptBasePrice, isTender);
             };
             rationCalcBases['机械折旧费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [], baseMachineMasterTypes,
-                    gljType.DEPRECIATION_FEE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.DEPRECIATION_FEE, isTender);
             };
             rationCalcBases['特大机械检修费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], baseMachineMasterTypes,
-                    gljType.INSPECTION_FEE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], gljType.INSPECTION_FEE, isTender);
             };
             rationCalcBases['中小机械检修费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], baseMachineMasterTypes,
-                    gljType.INSPECTION_FEE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], gljType.INSPECTION_FEE, isTender);
             };
             rationCalcBases['特大机械维护费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], baseMachineMasterTypes,
-                    gljType.MAINTENANCE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [1, 2], gljType.MAINTENANCE, isTender);
             };
             rationCalcBases['中小机械维护费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], baseMachineMasterTypes,
-                    gljType.MAINTENANCE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [3, 4], gljType.MAINTENANCE, isTender);
             };
             rationCalcBases['安拆费及场外运输费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [], baseMachineMasterTypes,
-                    gljType.DISMANTLING_FREIGHT_FEE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.DISMANTLING_FREIGHT_FEE, isTender);
             };
             rationCalcBases['燃料动力费'] = function (node, isTender) {
-                return calcTools.machineDetailFee(node, node.data.gljList, [], baseMachineMasterTypes,
-                    gljType.FUEL_POWER_FEE, isTender);
+                return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.FUEL_POWER_FEE, isTender);
             };
             rationCalcBases['定额仪器仪表费'] = function (node, isTender) {
                 return calcTools.rationBaseFee(node, [gljType.INSTRUMENT], priceTypes.ptBasePrice, isTender);