Переглянути джерело

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

TonyKang 4 роки тому
батько
коміт
56f6c69ced

+ 1 - 1
modules/unit_price_file/controllers/unit_price_controller.js

@@ -43,7 +43,7 @@ module.exports={
           versionName: req.session.compilationVersion,
           unitFileName:unitPriceFile.name,
           rootProjectName:project.name,
-          usedTenderList:usedTenderList,
+          usedTenderList:JSON.stringify(usedTenderList),
           usedTenderString:usedTenderString,
           unitpriceList:JSON.stringify(unitpriceList),
           gljTypeMap:JSON.stringify(gljTypeMap),

+ 1 - 1
public/web/socket/connection.js

@@ -82,7 +82,7 @@ socketObject = {
         socket.on('handleAvatarList', function ({ editingUsers }) {
             projectInfoObj.handleAvatarList(editingUsers);
         });
-        SHARE_TO.permissionChangeListener();
+        if(typeof SHARE_TO !== 'undefined')SHARE_TO.permissionChangeListener();
 
 
         //=============================================================================================

+ 4 - 0
web/building_saas/css/custom.css

@@ -616,4 +616,8 @@ input.text-right {
 
 .modal-footer {
   padding: .75rem !important;
+}
+
+#div_more_dropdown_right{
+  transform: translate3d(-105px, 32px, 0px)!important
 }

Різницю між файлами не показано, бо вона завелика
+ 5 - 3
web/building_saas/main/js/models/feeRateConsts.js


+ 5 - 5
web/building_saas/main/js/models/project_glj.js

@@ -978,7 +978,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap,needU
         }
         sum = scMathUtil.roundForObj(sum,decimal)+"";
         if(type == "freight"){
-          let exp = expList.length == 0?`${temp.otherFee}x${temp.weightCoe}`:`((${expList.join("+")})+${temp.otherFee})x${temp.weightCoe}`
+          let exp = expList.length == 0?`${temp.otherFee}×${temp.weightCoe}`:`((${expList.join("+")})+${temp.otherFee})×${temp.weightCoe}`
           let ndoc = {};
           if(temp.unitFreight != sum) ndoc['unitFreight'] = sum;
           ndoc['exp'] = exp;
@@ -1010,21 +1010,21 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap,needU
                 let t = scMathUtil.roundForObj(quantity * g.marketPrice * rationQuantity,processDecimal);//市场价
                 let r_price = gljUtil.getAssUsedPrice(g);//浙江定额时特殊处理,这里取市场价
                 let rt = scMathUtil.roundForObj(quantity * r_price * rationQuantity,processDecimal);//定额价
-                let calString = `${quantity}x${r_price}x${rationQuantity}`;  
+                let calString = `${quantity}×${r_price}×${rationQuantity}`;  
                 if(g.type == gljUtil.gljType.LABOUR){
                   laberSum = scMathUtil.roundForObj(laberSum+rt,processDecimal);
-                  assList.push(`${calString}x${assFeeRate*100}%`) 
+                  assList.push(`${calString}×${assFeeRate*100}%`) 
                 } 
                 if(gljUtil.getMainType(g.type) == 3) machineSum = scMathUtil.roundForObj(machineSum+rt,processDecimal); 
                
-                expList.push(`${quantity}x${g.marketPrice}x${rationQuantity}`); 
+                expList.push(`${quantity}×${g.marketPrice}×${rationQuantity}`); 
                 result = scMathUtil.roundForObj(result + t,processDecimal);
             }
             let as = scMathUtil.roundForObj(laberSum * assFeeRate,processDecimal);//人工消耗量*定额价*定额工程量*辅助生产间接费费率
             let tt = scMathUtil.roundForObj(laberSum + machineSum,processDecimal);//人工定额消耗量*定额价*定额工程量+机械定额消耗量*定额价*定额工程量
             let hs = scMathUtil.roundForObj(tt*hightFeeRate,processDecimal);//(人工定额消耗量*定额价*定额工程量+机械定额消耗量*定额价*定额工程量)*高原取费类别费率
             exp = expList.join("+");
-            if(hightFeeRate!=0) exp += `+${tt}x${hightFeeRate*100}%`;
+            if(hightFeeRate!=0) exp += `+${tt}×${hightFeeRate*100}%`;
             if(assFeeRate!=0 && assList.length > 0) exp += '+'+assList.join("+");
             result = scMathUtil.roundForObj(as + result,processDecimal);
             result = scMathUtil.roundForObj(hs + result,processDecimal);

+ 19 - 15
web/building_saas/main/js/views/material_calc_view.js

@@ -462,7 +462,7 @@ materialCalcObj = {
       let material = materialCalcObj.getMaterialSelected();
       if(gljUtil.isDef(item.materialType)&&item.materialType != ""){
         let uString = materialCalcObj.getNeiMengUnitFreightString(item.kmDistance,item.materialType);
-        return `((${uString}x(1+${item.freightIncreaseRate}%)+${item.unitLoadingFee}x${item.loadingTimes})/1.09+${item.otherFee})x${material.grossWeightCoe_n}x${item.weightCoe}`;
+        return `((${uString}×(1+${item.freightIncreaseRate}%)+${item.unitLoadingFee}×${item.loadingTimes})/1.09+${item.otherFee})×${material.grossWeightCoe_n}×${item.weightCoe}`;
       }
       //(单位运价×(1+运距增加率%)+装卸费单价×装卸次数+其它费用)×单位毛重×加权系数
       if(item.conveyance == "自办运输"){
@@ -471,7 +471,7 @@ materialCalcObj = {
       }
 
       //(单位运价×km运距×(1+运距增加率%)+装卸费单价×装卸次数+其它费用)×单位毛重×加权系数
-      return `(${item.unitFreight}x${item.kmDistance}x(1+${item.freightIncreaseRate}%)+${item.unitLoadingFee}x${item.loadingTimes}+${item.otherFee})x${material.grossWeightCoe_n}x${item.weightCoe}`;
+      return `(${item.unitFreight}×${item.kmDistance}×(1+${item.freightIncreaseRate}%)+${item.unitLoadingFee}×${item.loadingTimes}+${item.otherFee})×${material.grossWeightCoe_n}×${item.weightCoe}`;
     },
     getSavedFreight:function (start,material) {
         let t = null;
@@ -630,16 +630,20 @@ materialCalcObj = {
         kmDistance =  scMathUtil.roundForObj(kmDistance,decimal);
         //用截取的方式,一段段取值
         let less = kmDistance - 5;//kmDistance <= 5 这段
+        let backLess = less;
         if(less <= 0) return baseFreight ;  //kmDistance <= 5 的时候直接取baseFreight
 
         //5< kmDistance <= 15  每增运1km 则增加0.6
-        less = less - 10;
-        if(less <=0)  return scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj((less + 10) * 0.6,6),decimal);//baseFreight + (less + 10) * 0.6;
-        baseFreight = baseFreight + 10 * 0.6; //累加5到15这一段的运费;
+        less = scMathUtil.roundForObj(less - 10,decimal);
+        backLess = scMathUtil.roundForObj(less + 10,decimal);
+
+        if(less <=0)  return scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj(backLess * 0.6,6),decimal);//baseFreight + (less + 10) * 0.6;
+        baseFreight = scMathUtil.roundForObj(baseFreight + 10 * 0.6,6); //累加5到15这一段的运费;
 
         //15< kmDistance <= 100  每增运1km 则增加0.45
-        less = less - 85;
-        if(less <=0) return scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj((less + 85)*0.45,6),decimal);//baseFreight + (less + 85)*0.45;
+        less = scMathUtil.roundForObj(less - 85,decimal);
+        backLess = scMathUtil.roundForObj(less + 85,decimal);
+        if(less <=0) return scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj(backLess*0.45,6),decimal);//baseFreight + (less + 85)*0.45;
         baseFreight = scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj(85*0.45,6),6) ;  //累加15到100这一段的运费;
         return scMathUtil.roundForObj(baseFreight + scMathUtil.roundForObj(less * 0.35,6),decimal); // >100 的所有部分每增运1km 则增加0.35  baseFreight + less * 0.35
     },
@@ -652,18 +656,18 @@ materialCalcObj = {
         kmDistance =  scMathUtil.roundForObj(kmDistance,decimal);
         let resultString = baseFreight+"";
         //用截取的方式,一段段取值
-        let less = kmDistance - 5;//kmDistance <= 5 这段
+        let less = scMathUtil.roundForObj(kmDistance - 5,decimal);//kmDistance <= 5 这段
         if(less <= 0) return resultString ; //kmDistance <= 5 的时候直接取baseFreight
 
         //5< kmDistance <= 15  每增运1km 则增加0.6
-        less = less - 10;
-        if(less <=0)  return `(${resultString}+0.6x${less + 10})`;//baseFreight + (less + 10) * 0.6;
-        resultString =  `${resultString}+0.6x10`;
+        less = scMathUtil.roundForObj(less - 10,decimal);
+        if(less <=0)  return `(${resultString}+0.6×${scMathUtil.roundForObj(less + 10,decimal)})`;//baseFreight + (less + 10) * 0.6;
+        resultString =  `${resultString}+0.6×10`;
         //15< kmDistance <= 100  每增运1km 则增加0.45
-        less = less - 85;
-        if(less <=0) return `(${resultString}+0.45x${less + 85})`; //baseFreight + (less + 85)*0.45;
-        resultString = `${resultString}+0.45x85`;
-        return `(${resultString}+0.35x${less})`;// >100 的所有部分每增运1km 则增加0.35  baseFreight + less * 0.35
+        less = scMathUtil.roundForObj(less - 85,decimal);
+        if(less <=0) return `(${resultString}+0.45×${scMathUtil.roundForObj(less + 85,decimal)})`; //baseFreight + (less + 85)*0.45;
+        resultString = `${resultString}+0.45×85`;
+        return `(${resultString}+0.35×${less})`;// >100 的所有部分每增运1km 则增加0.35  baseFreight + less * 0.35
     },
 
     onFreightRationValueChange:function (sender,args) {

+ 1 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -73,7 +73,7 @@ const projTreeObj = {
         //0.48 0.13 0.15 0.15 0.09
         header: [
             {name: '工程列表', dataCode: 'name', width: 300, vAlign: 'center', hAlign: 'left'},
-            {name: '总造价', dataCode: 'totalCost', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0'},
+            {name: '总造价', dataCode: 'totalCost', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
             {name: '项目类别', dataCode: 'valuationType', width: 100, vAlign: 'center', hAlign: 'left'},
             {name: '单价文件', dataCode: 'unitPriceFile', width: 140, vAlign: 'center', hAlign: 'left'},
             {name: '费率文件', dataCode: 'feeRateFile', width: 140, vAlign: 'center', hAlign: 'left'},

+ 2 - 1
web/building_saas/unit_price_file/index.html

@@ -40,6 +40,7 @@
   let unitPriceFileID = parseInt('<%- unitPriceFileID %>');
   let userID = '<%- userID %>';
   let projectID = '<%- projectID %>';
+  let usedTenderList = JSON.parse(`<%- usedTenderList %>`);
   let unitPriceList = JSON.parse(`<%- unitpriceList %>`);
   let gljTypeMap = JSON.parse(`<%- gljTypeMap %>`);
   let mixRatioMap = JSON.parse(`<%- mixRatioMap %>`);
@@ -74,7 +75,7 @@
             <span class="text-muted px-1"></span>
              <span><i class="fa fa-puzzle-piece"></i></span>
             <span class="text-truncate" data-toggle="tooltip" data-placement="bottom" data-original-title="<%= unitFileName%>">&nbsp;<%= unitFileName%></span>
-            &nbsp;(<span class="a_color" data-toggle="tooltip" id="pop-used-list"  style="float: none;" data-original-title="" title="<%= usedTenderString%>">与<span id="used-project-count" style="float: none;">1</span>个单位工程同步</span>)
+            &nbsp;(<span class="a_color" data-toggle="tooltip" id="pop-used-list"  style="float: none;" data-original-title="" title="<%= usedTenderString%>">与<span id="used-project-count" style="float: none;"> </span>个单位工程同步</span>)
           </div>
         </nav>
     </div>

+ 2 - 0
web/building_saas/unit_price_file/index.js

@@ -803,6 +803,8 @@ function initPage() {
   unitPriceObj.showMainDatas();
   unitPriceObj.showSubDatas();
   socketObject.connect("unitPrice");
+  let usedCount = usedTenderList.length;
+  $("#used-project-count").text(usedCount); 
 }
 
 unitPriceObj.setUntiPriceMap();

+ 457 - 0
web/over_write/js/sichuan_2021.js

@@ -0,0 +1,457 @@
+/**
+ * Created by CSL on 2021/08/19.  四川养护(2021)。
+ */
+
+let isSC2021 = true;
+function overwriteRationCalcBases() {
+    if (typeof rationCalcBases == 'undefined') return;
+    for (let key in rationCalcBases) delete rationCalcBases[key];
+
+    rationCalcBases['人工费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
+    };
+    rationCalcBases['材料费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
+    };
+    rationCalcBases['施工机械使用费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
+    };
+    rationCalcBases['施工机械人工费'] = function (node, isTender) {
+        return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.MACHINE_LABOUR, isTender);
+    };
+    rationCalcBases['设备购置费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
+    };
+
+    rationCalcBases['定额人工费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额材料费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额施工机械使用费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额商品砼费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额设备购置费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额外购砼构件费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptBasePrice, isTender);
+    };
+    rationCalcBases['定额绿化苗木费'] = function (node, isTender) {
+        return calcTools.rationBaseFee(node, [gljType.GREEN_SEEDLING], priceTypes.ptBasePrice, isTender);
+    };
+};
+
+(function overwriteFeeTypes() {
+    if (typeof cpFeeTypes == 'undefined') return;
+    cpFeeTypes = [
+        { type: 'marketDirect', name: '直接费' },
+        { type: 'marketLabour', name: '人工费' },
+        { type: 'marketMaterial', name: '材料费' },
+        { type: 'marketMachine', name: '施工机械使用费' },
+        { type: 'marketMachineLabour', name: '施工机械人工费' },
+        { type: 'marketEquipment', name: '设备购置费' },
+
+        { type: 'labour', name: '定额人工费' },
+        { type: 'material', name: '定额材料费' },
+        { type: 'machine', name: '定额施工机械使用费' },
+        { type: 'equipment', name: '定额设备购置费' },
+        { type: 'direct', name: '定额直接费' },
+
+        { type: 'measure', name: '措施费' },
+        { type: 'manage', name: '企业管理费' },
+        { type: 'force', name: '规费' },
+        { type: 'profit', name: '利润' },
+        { type: 'tax', name: '税金' },
+        { type: 'common', name: '建安费' },
+        { type: 'rationCommon', name: '定额建安费' }
+    ];
+})();
+
+
+// 清单基数
+const progression = [
+    '施工场地建设费', '养护管理单位项目管理费', '养护项目信息化费', '工程监理费', '设计文件审查费(一阶段)', '设计文件审查费(二阶段)',
+    '采用一阶段设计的工程设计费、招标费', '采用二阶段设计的工程设计费、招标费', '独立立项进行维修、加固的桥梁工程设计费、招标费',
+    '独立立项进行维修、加固的隧道工程设计费、招标费', '独立立项进行维修、加固的机电工程设计费、招标费'
+];
+const deficiency = { 
+    '设计文件审查费(一阶段)': 2000, '设计文件审查费(二阶段)': 2000, '采用一阶段设计的工程设计费、招标费': 5000, '采用二阶段设计的工程设计费、招标费': 5000,
+    '独立立项进行维修、加固的桥梁工程设计费、招标费': 5000, '独立立项进行维修、加固的隧道工程设计费、招标费': 5000, '独立立项进行维修、加固的机电工程设计费、招标费': 5000
+};
+if (typeof baseFigureMap !== 'undefined') {
+    const { fixedFlag } = commonConstants;
+    const budgetMap = {
+        // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
+        '建筑安装工程费': {
+            base: 'JZAZGCF',
+            fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+            filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
+            pick: false,
+        },
+        // 显示:仅清单固定类别是“安全生产费”可显示。
+        '建筑安装工程费(不含安全生产费)': {
+            base: 'JZAZGCFBHSC',
+            fixedFlag: null,
+            filter: [fixedFlag.SAFE_COST],
+            pick: true
+        },
+        // 显示:除“建筑安装工程费”以外部分可显示
+        '建筑安装工程费(不含设备费)': {
+            base: 'JZAZGCFBHSB',
+            fixedFlag: null,
+            filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
+            pick: false,
+        },
+        // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
+        '定额建筑安装工程费': {
+            base: 'DEJZAZGCF',
+            fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+            filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
+            pick: false
+        },
+        // 显示:仅清单固定类别是“专项费用”可显示。
+        '定额建筑安装工程费(不含专项费用)': {
+            base: 'DEJZAZGCFBHZXFY',
+            fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+            filter: [fixedFlag.SPECIAL_COST],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“专项费用”可显示
+        '施工场地建设费': {
+            isProgressive: true,
+            base: 'SGCDJSF',
+            fixedFlag: null,
+            filter: [fixedFlag.SPECIAL_COST],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '养护管理单位项目管理费': {
+            isProgressive: true,
+            base: 'YHDWGLF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '养护项目信息化费': {
+            isProgressive: true,
+            base: 'YHXMXXHF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '工程监理费': {
+            isProgressive: true,
+            base: 'GCJLF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '设计文件审查费(一阶段)': {
+            isProgressive: true,
+            deficiency: 2000,
+            base: 'SJWJSCFYJD',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '设计文件审查费(二阶段)': {
+            isProgressive: true,
+            deficiency: 2000,
+            base: 'SJWJSCFEJD',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '采用一阶段设计的工程设计费、招标费': {
+            isProgressive: true,
+            deficiency: 5000,
+            base: 'CYYJDSJDGCSJFZBF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '采用二阶段设计的工程设计费、招标费': {
+            isProgressive: true,
+            deficiency: 5000,
+            base: 'CYEJDSJDGCSJFZBF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '独立立项进行维修、加固的桥梁工程设计费、招标费': {
+            isProgressive: true,
+            deficiency: 5000,
+            base: 'DLLXJXWXJGDQLGCSJFZBF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '独立立项进行维修、加固的隧道工程设计费、招标费': {
+            isProgressive: true,
+            deficiency: 5000,
+            base: 'DLLXJXWXJGDSDGCSJFZBF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
+        '独立立项进行维修、加固的机电工程设计费、招标费': {
+            isProgressive: true,
+            deficiency: 5000,
+            base: 'DLLXJXWXJGDJDGCSJFZBF',
+            fixedFlag: null,
+            filter: [fixedFlag.MAINTENANCE_EXPENSES],
+            pick: true,
+        },
+        // 显示:仅“价差预备费”可显示
+        '价差预备费': {
+            base: 'JCYBF',
+            fixedFlag: null,
+            filter: [fixedFlag.SPREAD_BUDGET_FEE],
+            pick: true,
+        },
+    };
+    const boqMap = {
+        //仅允许用于固定类别是“第100章至700章清单”以外的清单
+        '各章清单合计': {
+            base: 'GZQDHJ',
+            fixedFlag: fixedFlag.ONE_SEVEN_BILLS,
+            filter: [fixedFlag.ONE_SEVEN_BILLS],
+            pick: false
+        },
+        //仅允许用于固定类别是“第100章至700章清单”以外的清单
+        '专项暂定合计': {
+            base: 'ZXZDHJ',
+            fixedFlag: null,
+            filter: [fixedFlag.ONE_SEVEN_BILLS],
+            pick: false
+        },
+        /*
+        *  清单固定行[第100章至700章清单]下的[第100章清单]需要允许清单可使用基数{100章以外合计}
+        *  因此{100章以外合计}不设置关联的清单固定行
+        * */
+        //仅允许用于固定类别为“100章清单”引用
+        '100章以外清单合计': {
+            base: 'YBZYHQDHJ',
+            fixedFlag: null,
+            filter: [fixedFlag.ONE_HUNDRED_BILLS],
+            pick: true
+        }
+    };
+    baseFigureMap.budget = budgetMap;
+    baseFigureMap.boq = boqMap;
+}
+
+if (typeof baseFigureTemplate !== 'undefined') {
+    const { fixedFlag } = commonConstants;
+    baseFigureTemplate.budget = {
+        // 建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的金额。
+        JZAZGCF(tender) {
+            return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, 'common');
+        },
+        // 建筑安装工程费(不含安全生产费) 算法:取清单固定类别是“建筑安装工程费”的金额,扣除“安全生产费”的金额。
+        JZAZGCFBHSC(tender) {
+            return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SAFE_COST], tender, 'common');
+        },
+        // 建筑安装工程费(不含设备费) 算法:取清单固定类别是“建筑安装工程费”的金额,扣除设备的金额。
+        JZAZGCFBHSB(tender) {
+            const baseFee = this['JZAZGCF'](tender);
+            const fixedNode = projectObj.project.mainTree.roots.find(node => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
+            const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender);
+            return (baseFee - equipmentFee).toDecimal(decimalObj.bills.totalPrice);
+        },
+        // 定额建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的定额建安费。
+        DEJZAZGCF(tender) {
+            return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, 'rationCommon');
+        },
+        // 定额建筑安装工程费(不含专项费) 算法:取清单固定类别是“建筑安装工程费”的“定额建安费”,扣除“专项费用”的“定额建安费”。
+        DEJZAZGCFBHZXFY(tender) {
+            //建安费扣除设备费
+            return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SPECIAL_COST], tender, 'rationCommon');
+        },
+        // 施工场地建设费 算法:以{定额建筑安装工程费(不含专项费用) }为基数,采用累进办法计算。
+        SGCDJSF(tender) {
+            const baseFee = this['DEJZAZGCFBHZXFY'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '施工场地建设费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 养护管理单位项目管理费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。
+        YHDWGLF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '养护管理单位项目管理费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 养护项目信息化费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。
+        YHXMXXHF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '养护项目信息化费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 工程监理费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。
+        GCJLF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '工程监理费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 设计文件审查费(一阶段) 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        SJWJSCFYJD(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '设计文件审查费(一阶段)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 设计文件审查费(二阶段) 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        SJWJSCFEJD(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '设计文件审查费(二阶段)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 采用一阶段设计的工程设计费、招标费 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        CYYJDSJDGCSJFZBF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '采用一阶段设计的工程设计费、招标费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 采用二阶段设计的工程设计费、招标费 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        CYEJDSJDGCSJFZBF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '采用二阶段设计的工程设计费、招标费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 独立立项进行维修、加固的桥梁工程设计费、招标费 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        DLLXJXWXJGDQLGCSJFZBF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '独立立项进行维修、加固的桥梁工程设计费、招标费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 独立立项进行维修、加固的隧道工程设计费、招标费 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        DLLXJXWXJGDSDGCSJFZBF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '独立立项进行维修、加固的隧道工程设计费、招标费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        // 独立立项进行维修、加固的机电工程设计费、招标费 算法:以{定额建筑安装工程费 }为基数,采用累进办法计算。
+        DLLXJXWXJGDJDGCSJFZBF(tender) {
+            const baseFee = this['DEJZAZGCF'](tender);
+            if (!tender) {
+                calcBase.baseProgressiveFee = baseFee;
+            }
+            return calculateUtil.getProgressiveFee(baseFee, '独立立项进行维修、加固的机电工程设计费、招标费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+        },
+        /*  价差预备费 算法:以建筑安装工程费为基数,按设计文件编制年始至养护项目工程竣工年终的年数和年工程造价增涨率计算。
+            价差预备费 P * [(1+i)^(n-1) -1]
+            P——建筑安装工程费总额(元);
+            i——年工程造价增涨率(%);
+            n——设计文件编制年至养护项目开工年+养护项目建设期限(年)。
+        */
+        JCYBF(tender) {
+            //建筑安装工程费作为基数
+            const installFee = this['JZAZGCF'](tender);
+            //年造价增涨
+            const costGrowthRate = calcBase.project.property.costGrowthRate
+                ? calcBase.project.property.costGrowthRate
+                : 0;
+            //增涨计费年限
+            const growthPeriod = projectObj.project.property.growthPeriod
+                ? calcBase.project.property.growthPeriod
+                : 0;
+            //= P * [(1+i)^(n-1) -1]
+            return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
+        }
+
+    };
+
+    baseFigureTemplate.boq = {
+        //{各章清单合计}
+        // 取清单固定类别是“第100章至700章清单”的金额
+        'GZQDHJ': function (tender) {
+            return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, 'common');
+        },
+        //{专项暂定合计}
+        // 第100章至700章清单行的暂估合价
+        'ZXZDHJ': function (tender) {
+            return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, 'estimate');
+        },
+        //{100章以外清单合计}
+        // 取清单固定清单[第100章至700章清单]的金额,但扣除清单100章下的金额。
+        // 如果是固定清单[第100章至700章清单]下100章以外清单引用此基数,要排除自身(目前只允许100章的清单使用,所以暂时不需要此判断)
+        'YBZYHQDHJ': function (tender) {
+            let oneToSeven = cbTools.findNodeByFlag(fixedFlag.ONE_SEVEN_BILLS);
+            if (!oneToSeven) {
+                return 0;
+            }
+            //100-700章固定节点的所有子节点
+            let allChildren = [];
+            function getChildren(nodes) {
+                allChildren = allChildren.concat(nodes);
+                for (let node of nodes) {
+                    if (node.children.length > 0) {
+                        getChildren(node.children);
+                    }
+                }
+            }
+            getChildren(oneToSeven.children);
+            //扣除的节点:100章的节点[100-200)
+            let deductNodes = allChildren.filter(cbTools.withingOneHundred);
+            //计算金额
+            let fullFeeField = tender ? 'common.tenderTotalFee' : 'common.totalFee';
+            return projectObj.project.calcProgram.getTotalFee([oneToSeven], deductNodes, fullFeeField).toDecimal(decimalObj.bills.totalPrice);
+        }
+    };
+}
+
+if (typeof projectObj !== 'undefined') {
+    projectObj.isInsertEquipmentVisable = function (selected) {
+        return true;   //四川养护2021不管是预算或者工程量清单,都是显示
+    }
+  }
+
+if (typeof feeRateObject !== 'undefined') {
+    feeRateObject.feeRateSpecialHandle = function (subRate, value) {
+        let result = {};
+        if (subRate.name == "施工进出场(km)" && value && value < 5) {//施工进出场5km以内按5km算
+            result.valueKey = "5";
+            result.value = scMathUtil.roundForObj(value, getDecimal("feeRate"));//设置显示的节点值
+        }
+        return result;
+    }
+}
+
+if (typeof module !== 'undefined') {
+    module.exports = {
+        progression,
+        deficiency,
+    };
+}