فهرست منبع

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

zhangweicheng 5 سال پیش
والد
کامیت
d1eed13139

+ 3 - 1
modules/main/facade/project_facade.js

@@ -420,7 +420,9 @@ function getReportData(nameList, items, prjTypeNames, compilationScopes, decimal
     if (progressiveInterval && isProgressiveType && rootFlag == fixedFlag.MAINTENANCE_EXPENSES) {
       let baseArr = calcUtil.getProgressive(bills.calcBase, overWrite ? overWrite.progression : undefined);
       if (baseArr.length > 0) {
-        let calcTotal = calcUtil.getProgressiveFee(baseTotal, baseArr[0], progressiveInterval, decimal.bills.totalPrice, overWrite ? overWrite.deficiency : undefined);
+        let deficiency = overWrite && overWrite.deficiency || null;
+        let beyond = overWrite && overWrite.beyond || null;
+        let calcTotal = calcUtil.getProgressiveFee(baseTotal, baseArr[0], progressiveInterval, decimal.bills.totalPrice, deficiency, beyond );
         tem.billsTtlPrice = calcTotal;
         let rate = scMathUtil.roundForObj(calcTotal * 100 / baseTotal, decimal.feeRate);
         tem.billsMemos = "费率:" + rate + "%";

+ 1 - 1
modules/main/middleware/index.js

@@ -54,7 +54,7 @@ function isAjax(req) {
 // 登录状态全局判断
 async function stateChecking(req, res, next) {
     const url = req.originalUrl;
-    if (url == "\/" || /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/captcha/.test(url)) {
+    if (url == "\/" || /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/cld\/(?!getCategoryStaff)/.test(url) || /^\/captcha/.test(url)) {
         // 如果是登录页面或短信接口或cld接口则忽略判断数据
         next();
     } else {

+ 1 - 0
modules/pm/controllers/pm_controller.js

@@ -772,6 +772,7 @@ module.exports = {
                             } else if (projC.projType === projType.tender) {
                                 // 设置项目类别
                                 projC.valuationType = projC.property.valuationType === 'bill' ? '预算' : '工程量清单';
+                                projC._valuationType = projC.property.valuationType;
                                 //设置工程专业
                                 projC.feeStandardName = projC.property.feeStandardName || '';
                             }

+ 9 - 2
public/calculate_util.js

@@ -29,9 +29,10 @@
      * @param {Array} progressiveData - 项目的累进数据(property.progressiveInterval)
      * @param {Number} decimal - 精度
      * @param {Object} deficiency - 不足处理映射 @example: {'路线工程监理费': 20000 } // 不足2万按2万
+     * @param {Object} beyond - 超出处理映射 @example: {'路线工程监理费': 500000 } // 超过50万按50万
      * @return {Number}
      */
-    function getProgressiveFee(baseFee, name, progressiveData, decimal, deficiency) {
+    function getProgressiveFee(baseFee, name, progressiveData, decimal, deficiency, beyond) {
         if (!progressiveData) {
             throw '该项目不存在累进区间数据';
         }
@@ -104,8 +105,14 @@
         }
         //累进所在区间
         fee = scMathUtil.roundForObj(fee + (baseFee - withinData.min) * withinData.feeRate * 0.01, decimal);
-        // 不足处理
+        // 不足、超出处理
         const deficiencyFee = deficiency && deficiency[name] || 0;
+        const beyondFee = beyond && beyond[name] || 0;
+        return deficiencyFee && fee > 0 && fee < deficiencyFee
+            ? deficiencyFee
+            : beyondFee && fee > beyondFee
+                ? beyondFee
+                : fee;
         return deficiencyFee
             ? fee > 0 && fee < deficiencyFee
                 ? deficiencyFee

+ 1 - 0
web/building_saas/main/js/views/calc_program_view.js

@@ -56,6 +56,7 @@ let calcProgramObj = {
             case 4:
                 projectObj.project.calcProgram.innerCalc(treeNode, []);
                 projectObj.project.calcProgram.rationMap = null;
+                projectObj.project.calcProgram.pgljMap = null;
                 delete treeNode.changed;
                 break;
             case 3:

+ 1 - 4
web/building_saas/report/js/rpt_print.js

@@ -75,8 +75,6 @@ let rptPrintHelper = {
                 if (pixelSize[0] > pixelSize[1]) {
                     //引用了padding,这里要处理下了
                 }
-                // console.log('actAreaOffsetX: ' + actAreaOffsetX);
-                // console.log('actAreaOffsetY: ' + actAreaOffsetY);
             }
             let svgPageArr = [];
             // console.log(pixelSize);
@@ -137,8 +135,7 @@ function buildCellSvg(cell, fonts, styles, controls, pageMergeBorder, rptMergeBo
     if (isHtoV) {
         // HtoVStr = ` transform="translate(`+ (actArea.Bottom - actArea.Top + 5) + `,` + (actArea.Left - actArea.Top ) + `) rotate(90)"`;
         //引用了padding后,top坐标不用考虑offset了
-        HtoVStr = ` transform="translate(${(actArea.Bottom - actArea.Top)},0) rotate(90)"`;
-        //console.log(actArea);
+        HtoVStr = ` transform="translate(${(actArea.Bottom - actArea.Top + 2)},0) rotate(90)"`;
     }
     if (style) {
         let leftBS = getActualBorderStyle(cell, styles, mergeBandStyle, (pageMergeBorder)?pageMergeBorder:rptMergeBorder[JV.PROP_AREA], JV.PROP_LEFT);

+ 3 - 3
web/building_saas/standard_interface/config.js

@@ -51,9 +51,9 @@ const INTERFACE_CONFIG = (() => {
     '安徽@黄山': {
       scriptName: 'anhui_maanshan.js',
       fileSuffix: {
-        [BID_INVITATION]: '.HSGLZB',
-        [BID_SUBMISSION]: '.HSGLTB',
-        [CONTROL]: '.HSGLKZJ',
+        [BID_INVITATION]: '.GLZ',
+        [BID_SUBMISSION]: '.GLT',
+        [CONTROL]: '.GLX',
       },
     },
     '安徽@宣城': {

+ 25 - 11
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -317,8 +317,14 @@ INTERFACE_EXPORT = (() => {
     // 清单标题 造价书的第一层数据。
     function QdBt(node, allNodes) {
       const row = node.row();
-      const fee = isBidInvitation ? '0' : getFee(node.data.fees, 'common.tenderTotalFee')
-      const calcBase = node.data.calcBase ? cbParser.toFExpr(node.data.calcBase, allNodes) : '';
+      const orgFee = getFee(node.data.fees, 'common.tenderTotalFee');
+      const fee = isBidInvitation ? '0' : orgFee;
+      const titleType = BillsTitleType[node.getFlag()];
+      const calcBase = titleType === '5'
+        ? orgFee
+        : node.data.calcBase
+          ? cbParser.toFExpr(node.data.calcBase, allNodes)
+          : '';
       const attrs = [
         { name: 'Xh', value: row, type: TYPE.INT }, // 序号
         { name: 'Bm', value: node.data.code }, // 编码
@@ -326,15 +332,23 @@ INTERFACE_EXPORT = (() => {
         { name: 'Je', value: fee, type: TYPE.DECIMAL }, // 金额
         { name: 'Code', value: `F${row}` }, // 行引用
         { name: 'Jsgs', value: calcBase }, // 计算基数
-        { name: 'Lb', value: BillsTitleType[node.getFlag()], type: TYPE.INT }, // 类别
+        { name: 'Lb', value: titleType, type: TYPE.INT }, // 类别
         { name: 'Bz', value: node.data.remark }, // 备注
       ];
       Element.call(this, 'QdBt', attrs);
     }
 
     // 清单明细 (只有100-700章清单标题输出)
-    function QdMx(node) {
+    function QdMx(node, allNodes) {
       const row = node.row();
+      const iszg = node.data.specialProvisional === '专业工程';
+      const calcBaseBeFee = iszg || node.getFlag() === fixedFlag.PROVISIONAL;
+      const orgFee = getFee(node.data.fees, 'common.tenderTotalFee');
+      const calcBase = calcBaseBeFee
+        ? orgFee
+        : node.data.calcBase
+          ? cbParser.toFExpr(node.data.calcBase, allNodes)
+          : '';
       const attrs = [
         { name: 'Xh', value: row, type: TYPE.INT }, // 序号
         { name: 'Qdbm', value: node.data.code, minLen: 1 }, // 编码
@@ -352,11 +366,11 @@ INTERFACE_EXPORT = (() => {
         { name: 'Lr', value: isBidInvitation ? '0' : getFee(node.data.fees, 'profit.tenderTotalFee'), type: TYPE.DECIMAL }, // 利润
         { name: 'Sj', value: isBidInvitation ? '0' : getFee(node.data.fees, 'tax.tenderTotalFee'), type: TYPE.DECIMAL }, // 税金
         { name: 'Zhdj', value: isBidInvitation ? '0' : getFee(node.data.fees, 'common.tenderUnitFee'), type: TYPE.DECIMAL }, // 单价
-        { name: 'Zhhj', value: isBidInvitation ? '0' : getFee(node.data.fees, 'common.tenderTotalFee'), type: TYPE.DECIMAL }, // 合价
+        { name: 'Zhhj', value: isBidInvitation ? '0' : orgFee, type: TYPE.DECIMAL }, // 合价
         { name: 'Zgj', value: isBidInvitation ? '0' : getFee(node.data.fees, 'estimate.tenderTotalFee'), type: TYPE.DECIMAL }, // 暂估价
-        { name: 'Iszg', value: node.data.specialProvisional === '专业工程', type: TYPE.BOOL }, // 是否暂定 如果专项暂定列选择了“专业工程”,则输出true,否则是false。
+        { name: 'Iszg', value: iszg, type: TYPE.BOOL }, // 是否暂定 如果专项暂定列选择了“专业工程”,则输出true,否则是false。
         { name: 'Djfx', value: !!node.data.unitPriceAnalysis, type: TYPE.BOOL }, // 单价分析
-        { name: 'Jsgs', value: node.data.calcBase }, // 计算基数
+        { name: 'Jsgs', value: calcBase }, // 计算基数
         { name: 'Bl', value: '' }, // 变量
         { name: 'Bz', value: node.data.remark }, // 备注
       ];
@@ -655,24 +669,24 @@ INTERFACE_EXPORT = (() => {
         const flag = node.getFlag();
         const qdbt = new QdBt(node, mainTree.items);
         if (flag === fixedFlag.ONE_SEVEN_BILLS) { // 100章到700章清单需要输出详细数据
-          qdbt.children.push(...setupSubBills(node.children));
+          qdbt.children.push(...setupSubBills(node.children, mainTree.items));
         } else if (flag === fixedFlag.DAYWORK_LABOR) {
           qdbt.children.push(setupDaywork(node.children));
         }
         qdxm.children.push(qdbt);
       });
 
-      function setupSubBills(nodes) {
+      function setupSubBills(nodes, allNodes) {
         const rst = [];
         nodes.forEach(node => {
-          const qdmx = new QdMx(node);
+          const qdmx = new QdMx(node, allNodes);
           rst.push(qdmx);
           const subIsRations = node.children.length && !node.source.children.length;
           if (subIsRations) {
             qdmx.children.push(...setupRations(node.children));
             qdmx.children.push(...setupBillsContain(node.data));
           } else {
-            qdmx.children.push(...setupSubBills(node.children));
+            qdmx.children.push(...setupSubBills(node.children, allNodes));
           }
         });
         return rst;

+ 7 - 3
web/building_saas/standard_interface/import/anhui_maanshan.js

@@ -180,14 +180,18 @@ INTERFACE_IMPORT = (() => {
         if (curField === qdbt) {
           item.code = getValue(src, ['_Bm']);
           item.rowCode = getValue(src, ['_Code']); // 注意:行号标记,用于后续(通用处理)清单基数进行转换(行引用转换为ID引用) 
-          item.calcBase = getValue(src, ['_Jsgs']);
+          if (getValue(src, ['_Lb']) === '5') { // 暂列金额才导入计算基数
+            item.calcBase = getValue(src, ['_Jsgs']);
+          }
         } else if (curField === qdmx) {
           item.code = getValue(src, ['_Qdbm']);
           item.unit = getValue(src, ['_Dw']);
           item.quantity = getValue(src, ['_Sl']);
-          item.calcBase = getValue(src, ['_Jsgs']);
-          item.specialProvisional = getBool(src, ['_Iszg']) ? '专业工程' : ''; // 是否暂定
           item.unitPriceAnalysis = +getBool(src, ['_Djfx']); // 单价分析
+          item.specialProvisional = getBool(src, ['_Iszg']) ? '专业工程' : ''; // 是否暂定
+          if (item.specialProvisional) {
+            item.calcBase = getValue(src, ['_Jsgs']);
+          }
         }
         return item;
       });

+ 2 - 1
web/building_saas/standard_interface/import/base.js

@@ -307,7 +307,8 @@ const INTERFACE_EXPORT_BASE = (() => {
           preChild.NextSiblingID = child.ID;
         }
         if (child.rowCode) {
-          rowCodeData.push({ reg: new RegExp(`\\b${child.rowCode}\\b`, 'g'), ID: child.ID });
+          const regStr = /{[^{}]+}/.test(child.rowCode) ? child.rowCode : `\\b${child.rowCode}\\b`;
+          rowCodeData.push({ reg: new RegExp(regStr, 'g'), ID: child.ID });
         }
         if (child.calcBase) {
           toBeTransformBills.push(child);

+ 5 - 1
web/common/html/header.html

@@ -68,7 +68,11 @@
                     <!--<a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=userGuide" target="_blank">用户手册</a>
                     <a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=upgradeGuide" target="_blank">升级说明</a>-->
                     <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yh_yhsc/yh_yhsc-1bup3dm7iacsg" target="_blank">用户手册</a>
-                    <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yanghuUpdate" target="_blank">升级说明</a>
+                    <% if (compilationName === '公路造价(2018)') { %>
+                        <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/glyun/glyun-1cfge2jui6nh9" target="_blank">升级说明</a>
+                    <% } else { %>
+                        <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yanghuUpdate" target="_blank">升级说明</a>
+                    <% } %>
                     <a class="dropdown-item" href="https://smartcost.com.cn/" target="_blank">纵横官网</a>
                     <!--  <a class="dropdown-item" href="#">动画教程</a>-->
                     <% if (compilationName === '公路造价(2018)') { %>

+ 263 - 0
web/over_write/js/hunan_2014.js

@@ -0,0 +1,263 @@
+// 清单基数
+const progression = ['养护工程管理经费(大修工程)', '养护工程管理经费(中修工程)', '养护工程监理费(路线工程)', '养护工程监理费(桥梁及隧道工程)', '养护工程设计文件审查费', '工程设计费(路线工程)', '工程设计费(桥梁、隧道工程)'];
+const deficiency = { '养护工程设计文件审查费': 4500 };
+const beyond = { '养护工程设计文件审查费': 600000 };
+if (typeof baseFigureMap !== 'undefined') {
+  const { fixedFlag } = commonConstants;
+  const budgetMap = {
+    // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示
+    '公路养护工程费': {
+      base: 'GLYHGCF',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
+      pick: false,
+    },
+    // 除清单固定类别是“建筑安装工程费”、“设备购置费”的以外部分可显示
+    '设备购置费用': {
+      base: 'SBGZFY',
+      fixedFlag: fixedFlag.EQUIPMENT_ACQUISITION_FEE,
+      filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.EQUIPMENT_ACQUISITION_FEE],
+      pick: false,
+    },
+    // 除清单固定类别是“建筑安装工程费”、“设备购置费”、“养护工程其他费用”的以外部分可显示
+    '养护工程其他费用': {
+      base: 'YHGCQTFY',
+      fixedFlag: fixedFlag.MAINTENANCE_EXPENSES,
+      filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.EQUIPMENT_ACQUISITION_FEE, fixedFlag.MAINTENANCE_EXPENSES],
+      pick: false,
+    },
+    // 只有清单固定类别是“养护工程其他费用”部分可显示
+    '养护工程管理经费(大修工程)': {
+      isProgressive: true,
+      base: 'YHGCGLJFDXGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 只有清单固定类别是“养护工程其他费用”部分可显示
+    '养护工程管理经费(中修工程)': {
+      isProgressive: true,
+      base: 'YHGCGLJFZXGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 只有清单固定类别是“养护工程其他费用”部分可显示
+    '养护工程监理费(路线工程)': {
+      isProgressive: true,
+      base: 'YHGCJLFLXGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 只有清单固定类别是“养护工程其他费用”部分可显示
+    '养护工程监理费(桥梁及隧道工程)': {
+      isProgressive: true,
+      base: 'YHGCJLFQLJSDGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
+    '养护工程设计文件审查费': {
+      isProgressive: true,
+      base: 'YHGCSJWJSCF',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
+    '工程设计费(路线工程)': {
+      isProgressive: true,
+      base: 'GCSJFLXGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
+    '工程设计费(桥梁、隧道工程)': {
+      isProgressive: true,
+      base: 'GCSJFQLSDGC',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      filter: [fixedFlag.MAINTENANCE_EXPENSES],
+      pick: true,
+    },
+    // 显示:仅“价差预备费”可显示
+    '价差预备费': {
+      base: 'JCYBF',
+      fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
+      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 = {
+    // 公路养护工程费 算法:取清单固定类别是“建筑安装工程费”的金额。
+    GLYHGCF(tender) {
+      return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, 'common');
+    },
+    // 设备购置费用:取清单固定类别是“设备购置费”的金额
+    SBGZFY(tender) {
+      return cbTools.getBaseFee(calcBase.fixedFlag.EQUIPMENT_ACQUISITION_FEE, tender, 'common');
+    },
+    // 养护工程其他费用: 取清单固定类别是“养护工程其他费用”的金额。
+    YHGCQTFY(tender) {
+      return cbTools.getBaseFee(calcBase.fixedFlag.MAINTENANCE_EXPENSES, tender, 'common');
+    },
+    // 养护工程管理经费(大修工程): 按“公路养护工程费”为基数,以累进办法计算。
+    YHGCGLJFDXGC(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '养护工程管理经费(大修工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 养护工程管理经费(中修工程): 按“公路养护工程费”为基数,以累进办法计算。
+    YHGCGLJFZXGC(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '养护工程管理经费(中修工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 养护工程监理费(路线工程): 按“公路养护工程费”为基数,以累进办法计算。
+    YHGCJLFLXGC(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '养护工程监理费(路线工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 养护工程监理费(桥梁及隧道工程): 按“公路养护工程费”为基数,以累进办法计算。
+    YHGCJLFQLJSDGC(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '养护工程监理费(桥梁及隧道工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 养护工程设计文件审查费: 按“公路养护工程费”为基数,以累进办法计算。
+    YHGCSJWJSCF(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '养护工程设计文件审查费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 工程设计费(路线工程): 按“公路养护工程费”为基数,以累进办法计算。
+    GCSJFLXGC(tender) {
+      const baseFee = this['GLYHGCF'](tender);
+      if (!tender) {
+        calcBase.baseProgressiveFee = baseFee;
+      }
+      return calculateUtil.getProgressiveFee(baseFee, '工程设计费(路线工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+    },
+    // 工程设计费(桥梁、隧道工程): 按“公路养护工程费”为基数,以累进办法计算。
+    GCSJFQLSDGC(tender) {
+      const baseFee = this['GLYHGCF'](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['YHGCF'](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 module !== 'undefined') {
+  module.exports = {
+      progression,
+      deficiency,
+      beyond,
+  };
+}