Browse Source

Merge branch 'neimenggu_gusuan'

# Conflicts:
#	modules/pm/controllers/pm_controller.js
#	web/building_saas/pm/html/project-management.html
#	web/building_saas/pm/js/pm_newMain.js
#	web/building_saas/report/js/rpt_main.js
TonyKang 4 years atrás
parent
commit
f611b0f84f

+ 1 - 0
config/gulpConfig.js

@@ -150,6 +150,7 @@ module.exports = {
         'web/building_saas/main/js/controllers/material_controller.js',
         'web/building_saas/main/js/views/side_tools.js',
         'web/building_saas/main/js/views/std_billsGuidance_lib.js',
+        'web/building_saas/main/js/views/std_bills_unit_price_feature.js',
         'web/building_saas/main/js/views/std_bills_lib.js',
         'web/building_saas/main/js/views/std_ration_lib.js',
         'web/building_saas/main/js/views/block_lib.js',

+ 39 - 0
modules/all_models/bills_unitprice_feature_lib.js

@@ -0,0 +1,39 @@
+/**
+ * Created by Tony on 2021/9/10.
+ */
+
+//工程特征库
+const mongoose = require('mongoose');
+const Schema = mongoose.Schema;
+const oprSchema = require('../all_schemas/opr_schema');
+const bills_unit_price_feature_lib = new Schema({
+        ID:{type:String,index:true},
+        creator: String,
+        createDate: Number,
+        recentOpr: [oprSchema],
+        name: String,
+        compilationId: String,
+        compilationName: String,
+        // feature: {
+        //     type: [Schema.Types.Mixed],
+        //     default: {}
+        // },
+        feature: {
+            basicKeyOptions: {
+                type: [Schema.Types.Mixed],
+                default: []
+            },
+            basicMappings:{
+                type: [Schema.Types.Mixed],
+                default: []
+            },
+            factorMappings: {
+                type: [Schema.Types.Mixed],
+                default: []
+            }
+        }
+    },
+    {versionKey: false}
+);
+
+mongoose.model("std_bills_unitprice_feature_lib", bills_unit_price_feature_lib,"std_bills_unitprice_feature_lib");

+ 11 - 0
modules/main/routes/main_route.js

@@ -9,7 +9,9 @@ const pmFacade = require('../../pm/facade/pm_facade');
 const systemSettingModel = require('../../system_setting/model/index');
 const OptionsDao = require('../../options/models/optionsModel');
 const optionSetting = require('../../options/models/optionTypes');
+const billsUnitPriceFeatureFacade = require("../../std_bills_unitprice_feature_lib/facade/bills_unitprice_feature_facade");
 let config = require("../../../config/config.js");
+
 module.exports =function (app) {
     const baseController = new BaseController();
     app.get('/main', baseController.init, function(req, res) {
@@ -38,6 +40,14 @@ module.exports =function (app) {
                 if (constructProject && constructProject.property && constructProject.property.boqType) {
                     boqType = constructProject.property.boqType;
                 }
+
+                let filter = {compilationId: req.session.sessionCompilation._id};
+
+                let featureLibs = await billsUnitPriceFeatureFacade.findByCondition(filter,{_id:0},false);
+                // console.log(featureLibs);
+
+                let billsUnitPriceFeature = (featureLibs && featureLibs.length > 0)?featureLibs[featureLibs.length - 1]:null;
+        
                 res.render('building_saas/main/html/main.html',
                     {
                         userAccount: req.session.userAccount,
@@ -56,6 +66,7 @@ module.exports =function (app) {
                         markReadProjectIDs: JSON.stringify(markReadProjectIDs),
                         boqType,
                         title:config[process.env.NODE_ENV].title?config[process.env.NODE_ENV].title:"纵横公路养护云造价",
+                        billsUnitPriceFeature : JSON.stringify(billsUnitPriceFeature),
                         version
                     });
             } else {

+ 4 - 3
modules/pm/controllers/pm_controller.js

@@ -34,7 +34,7 @@ let sectionTreeDao = new SectionTreeDao();
 let consts = require('../../main/models/project_consts');
 let rp = require('request-promise');
 const commonUtil = require('../../../public/common_util');
-const { ValuationText } = require('../../../public/common_constants');
+const { ValuationText, AdminLevelType } = require('../../../public/common_constants');
 //统一回调函数
 let callback = function (req, res, err, message, data) {
     res.json({ error: err, message: message, data: data });
@@ -348,8 +348,8 @@ module.exports = {
         feasibilityValuation = await engineeringLibModel.getLib(feasibilityValuation);
 
         // 估算
-        let estimationValuation = sessionCompilation.estimationValuation !== undefined ?
-            sessionCompilation.estimationValuation : [];
+        let estimationValuation = sessionCompilation.estimation_valuation !== undefined ?
+            sessionCompilation.estimation_valuation : [];
             estimationValuation = await engineeringLibModel.getLib(estimationValuation);
 
         // 概算
@@ -389,6 +389,7 @@ module.exports = {
             billValuation: JSON.stringify(billValuation),
             rationValuation: JSON.stringify(rationValuation),
             engineeringList: JSON.stringify(engineering.List),
+            adminLevelType: JSON.stringify(AdminLevelType),
             compilationName: sessionCompilation.name,
             versionName: request.session.compilationVersion,
             socketPort:config[process.env.NODE_ENV].socketPort?config[process.env.NODE_ENV].socketPort:5500,

+ 2 - 2
modules/reports/controllers/rpt_controller.js

@@ -244,7 +244,7 @@ function getAllPagesCommon(user_id, prj_id, rpt_id, pageSize, orientation, custo
                 if (!err) {
                     let buildPageData = function() {
                         try {
-                            // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rawDataObj.jsp");
+                            // fsUtil.writeObjToFile(rawDataObj, `D:/GitHome/YangHuCost/tmp/rawDataObj_${(new Date).getTime()}.jsp`);
                             let tplData = rptDataUtil.assembleData(rawDataObj);
                             let printCom = JpcEx.createNew();
                             if (pageSize) rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pageSize;
@@ -262,7 +262,7 @@ function getAllPagesCommon(user_id, prj_id, rpt_id, pageSize, orientation, custo
                                 pageRst = printCom.outputAsPreviewPage(rptTpl, defProperties);
                             }
                             if (pageRst) {
-                                // fsUtil.writeObjToFile(pageRst, "D:/GitHome/ConstructionCost/tmp/testBuiltPageResult.jsp");
+                                // fsUtil.writeObjToFile(pageRst, `D:/GitHome/ConstructionCost/tmp/testBuiltPageResult_${(new Date).getTime()}.jsp`);
                                 cb(null, pageRst);
                             } else {
                                 cb('Have errors while on going...', null);

+ 19 - 1
modules/reports/facade/rpt_tpl_data_facade.js

@@ -7,6 +7,7 @@
 let prjMdl = require('../../../modules/pm/models/project_model');
 let projectDataMdl = require('../../../modules/main/models/project');
 let projectFacade = require('../../../modules/main/facade/project_facade');
+let billsUnitPriceFeatureModel = mongoose.model('std_bills_unitprice_feature_lib');
 
 module.exports = {
     prepareProjectData: prepareProjectData,
@@ -17,10 +18,18 @@ module.exports = {
 function prepareProjectData(userId, prjId, filter, callback) {
     let rawDataObj = null;
     let basicInformation = prjMdl.project.getBasicInfo(prjId);
+    let estUnitPriceFeature = null;
     prjMdl.project.getUserProject(userId, prjId, function(err, msg, rst){
         if (!err) {
             rawDataObj = {};
             rawDataObj.prj = rst;
+            let doc = rst._doc? rst._doc : rst;
+            if (doc.property.engineeringName === '指标估算') {
+                //要加料
+                let conditions = {compilationId: doc.compilation};
+                estUnitPriceFeature = billsUnitPriceFeatureModel.findOne(conditions,{_id: 0}).lean();
+                // billsUnitPriceFeatureModel
+            }
             projectDataMdl.getFilterData(prjId, filter, function (results) {
                 if (results) {
                     rawDataObj.prjData = results;
@@ -29,7 +38,16 @@ function prepareProjectData(userId, prjId, filter, callback) {
                             let doc = (rawDataObj.prj._doc)?rawDataObj.prj._doc:rawDataObj.prj;
                             doc.property.basicInformation = basicRst;
                         }
-                        callback(false, 'Succeeded!', rawDataObj);
+                        if (estUnitPriceFeature) {
+                            estUnitPriceFeature.then( (features) => {
+                                let doc = (rawDataObj.prj._doc)?rawDataObj.prj._doc:rawDataObj.prj;
+                                doc.property.estUnitPriceFeature = features.feature;
+                                // console.log(features);
+                                callback(false, 'Succeeded!', rawDataObj);
+                            });
+                        } else {
+                            callback(false, 'Succeeded!', rawDataObj);
+                        }
                     });
                     // callback(false, 'Succeeded!', rawDataObj);
                 } else {

+ 27 - 0
modules/std_bills_unitprice_feature_lib/controllers/bills_unitprice_feature_controller.js

@@ -0,0 +1,27 @@
+/**
+ * Created by Tony on 2021/9/10.
+ */
+
+BaseController = require("../../common/base/base_controller");
+featureFacade  = require("../facade/bills_unitprice_feature_facade");
+
+class BillsUnitPriceFeatureController extends BaseController{
+    async findLib(request, response){
+        let result={
+            error:0
+        };
+        try {
+            let data = request.body.data;
+            data = JSON.parse(data);
+            let conditions={'ID' : data.ID};
+            let resultData = await featureFacade.findByCondition(conditions);
+            result.data=resultData;
+        }catch (err){
+            console.log(err);
+            result.error=1;
+            result.message = err.message;
+        }
+        response.json(result);
+    }
+}
+export default BillsUnitPriceFeatureController;

+ 16 - 0
modules/std_bills_unitprice_feature_lib/facade/bills_unitprice_feature_facade.js

@@ -0,0 +1,16 @@
+/**
+ * Created by Tony on 2021/9/10.
+ */
+
+mongoose = require('mongoose');
+let billsUnitPriceFeatureModel = mongoose.model('std_bills_unitprice_feature_lib');
+
+module.exports = {
+    findByCondition:async function(conditions,options,single=true){
+        if(single == true){
+            return await billsUnitPriceFeatureModel.findOne(conditions,options).lean();
+        }else {
+            return await  billsUnitPriceFeatureModel.find(conditions,options).lean();
+        }
+    },
+};

+ 2 - 1
modules/users/models/compilation_model.js

@@ -57,10 +57,11 @@ class CompilationModel extends BaseModel {
     async getCompilationById(id) {
         let condition = {_id: id, is_release: true};
         let compilationData = await this.findDataByCondition(condition);
+        compilationData = compilationData._doc ? compilationData._doc : compilationData;
         if (!compilationData  || compilationData.bill_valuation === undefined) {
             return compilationData;
         }
-        const fields = ['suggestion', 'feasibility', 'rough', 'bill', 'ration'];
+        const fields = ['suggestion', 'feasibility', 'rough', 'bill', 'ration', 'estimation'];
         fields.forEach(field => {
             const valField = `${field}_valuation`;
             if (compilationData[valField] && compilationData[valField].length > 0) {

+ 8 - 0
public/common_constants.js

@@ -137,6 +137,13 @@
         RATION: 'ration',
     };
 
+    // 广东农村公路养护 道路行政等级
+    const AdminLevelType = {
+        CITY_LEVEL: '县道',
+        COUNTRY_SIDE_LEVEL: '乡道',
+        VLLAGE_LEVEL: '村道',
+    };
+
     // 缓存key
     const StorageKey = {
         // 主界面一旦出现这个缓存,马上提示
@@ -211,5 +218,6 @@
         RationType,
         BillType,
         ShareLibType,
+        AdminLevelType,
     };
 })

+ 20 - 8
web/building_saas/main/html/main.html

@@ -49,6 +49,8 @@
         const markReadProjectIDs = JSON.parse('<%- markReadProjectIDs %>');
         const VERSION = '<%- version %>';
         const CUR_BOQ_TYPE = '<%- boqType %>';
+        const billsUnitPriceFeature = JSON.parse('<%- billsUnitPriceFeature %>');
+        const compilationName = '<%- compilationName %>';
     </script>
 </head>
 
@@ -66,8 +68,10 @@
         <div class="main-nav">
             <ul class="nav nav-tabs flex-column" role="tablist" id="mainNav">
                 <li class="nav-item"><a class="active" data-toggle="tab" href="#zaojiashu" id="tab_zaojiashu" role="tab">造价书</a></li>
+                <% if (compilationName !== '内蒙古高速公路日常养护估算(2021)') { %>
                 <li class="nav-item"><a data-toggle="tab" href="#project_glj" id="tab_project_glj" data-name="tab_project_glj" role="tab">工料机汇总</a></li>
                 <li class="nav-item"><a data-toggle="tab" href="#fee_rates" id="tab_fee_rate" role="tab" >费率</a></li>
+                <% } %>
                 <li class="nav-item"><a data-toggle="tab" href="#divide" id="tab_divide" role="tab" style="display: none;">分摊</a></li>
                 <li class="nav-item"><a data-toggle="tab" href="#calc_program_manage" id="tab_calc_program_manage" role="tab" style="display:none">总计算程序</a></li>
                 <li class="nav-item"><a data-toggle="tab" href="#tender_price" id="tab_tender_price" role="tab">调价</a></li>
@@ -99,6 +103,7 @@
                     <a href="javascript:void(0)"  class="btn btn-light btn-sm" id="downLevel" data-toggle="tooltip" data-placement="bottom" data-original-title="降级"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
                       <a href="javascript:void(0)" class="btn btn-light btn-sm" id="upMove" data-toggle="tooltip" data-placement="bottom" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                       <a href="javascript:void(0)" class="btn btn-light btn-sm" id="downMove" data-toggle="tooltip" data-placement="bottom" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
+                      <% if (compilationName !== '内蒙古高速公路日常养护估算(2021)') { %>
                       <div class="btn-group ml-2">
                           <a class="dropdown-toggle btn btn-light btn-sm" data-toggle="dropdown" href="#" id="moreMenuA" role="button" aria-haspopup="true" aria-expanded="false">更多</a>
                           <div class="dropdown-menu dropright" id="moreMenu">
@@ -125,6 +130,7 @@
                               <a id = "menu_calc_program_manage"  href="javascript:void(0);" class="dropdown-item"><i class="fa fa-calculator" aria-hidden="true"></i> 总计算程序</a>
                           </div>
                       </div>
+                      <% } %>
                  <!--   <span class="btn btn-light btn-sm">
                       <a href="" data-toggle="dropdown"><span data-placement="bottom"><i class="fa fa-list-ol"></i></span> 显示至...</a>
                       <div class="dropdown-menu dropdown-menu-left" style="min-width: 6.5rem">
@@ -158,11 +164,11 @@
                          <!-- <li class="nav-item">
                               <a class="nav-link px-3" href="javascript:void(0)" id = 'stdBillsTab' relaPanel="#qd">清单规则</a>
                           </li>-->
+                          <% if (compilationName !== '内蒙古高速公路日常养护估算(2021)') { %>
                           <li class="nav-item" id="li_stdRationTab">
                               <a class="nav-link px-1 right-nav-link" href="javascript:void(0)" id="stdRationTab"
                                  relaPanel="#de">定额库</a>
                           </li>
-
                           <li class="nav-item dropdown">
                               <a class="nav-link dropdown-toggle more" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" >更多</a>
                               <div class="dropdown-menu" id="div_more_dropdown_right">
@@ -177,6 +183,7 @@
                                   </script>
                               </div>
                           </li>
+                          <% } %>
                       </ul>
                   </div>
               </div>
@@ -214,9 +221,11 @@
                                   <li class="nav-item">
                                       <a class="nav-link sub-item" id="linkGCLMX" data-toggle="tab" href="#subSpread" role="tab">工程量明细</a>
                                   </li>
+                                  <% if (compilationName !== '内蒙古高速公路日常养护估算(2021)') { %>
                                   <li class="nav-item">
                                       <a class="nav-link sub-item" id="linkJSCX" data-toggle="tab" href="#subSpread" role="tab">计算程序</a>
                                   </li>
+                                  <% } %>
                                  <!-- <li class="nav-item">   2018-11-08  新需求,隐藏说明信息
                                       <a class="nav-link" data-toggle="tab" href="#comments" role="tab" id="linkComments">说明信息</a>
                                   </li>-->
@@ -710,8 +719,10 @@
                             <ul class="nav flex-column nav-pills" role="tablist">
                                 <li class="nav-item"><a class="nav-link active" data-toggle="pill" href="#poj-settings-basicInfo" role="tab" id="tab_poj-settings-basicInfo">建设项目基本信息</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-projFeature" id="tab_poj-settings-projFeature" role="tab">工程特征</a></li>
+                                <% if (compilationName !== '内蒙古高速公路日常养护估算(2021)') { %>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-indicativeInfo" id="tab_poj-settings-indicativeInfo" role="tab">指标信息</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-4" id="about-calc" role="tab">关于计算</a></li>
+                                <% } %>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-billsQuanDecimal" id="tab_poj-settings-bqDecimal" role="tab">清单工程量精度</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-decimal" role="tab" id="tab_poj-settings-decimal">小数位数</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-6" role="tab" id="tab_poj-settings-6">人工单价调整</a></li>
@@ -851,8 +862,8 @@
                                                     </div>
                                                 </div>
                                             </div>
-                                            <h5 class="mt-3">定额</h5>
-                                            <div class="row m-0">
+                                            <h5 class="mt-3" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >定额</h5>
+                                            <div class="row m-0" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >
                                                 <div class="col-sm-3">
                                                     <div class="input-group input-group-sm mb-2">
                                                         <div class="input-group-prepend">
@@ -878,8 +889,8 @@
                                                     </div>
                                                 </div>
                                             </div>
-                                            <h5 class="mt-3">工料机</h5>
-                                            <div class="row m-0">
+                                            <h5 class="mt-3" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >工料机</h5>
+                                            <div class="row m-0" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >
                                                 <div class="col-sm-3">
                                                     <div class="input-group input-group-sm mb-2">
                                                         <div class="input-group-prepend">
@@ -905,8 +916,8 @@
                                                     </div>
                                                 </div>
                                             </div>
-                                            <h5 class="mt-3">费率</h5>
-                                            <div class="row m-0">
+                                            <h5 class="mt-3" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >费率</h5>
+                                            <div class="row m-0" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %> >
                                                 <div class="col-sm-3">
                                                     <div class="input-group input-group-sm mb-2">
                                                         <div class="input-group-prepend">
@@ -2136,6 +2147,7 @@
     <script type="text/javascript" src="/web/building_saas/main/js/controllers/material_controller.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/views/side_tools.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/views/std_billsGuidance_lib.js"></script>
+    <script type="text/javascript" src="/web/building_saas/main/js/views/std_bills_unit_price_feature.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/views/std_bills_lib.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/views/std_ration_lib.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/views/block_lib.js"></script>
@@ -2178,7 +2190,7 @@
     <script src="/web/building_saas/standard_interface/index.js"></script>
     <script src="/web/building_saas/standard_interface/export/base.js"></script>
     <script src="/web/building_saas/standard_interface/export/view.js"></script>
-
+    
     <!-- endinject -->
 
     <% if (overWriteUrl != undefined) { %>

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

@@ -552,6 +552,9 @@ var PROJECT = {
               let temObj = null;
               if(d.type == ModuleNames.bills || d.type == ModuleNames.ration){//如果是树节点类型,直接取树节点更新
                   if(d.action =="add"){
+                      if (d.data.fees) {
+                          d.data.feesIndex = getFeeIndex(d.data.fees);
+                      }
                       if(d.type == ModuleNames.ration) this.Ration.datas.push(d.data);
                       reclacQuantity = true;
                       addNodeDatas.push(d);

+ 21 - 8
web/building_saas/main/js/models/quantity_detail.js

@@ -797,14 +797,27 @@ var quantity_detail = {
         };
 
         quantity_detail.prototype.batchUpdateGLGLNodes = function (batchUpdateGLGLNodes,node) {
-            for(let b of projectObj.project.Bills.datas){
-                if(b.ID == node.data.ID) continue;
-                let bNode =  projectObj.project.mainTree.getNodeByID(b.ID);
-                if(bNode && b.unit == "公路公里"){
-                    bNode.updateData.quantityEXP = node.updateData.quantityEXP;
-                    bNode.updateData.quantity = node.updateData.quantity;
-                    bNode.changed = true;
-                    batchUpdateGLGLNodes.push(bNode);
+            // for(let b of projectObj.project.Bills.datas){
+            //     if(b.ID == node.data.ID) continue;
+            //     let bNode =  projectObj.project.mainTree.getNodeByID(b.ID);
+            //     if(bNode && b.unit == "公路公里"){
+            //         bNode.updateData.quantityEXP = node.updateData.quantityEXP;
+            //         bNode.updateData.quantity = node.updateData.quantity;
+            //         bNode.changed = true;
+            //         batchUpdateGLGLNodes.push(bNode);
+            //     }
+            // }
+
+            // 备注:projectObj.project.Bills的刷新有点问题,不可靠,所以现在直接操作projectObj.project.mainTree.nodes对象
+            for (let bKey in projectObj.project.mainTree.nodes) {
+                if (bKey.indexOf(node.data.ID) < 0) {
+                    let bNode = projectObj.project.mainTree.nodes[bKey];
+                    if (bNode.data.unit === '公路公里') {
+                        bNode.updateData.quantityEXP = node.updateData.quantityEXP;
+                        bNode.updateData.quantity = node.updateData.quantity;
+                        bNode.changed = true;
+                        batchUpdateGLGLNodes.push(bNode);
+                    }
                 }
             }
         };

+ 44 - 2
web/building_saas/main/js/views/project_view.js

@@ -1379,6 +1379,7 @@ var projectObj = {
                 "insertRation": {
                     type: projectObj.registerFlexibleInsertRatoinMenu(),
                     disabled: function () {
+                        return true;
                         if (projectReadOnly) {
                             return true;
                         }
@@ -1387,6 +1388,11 @@ var projectObj = {
                         // 工具栏要加按钮,且不能隐藏。菜单可以隐藏,两者又必须统一,所以启用新规则。怕以后又要改回来,所以保留。 CSL, 2018-01-02
                         return !project.Ration.canAdd(project.mainTree.selected);
                     },
+                    visible: function (key, opt) {
+                        let rst = true;
+                        if (compilationName === '内蒙古高速公路日常养护估算(2021)') return false;
+                        return rst;
+                    }
                 },
                 "insertGLJ": {
                     name: "插入工料机",
@@ -1408,7 +1414,9 @@ var projectObj = {
                         getGLJData('insert');// ProjectController.addRation(project, controller, rationType.volumePrice);
                     },
                     visible: function (key, opt) {
-                        return true
+                        let rst = true;
+                        if (compilationName === '内蒙古高速公路日常养护估算(2021)') return false;
+                        return rst;
                     }
                 },
 
@@ -1421,6 +1429,11 @@ var projectObj = {
                         }
                         return !project.Ration.canAdd(project.mainTree.selected);
                     },
+                    visible: function (key, opt) {
+                        let rst = true;
+                        if (compilationName === '内蒙古高速公路日常养护估算(2021)') rst = false;
+                        return rst;
+                    },
                     callback: function (key, opt) {
                         /* project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {
                              projectObj.selectColAndFocus(newNode,null);
@@ -1459,6 +1472,11 @@ var projectObj = {
                         }
                         return !project.Ration.canAdd(project.mainTree.selected);
                     },
+                    visible: function (key, opt) {
+                        let rst = true;
+                        if (compilationName === '内蒙古高速公路日常养护估算(2021)') return false;
+                        return rst;
+                    },
                     callback: function (key, opt) {
                         //名称取清单名称,单位取清单单位
                         let selected = project.mainTree.selected;
@@ -1788,7 +1806,10 @@ var projectObj = {
                         blockLibObj.checkShow();
                     },
                     visible: function (key, opt) {
-                        return G_SHOW_BLOCK_LIB;
+                        let rst = G_SHOW_BLOCK_LIB;
+                        if (compilationName === '内蒙古高速公路日常养护估算(2021)') rst = false;
+                        return rst;
+                        // return G_SHOW_BLOCK_LIB;
                     }
                 }
             }
@@ -2652,10 +2673,21 @@ $('#property_ok').click(function () {
         properties['property.basicInformation'] = saveData;
     }
     //工程特征
+    let diffBillsPriceFeatureDatas = [];
     if(projFeatureView.toUpdate(projFeatureView.orgDatas, projFeatureView.datas)){
         let saveData = projFeatureView.toSaveDatas(projFeatureView.datas);
         projectObj.project.property.projectFeature = saveData;
         properties['property.projectFeature'] = saveData;
+        //内蒙古养估、广东农村等有些特征修改后,需要刷新指标基价(清单单价)
+        //*
+        if (billsUnitPriceFeature) {
+            for (let idx = 0; idx < projFeatureView.orgDatas.length; idx++) {
+                if (projFeatureView.orgDatas[idx].value !== projFeatureView.datas[idx].value) {
+                    diffBillsPriceFeatureDatas.push(projFeatureView.datas[idx]);
+                }
+            }     
+        }
+        //*/
     }
     // 清单限价
     const maxPriceRate = $('#max-price-rate') && +$('#max-price-rate').val();
@@ -2806,6 +2838,16 @@ $('#property_ok').click(function () {
             }
         });
     }
+
+    if (diffBillsPriceFeatureDatas.length > 0) {
+        //刷新指标基价
+        if (billsGuidance.bills.tree) {
+            chkAndResetBills(billsGuidance.bills.workBook.getActiveSheet(), billsGuidance.bills.tree.items);
+            billsGuidance.bills.workBook.refresh();
+        } else {
+            chkAndResetBills(null);
+        }
+    }
 });
 
 function testShow() {

+ 29 - 4
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -174,6 +174,30 @@ const billsGuidance = (function () {
             }
         }
     };
+    if (compilationName === '内蒙古高速公路日常养护估算(2021)') {
+        bills.treeSetting.cols.push(
+            {
+                width: 100,
+                readOnly: true,
+                showHint: false,
+                head: {
+                    titleNames: ["默认指标基价"],
+                    spanCols: [1],
+                    spanRows: [1],
+                    vAlign: [1],
+                    hAlign: [1],
+                    font: ["Arial"]
+                },
+                data: {
+                    field: "baseEstUnitPrice",
+                    vAlign: 1,
+                    hAlign: 2,
+                    font: "Arial"
+                }
+            }
+        );
+        bills.headers.push({name: '默认指标基价', dataCode: 'baseEstUnitPrice', width: 100, vAlign: 'center', hAlign: 'center', formatter: '@'});
+    }
     // 获取对比树片段数据的方法,此方法可能会被覆盖,方法存在一个对象中,使得外部可以覆盖相关方法
     // 在农村公路2020中,主树对比片段与这里的逻辑是不相同的
     const overwrite = {
@@ -220,6 +244,7 @@ const billsGuidance = (function () {
                 return;
             }
             let compareData = compareTree(parent, mainTreeFragment, selTree.roots);
+            chkAndSetBillsUnitPrice(compareData.postData); //设置指标基价(默认单价)
             let sheet = projectObj.mainSpread.getActiveSheet(),
                 row = sheet.getActiveColumnIndex(),
                 col = sheet.getActiveColumnIndex();
@@ -571,10 +596,6 @@ const billsGuidance = (function () {
             }
         }
     }
-
-
-
-
     //项目指引类型
     const itemType = {
         job: 0,
@@ -1120,6 +1141,10 @@ const billsGuidance = (function () {
             }
             initViews();
             let callback = function () {
+                if (compilationName === '内蒙古高速公路日常养护估算(2021)') {
+                    //给清单加点料 baseEstUnitPrice
+                    chkAndAddEstUnitPrice(rstData.bills);
+                }
                 initTree(bills, bills.workBook.getActiveSheet(), bills.treeSetting, rstData.bills);
                 if(doAfterLoadGuidance){
                     doAfterLoadGuidance();

+ 197 - 0
web/building_saas/main/js/views/std_bills_unit_price_feature.js

@@ -0,0 +1,197 @@
+/**
+ *
+ *
+ * @author Tony Kang
+ * @date 2021/10/15
+ * @version
+ */
+
+function _chkIfEquals(orgStr, targetStr) {
+    //㎡ ㎥ 立方
+    let rst = false;
+    if (typeof(orgStr) == 'string' && typeof(targetStr) == 'string') {
+        let regExp1 = new RegExp('㎡', "gm");
+        let regExp2 = new RegExp('(', "gm");
+        let regExp3 = new RegExp(')', "gm");
+        let orgS = orgStr.replace(regExp1, 'm2').replace(regExp2, '(').replace(regExp3, ')');
+        let targetS = targetStr.replace(regExp1, 'm2').replace(regExp2, '(').replace(regExp3, ')');
+        rst = (orgS === targetS);
+    }
+    return rst;
+}
+
+function chkAndSetBillsUnitPrice(billsNodes) {
+    // 此方法在用户选择清单时调用(有指标基价/清单单价设置)
+    if (billsUnitPriceFeature !== null) {
+        for (const node of billsNodes) {
+            if (node.updateType === 'create') {
+                let unitFeeVal = _commonChkAndSetPrice(node.updateData, true);
+                if (unitFeeVal !== 0) {
+                    // 暂时未设小数位数 scMathUtil.roundTo(unitFeeVal,2);
+                    unitFeeVal = unitFeeVal + 0.0000001; //前端四舍五入补偿用
+                    node.updateData.calcFlag = 2; //当用户输入单价
+                    if (!node.updateData.hasOwnProperty('fees')) {
+                        node.updateData.fees = [];
+                    }
+                    node.updateData.fees.push({fieldName: 'common', unitFee: unitFeeVal, totalFee: 0, tenderUnitFee: unitFeeVal, tenderTotalFee: 0});
+                }
+            }
+        }
+    }
+}
+
+function chkAndResetBills(adHocSheet, adHocNodes) {
+    //用户调整了工程特征后调用
+    for (let key in projectObj.project.mainTree.nodes) {
+        const node = projectObj.project.mainTree.nodes[key];
+        let unitFeeVal = _commonChkAndSetPrice(node.data, true);
+        if (unitFeeVal !== 0) {
+            // 暂时未设小数位数 scMathUtil.roundTo(unitFeeVal,2);
+            unitFeeVal = unitFeeVal + 0.0000001; //前端四舍五入补偿用
+            if (!node.data.hasOwnProperty('fees')) {
+                node.data.fees = [];
+            }
+            for (let idx = node.data.fees.length - 1; idx >= 0; idx--) {
+                if (node.data.fees[idx].fieldName === 'common') {
+                    node.data.fees[idx].unitFee = unitFeeVal;
+                    node.data.fees[idx].tenderUnitFee = unitFeeVal;
+                    node.data.feesIndex.common.unitFee = unitFeeVal;
+                    node.data.feesIndex.common.tenderUnitFee = unitFeeVal;
+                    break;
+                }
+            }
+            if (adHocSheet) {
+                let rCount = adHocSheet.getRowCount();
+                for (let aNode of adHocNodes) {
+                    unitFeeVal = _commonChkAndSetPrice(aNode.data, false);
+                    if (unitFeeVal !== 0) {
+                        for (let idx = 0; idx < rCount; idx++) {
+                            let cell1 = adHocSheet.getCell(idx, 1);
+                            let cell2 = adHocSheet.getCell(idx, 2);
+                            let cell3 = adHocSheet.getCell(idx, 3);
+                            if (_chkIfEquals(aNode.data.code, cell1.value()) && _chkIfEquals(aNode.data.name, cell2.value()) && _chkIfEquals(aNode.data.unit, cell3.value())) {
+                                let cell4 = adHocSheet.getCell(idx, 4);
+                                unitFeeVal = unitFeeVal + 0.0000001; //前端四舍五入补偿用
+                                unitFeeVal = unitFeeVal.toFixed(2);
+                                if (unitFeeVal === '0.00') unitFeeVal = '';
+                                cell4.value(unitFeeVal);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    // 调整了后需要重新计算
+    $.bootstrapLoading.start();
+    projectObj.project.calcProgram.calcAllNodesAndSave(calcAllType.catAll, function () {
+        projectObj.project.projectGLJ.loadData(function () {
+            $.bootstrapLoading.end();
+        });
+    });
+}
+
+function chkAndAddEstUnitPrice(orgBills) {
+    //只显示基本价格,无系数!
+    if (billsUnitPriceFeature !== null) {
+        for (const node of orgBills) {
+            let unitFeeVal = _commonChkAndSetPrice(node, false);
+            if (!isNaN(parseFloat(unitFeeVal))) {
+                unitFeeVal = unitFeeVal.toFixed(2);
+                if (unitFeeVal === '0.00') unitFeeVal = '';
+            }
+            node.baseEstUnitPrice = unitFeeVal;
+        }
+    }
+}
+
+function _commonChkAndSetPrice(curItem, isNeedFactor) {
+    let rst = 0;
+    let isMatch = true;
+    // 1. 基本数量
+    // 先判断此bills是否有配置
+    let basicValue = 0;
+    for (const bm of billsUnitPriceFeature.feature.basicMappings) {
+        isMatch = true;
+        if (bm.parentBasicKeys.length === billsUnitPriceFeature.feature.basicKeyOptions.length) {
+            for (let kIdx = 0; kIdx < bm.parentBasicKeys.length; kIdx++) {
+                if (bm.parentBasicKeys[kIdx] !== 'ALL' && !_chkIfEquals(curItem[billsUnitPriceFeature.feature.basicKeyOptions[kIdx].key], bm.parentBasicKeys[kIdx]) ) {
+                    isMatch = false;
+                    break;
+                }
+            }
+        } else {
+            isMatch = false;
+            continue;
+        }
+        if (isMatch) {
+            //再根据相关项目属性指定基数
+            for (const bms of bm.subs) {
+                if (_chkUnitPriceFeatureKeys(bms.keys)) {
+                    basicValue = bms.basicValue;
+                    break;
+                }
+            }
+            break;
+        }
+    }
+    let factors = [];
+    if (!isMatch || !isNeedFactor) {
+        rst = basicValue;
+    } else {
+        for (const fm of billsUnitPriceFeature.feature.factorMappings) {
+            isMatch = true;
+            if (fm.basicFactorKeys.length === billsUnitPriceFeature.feature.basicKeyOptions.length) {
+                for (let kIdx = 0; kIdx < fm.basicFactorKeys.length; kIdx++) {
+                    if (fm.basicFactorKeys[kIdx] !== 'ALL' && !_chkIfEquals(curItem[billsUnitPriceFeature.feature.basicKeyOptions[kIdx].key], fm.basicFactorKeys[kIdx])) {
+                        isMatch = false;
+                        break;
+                    }
+                }
+            } else {
+                isMatch = false;
+                break;
+            }
+            if (isMatch) {
+                for (const fms of fm.subs) {
+                    if (_chkUnitPriceFeatureKeys(fms.keys)) {
+                        factors.push(fms.basicValue);
+                    }
+                }
+                // 允许多个,不break;
+            }
+        }
+        //3. 装配(指标基价 即 默认的清单单价)
+        let unitFeeVal = basicValue;
+        for (const factor of factors) {
+            unitFeeVal = unitFeeVal * parseFloat(factor);
+        }
+        rst = unitFeeVal;
+    }
+    return rst;
+}
+
+function _chkUnitPriceFeatureKeys(keys) {
+    let rst = false;
+    for (const subKey of keys) {
+        let isPrjFeatureMatch = false;
+        for (let prjF of projectObj.project.projectInfo.property.projectFeature) {
+            if (prjF.key === subKey.key) {
+                if (prjF.value === subKey.value) {
+                    isPrjFeatureMatch = true;
+                    // isKeyMatch = true;
+                    break;
+                } else {
+                    //key相同而value不同,则无需再循环,直接退出
+                    break;
+                }
+            }
+        }
+        if (isPrjFeatureMatch) {
+            rst = true;
+            break;
+        }
+    }
+    return rst;
+}

+ 24 - 18
web/building_saas/pm/html/project-management.html

@@ -362,9 +362,9 @@
                             <% } else { %>
                                 <div class="custom-control custom-radio custom-control-inline">
                                     <input type="radio" value="bill" id="radioBill" name="valuation_type" class="custom-control-input">
-                                    <label class="custom-control-label" <%= compilationName.includes('公路造价') ? '' : 'checked' %> for="radioBill">预算</label>
+                                    <label class="custom-control-label" <%= (compilationName.includes('公路造价') || compilationName.includes('广东农村养护(2021)')) ? '' : 'checked' %> for="radioBill">预算</label>
                                 </div>
-                                <div class="custom-control custom-radio custom-control-inline">
+                                <div class="custom-control custom-radio custom-control-inline" <% if (compilationName.includes("广东农村养护(2021)")) { %> style="display:none" <% } %>>
                                     <input type="radio" value="ration" id="radioRation" name="valuation_type" class="custom-control-input">
                                     <label class="custom-control-label" for="radioRation">工程量清单</label>
                                 </div>
@@ -386,23 +386,27 @@
                             </select>
                         </div>
                     </div>
-                    <% if (!compilationName.includes('内蒙古高速公路日常养护估算(2021)')) { %>
-                        <div class="form-group row" id="tender-engineering-group">
-                            <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">养护类别</label>
-                            <div class="col">
-                                <select class="form-control  form-control-sm" id="tender-engineering">
-                                </select>
-                            </div>
+                    <div class="form-group row" id="tender-engineering-group" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") ) { %> style="display:none" <% } %>>
+                        <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">养护类别</label>
+                        <div class="col">
+                            <select class="form-control  form-control-sm" id="tender-engineering">
+                            </select>
                         </div>
-                        <span class="form-text text-danger" id="engineering-info" style="display: none;">请选择养护类别</span>
-                        <div class="form-group row" id="tender-feeStandard-group">
-                            <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">费用标准</label>
-                            <div class="col">
-                                <select class="form-control  form-control-sm" id="tender-feeStandard"></select>
-                            </div>
+                    </div>
+                    <span class="form-text text-danger" id="engineering-info" style="display: none;">请选择养护类别</span>
+                    <div class="form-group row" id="tender-feeStandard-group" <% if (compilationName.includes("内蒙古高速公路日常养护估算(2021)") || compilationName.includes("广东农村养护(2021)") ) { %> style="display:none" <% } %>>
+                        <label for="staticEmail" class="col-auto col-form-label col-form-label-sm" >费用标准</label>
+                        <div class="col">
+                            <select class="form-control  form-control-sm" id="tender-feeStandard"></select>
+                        </div>
+                    </div>
+                    <div class="form-group row" id="tender-adminLevel-group" <% if (!compilationName.includes("广东农村养护(2021)") ) { %> style="display:none" <% } %>>
+                        <label for="staticEmail" class="col-auto col-form-label col-form-label-sm" >行政等级</label>
+                        <div class="col">
+                            <select class="form-control  form-control-sm" id="tender-adminLevel"></select>
                         </div>
-                        <span class="form-text text-danger" id="feeStandard-info" style="display: none;">请选择费用标准</span>
-                    <% } %>
+                    </div>
+                    <span class="form-text text-danger" id="feeStandard-info" style="display: none;">请选择费用标准</span>
                     <div class="form-group row" id="taxType_div">
                         <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">计税方式</label>
                         <div class="col">
@@ -824,7 +828,9 @@
     let rationValuation = '<%- rationValuation %>';
     let engineeringList = '<%- engineeringList %>';
     let compilationData = '<%- compilationData %>';
-    let estimationData = '<%- estimationValuation %>'
+    let estimationData = '<%- estimationValuation %>';
+    let adminLevelType = JSON.parse('<%- adminLevelType %>');
     compilationData = JSON.parse(compilationData.replace(/[\s\r\n]/g, ""));//去掉空格字符
+    _iniAdminLevel();
 </script>
 </html>

+ 51 - 37
web/building_saas/pm/js/pm_newMain.js

@@ -1805,6 +1805,23 @@ function initFeeStandardSel() {
     getStdCalcProgramFiles();
 }
 
+function _iniAdminLevel() {
+    //初始化行政等级(广东农村公路用)
+    $('#tender-adminLevel').empty();
+    let adminLevels = [];
+    adminLevels.push(adminLevelType.CITY_LEVEL);
+    adminLevels.push(adminLevelType.COUNTRY_SIDE_LEVEL);
+    adminLevels.push(adminLevelType.VLLAGE_LEVEL);
+    for (let feeName of adminLevels) {
+        let $opt = $(`<option value="${feeName}">${feeName}</option>`);
+        $('#tender-adminLevel').append($opt);
+    }
+    $('#tender-adminLevel')[0].selectedIndex = 0;
+    // changeFeeRate(currentEngLib);
+    // setTaxGroupHtml();
+    // getStdCalcProgramFiles();
+}
+
 function changeFeeStandard() {
     let currentEngLib = getEngineeringLib($('#tender-engineering').val() + $('#tender-feeStandard').val(), getEngineeringList());
     changeFeeRate(currentEngLib);
@@ -1964,7 +1981,12 @@ $(document).ready(function() {
         let nameList = getNameList($('#poj-name-list').children());
         let isExist = hasListName(nameList, pojName);
         if (!isExist) {
-            changeValuationType(BUDGET);
+            //ESTIMATION
+            if (compilationData.name === '内蒙古高速公路日常养护估算(2021)') {
+                changeValuationType(ESTIMATION);
+            } else {
+                changeValuationType(BUDGET);
+            }
             if (pojName !== '') {
                 replaceClass($('#poj-name-info'), 'text-danger', 'text-info');
                 setDangerInfo($('#poj-name-info'), `新建“${pojName}”`);
@@ -2551,54 +2573,45 @@ function AddProject() {
     }
 }
 
+function _getOptionDivDomStr(value, rdName, labelName, id, isChecked) {
+    return `
+        <div class="custom-control custom-radio custom-control-inline">
+            <input type="radio" value="${value}" name="${rdName}" ${isChecked ? "checked" : ""} id="${id}" class="custom-control-input">
+            <label class="custom-control-label" for="${id}">${labelName}</label>
+        </div>
+    `;
+}
+
 // 创建建设项目可选项
 function initProjectOptSet($target) {
     const html = `<div class="form-group row">
                         <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">项目类型</label>
                         <div class="col">
-                            ${COMPILATION_NAME.includes('公路造价') ? `
-                            <div class="custom-control custom-radio custom-control-inline">
-                                <input type="radio" value="${SUGGESTION}" name="valuation-type" checked id="type-suggestion" class="custom-control-input">
-                                <label class="custom-control-label" for="type-suggestion">建议估算</label>
-                            </div>
-                            <div class="custom-control custom-radio custom-control-inline">
-                                <input type="radio" value="${FEASIBILITY}" name="valuation-type" id="type-feasibility" class="custom-control-input">
-                                <label class="custom-control-label" for="type-feasibility">可行性估算</label>
-                            </div>
-                            <div class="custom-control custom-radio custom-control-inline">
-                                <input type="radio" value="${ROUGH}" name="valuation-type" id="type-rough" class="custom-control-input">
-                                <label class="custom-control-label" for="type-rough">概算</label>
-                            </div>
+                            ${COMPILATION_NAME.includes('公路造价') ? ` 
+                                ${_getOptionDivDomStr(SUGGESTION, "valuation-type", "建议估算", "type-suggestion", true)}
+                                ${_getOptionDivDomStr(FEASIBILITY, "valuation-type", "可行性估算", "type-feasibility", false)}
+                                ${_getOptionDivDomStr(ROUGH, "valuation-type", "概算", "type-rough", false)}
                             ` : ''}
                             ${COMPILATION_NAME.includes('内蒙古高速公路日常养护估算(2021)') ? `
-                                <div class="custom-control custom-radio custom-control-inline">
-                                    <input type="radio" value="${ESTIMATION}" name="valuation-type" checked id="type-estimation" class="custom-control-input">
-                                    <label class="custom-control-label" for="type-estimation">估算</label>
-                                </div>
-                                ` : `
-                                <div class="custom-control custom-radio custom-control-inline">
-                                    <input type="radio" value="${BUDGET}" name="valuation-type" ${COMPILATION_NAME.includes('公路造价') ? '' : 'checked'} id="type-budget" class="custom-control-input">
-                                    <label class="custom-control-label" for="type-budget">预算</label>
-                                </div>
-                                <div class="custom-control custom-radio custom-control-inline">
-                                    <input type="radio" value="${BOQ}" name="valuation-type" id="type-boq" class="custom-control-input">
-                                    <label class="custom-control-label" for="type-boq">工程量清单</label>
-                                </div>
-                                `
+                                ${_getOptionDivDomStr(ESTIMATION, "valuation-type", "估算", "type-suggestion", true)}
+                                ` : ``
+                            }
+                            ${COMPILATION_NAME.includes('广东农村养护(2021)') ? `
+                                    ${_getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", true)}
+                                ` : ``
+                            }
+                            ${(COMPILATION_NAME !== '内蒙古高速公路日常养护估算(2021)' && COMPILATION_NAME !== '广东农村养护(2021)') ? `
+                                ${_getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", !COMPILATION_NAME.includes('公路造价'))}
+                                ${_getOptionDivDomStr(BOQ, "valuation-type", "工程量清单", "type-boq", false)}
+                                ` : ``
                             }
                         </div>
                     </div>
                     <div class="form-group row hide-area" id="boq-type">
                         <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">清单类型</label>
                         <div class="col">
-                            <div class="custom-control custom-radio custom-control-inline">
-                                <input type="radio" value="${BID_INVITATION}" name="boq-type-input" id="boq-type-tender" class="custom-control-input">
-                                <label class="custom-control-label" for="boq-type-tender">招标</label>
-                            </div>
-                            <div class="custom-control custom-radio custom-control-inline">
-                                <input type="radio" value="${BID_SUBMISSION}" name="boq-type-input" id="boq-type-bidder" class="custom-control-input" checked>
-                                <label class="custom-control-label" for="boq-type-bidder">投标</label>
-                            </div>
+                            ${_getOptionDivDomStr(BID_INVITATION, "boq-type-input", "招标", "boq-type-tender", false)}
+                            ${_getOptionDivDomStr(BID_SUBMISSION, "boq-type-input", "投标", "boq-type-bidder", true)}
                         </div>
                     </div>`;
     //const $children = $(html);
@@ -3154,7 +3167,8 @@ function AddTender() {
         }*/
 
         let IDGroup = $("#tender-calcProgram").val();
-        if (!IDGroup || IDGroup === '') {
+        // 如果compilationData有估算(estimation_valuation)的话,可以不要计算程序吧
+        if ((!IDGroup || IDGroup === '') && (compilationData.estimation_valuation.length === 0)) {
             setDangerInfo($('#calcProgram-info'), '请选择计算程序');
             return false;
         }

+ 0 - 1
web/building_saas/report/js/rpt_main.js

@@ -432,7 +432,6 @@ let zTreeOprObj = {
                     let targetData = [];
                     tree_Data_Helper.getFlatArray(tree_Data_Helper.buildTreeNodeDirectly(result.data, false), targetData);
                     for (let prj of targetData) {
-                    // for (let prj of result.data) {
                         if (currPrjParentID === prj.ParentID) {
                             selectedProjects.push({name: prj.name, ID: prj.ID});
                         }

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

@@ -265,7 +265,7 @@ function buildText(destRst, cell, font, control, offsetX, offsetY, adjustY, canv
             let innerDftFontHeight = (dftFontHeight * 3 / 4); //SVG的字体与canvas的字体大小的切换, 不用考虑取整
             if (control) {
                 if (control[JV.CONTROL_PROPS[JV.CONTROL_PROP_IDX_VERTICAL]] === "top") {
-                    y = innerArea[JV.IDX_TOP] + JV.OUTPUT_OFFSET[JV.IDX_TOP] + orgFontHeight;
+                    y = innerArea[JV.IDX_TOP] + JV.OUTPUT_OFFSET[JV.IDX_TOP];
                 } else if (control[JV.CONTROL_PROPS[JV.CONTROL_PROP_IDX_VERTICAL]] === "bottom") {
                     y = innerArea[JV.IDX_BOTTOM] - JV.OUTPUT_OFFSET[JV.IDX_BOTTOM];
                 } else if (control[JV.CONTROL_PROPS[JV.CONTROL_PROP_IDX_VERTICAL]] === "center") {

+ 1 - 0
web/over_write/guangdongnongcun.js

@@ -0,0 +1 @@
+const is_GD_NONGCUN = true;

+ 2 - 0
web/over_write/js/neimeng_gusuan.js

@@ -0,0 +1,2 @@
+
+const isNM_ESTIMATION = true;