Explorar o código

内蒙养护2022 Bug

chenshilong %!s(int64=3) %!d(string=hai) anos
pai
achega
ca210ccad5
Modificáronse 1 ficheiros con 38 adicións e 9 borrados
  1. 38 9
      web/over_write/js/neimeng_2022.js

+ 38 - 9
web/over_write/js/neimeng_2022.js

@@ -302,8 +302,15 @@ if (typeof baseFigureTemplate !== "undefined") {
       return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
     },
     // 定额建筑安装工程费
+    // DEJZAZGCF(tender) {
+    //   return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "rationCommon");
+    // },
     DEJZAZGCF(tender) {
-      return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "rationCommon");
+      const feeField = "rationCommon";
+      const baseFee = cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, feeField);
+      const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
+      const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "equipment");
+      return (baseFee - equipmentFee * 0.6).toDecimal(decimalObj.bills.totalPrice);
     },
     // 定额建筑安装工程费(定额设备购置费按40%计)
     DEJZAZGCFSBSS(tender) {
@@ -316,9 +323,15 @@ if (typeof baseFigureTemplate !== "undefined") {
       return (afterDeductFee + equipmentAcFee * 0.4).toDecimal(decimalObj.bills.totalPrice);
     },
     // 建筑安装工程费(不含设备费):取清单固定类别是“建筑安装工程”的金额,但要扣除清单固定类别是“设备购置费”的金额
+    // JZAZGCFBHSB(tender) {
+    //   //建安费扣除设备费
+    //   return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.EQUIPMENT_ACQUISITION_FEE], tender, "common");
+    // },
     JZAZGCFBHSB(tender) {
-      //建安费扣除设备费
-      return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.EQUIPMENT_ACQUISITION_FEE], tender, "common");
+      const baseFee = cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
+      const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
+      const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "common");
+      return (baseFee - equipmentFee).toDecimal(decimalObj.bills.totalPrice);
     },
     // 定额建筑安装工程费(不含设备费)
     DEJZAZGCFBHSB(tender) {
@@ -379,10 +392,14 @@ if (typeof baseFigureTemplate !== "undefined") {
       return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
     },
     // 定额建筑安装工程费(不含专项费用)
+    // DEJZAZGCFBHZXF(tender) {
+    //   const baseFee = this["DEJZAZGCF"](tender);
+    //   const zxf = cbTools.getBaseFee(fixedFlag.SPECIAL_COST, tender, "rationCommon");
+    //   return (baseFee - zxf).toDecimal(decimalObj.bills.totalPrice);
+    // },
     DEJZAZGCFBHZXF(tender) {
-      const baseFee = this["DEJZAZGCF"](tender);
-      const zxf = cbTools.getBaseFee(fixedFlag.SPECIAL_COST, tender, "rationCommon");
-      return (baseFee - zxf).toDecimal(decimalObj.bills.totalPrice);
+      // 定额建筑安装工程费(不含专项费用)
+      return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SPECIAL_COST], tender, "rationCommon", true);
     },
     // {建筑安装工程费(不含安全生产费)}
     JZAZGCFBHAQSCF(tender) {
@@ -557,18 +574,30 @@ if (typeof feeRateObject !== "undefined") {
   feeRateObject.feeRateSpecialHandle = function (subRate, value) {
     let result = {};
     if (subRate.name == "施工进出场(km)" && value && value < 5) {
-      //输入的数值(公里数)< 5时,该项费用不计取。
-      result.valueKey = "0";
-      result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
+      result.valueKey = "5"; // 5km 内按 5km 计。
+      result.value = scMathUtil.roundForObj(value, getDecimal("feeRate"));
     }
     return result;
   };
 }
 
 if (typeof module !== "undefined") {
+  const defaultDecimal = {
+    bills: { unitPrice: 2, totalPrice: 0 },
+    ration: { quantity: 3, unitPrice: 2, totalPrice: 0 },
+    glj: { quantity: 3, unitPriceHasMix: 2, unitPrice: 2 },
+    feeRate: 4,
+    quantity_detail: 4,
+    material: 5,
+    process: 6,
+    marketPriceProcess: 2,
+    temProcess: 6,
+  };
+
   module.exports = {
     progression,
     deficiency,
+    defaultDecimal,
   };
 }