Explorar o código

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

TonyKang %!s(int64=4) %!d(string=hai) anos
pai
achega
c4d50ca5e8

+ 4 - 2
logs/online_logs.js

@@ -18,13 +18,15 @@ async function saveOnlineTime(req) {
         let start = req.session.online_start_time;
         if(start === undefined) return req.session.online_start_time ==end;
         let online_times =  end - start;
-        //1秒内只记一次就好
+        //0.5秒内只记一次就好
         if(online_times < 500) return;//如果间隔太短,则忽略
         if(online_times > interval_time ){//如果间隔超过有效时长,则不累加这次时长,从头开始算
             req.session.online_start_time = end;
             return
         }
         if(!req.session.sessionUser||!req.session.sessionCompilation) return;
+        //先设置session再更新,在多个服务器多请求的情况下,update完再设置回session可能会造成多算时间
+        req.session.online_start_time = end;
         let dataString = moment(end).format('YYYY-MM-DD');
         let condition = {userID:req.session.sessionUser.id,compilationID:req.session.sessionCompilation._id,dateString:dataString};
         let userCondition = {_id: mongoose.Types.ObjectId(req.session.sessionUser.id)};
@@ -43,5 +45,5 @@ async function saveOnlineTime(req) {
         console.log("统计登录时间错误,online_times值:"+online_times);
         console.log(e);
     }
-    req.session.online_start_time = end;
+    
 }

+ 3 - 1
modules/complementary_glj_lib/models/gljModel.js

@@ -136,7 +136,9 @@ class GljDao {
         // 替换过滤类型
         if (replace) {
             // 人材机类型是“混凝土、砂浆、配合比、商品混凝土、商品砂浆”时,筛选的可替换的人材机类型应是“混凝土、或砂浆、或配合比、或商品混凝土、或商品砂浆”。
-            const materialTypes = [202, 203, 204, 205, 206];
+            //2021-03-17  zhang 需求更改 当前是材料、主材、设备,可以替换为材料、主材、设备。(因有些混凝土在定额书中未给单价,所以是主材,实际使用时 需要替换为“砼”或“商砼”等)
+            //const materialTypes = [202, 203, 204, 205, 206];
+            const materialTypes = [201,202, 203, 204, 205, 206,4,5];
             query.gljType = materialTypes.includes(replace.gljType) ? {$in: materialTypes} : replace.gljType;
         }
         // 添加组成物时的查询扩展

+ 1 - 6
modules/glj/models/unit_price_model.js

@@ -408,20 +408,15 @@ class UnitPriceModel extends BaseModel {
         }
 
         let codeList = [];
-        let nameList =[];
         for (let tmp of currentUnitList) {
             if (codeList.indexOf(tmp.code) >= 0) {
                 continue;
             }
             codeList.push(tmp.code);
-            if(nameList.indexOf(tmp.name)>=0){
-                continue
-            }
-            nameList.push(tmp.name);
         }
 
         // 查找即将更替的单价文件是否存在对应的工料机数据 -- (这里只根据code和名称初步过滤,因为其它的几项更改的概率不大,在下一步的比较中再精确匹配)
-        let condition = {unit_price_file_id: changeUnitPriceId, code: {"$in": codeList},name:{"$in": nameList}};
+        let condition = {unit_price_file_id: changeUnitPriceId, code: {"$in": codeList}};
         let targetUnitList = await this.findDataByCondition(condition, null, false, ['code','name','specs','unit','type']);
 
         // 如果没有重叠的数据则原有的数据都复制一份

+ 1 - 1
modules/main/facade/info_price_facade.js

@@ -224,7 +224,7 @@ async function getDataByFuzzyMatch(keyword, data){
 
   for (let info of allInfoPrice) { 
     //specs
-    let mstring = info.name + info.spec;
+    let mstring = info.name + info.specs;
     mstring = mstring.replace(/混凝土/g, "砼");
     info.mstring = mstring;
     let matchCount = 0;

+ 43 - 8
modules/main/facade/ration_facade.js

@@ -590,13 +590,13 @@ async function getProjectGLJinfo(projectID,t_newRationGLJList,gljKeyMap,gljCodes
     let rkey = getIndex(ration_glj);
     let pglj = projectGLJMap[rkey];
     let subList = [];
-    setUnitPrice(pglj,unitPriceMap);
+    await setUnitPrice(pglj,unitPriceMap,ration_glj);
     if(existMixRatioMap[rkey]){//如果有组成物
       for(let m of existMixRatioMap[rkey]){
          let mpglj = projectGLJMap[getIndex(m)]
          if(mpglj){
           let cglj = _.clone(mpglj); 
-          setUnitPrice(cglj,unitPriceMap);
+          await setUnitPrice(cglj,unitPriceMap);
           cglj.ratio_data = m;
           subList.push(cglj);
          }else{
@@ -617,13 +617,48 @@ async function getProjectGLJinfo(projectID,t_newRationGLJList,gljKeyMap,gljCodes
 
 
 
-  function setUnitPrice(p,unitPriceMap){
-    p.unit_price = unitPriceMap[getIndex(p)];
+  async function setUnitPrice(p,unitPriceMap,ration_glj){
+    let unitPrice =  unitPriceMap[getIndex(p)];
+    if(unitPrice){
+      p.unit_price = unitPrice;
+    }else{
+      unitPrice = newPriceDataFromPGlj(p,unitPriceFileId);
+      if(ration_glj){
+        unitPrice.base_price = ration_glj.basePrice;
+        unitPrice.market_price = ration_glj.marketPrice;
+      }
+      await unitPriceModel.insertMany([unitPrice]);
+      p.unit_price =unitPrice
+    }
+   
   }
 
 }
 
-
+function newPriceDataFromPGlj(np,unitPriceFileId){
+  let insertData = {
+    code: np.code,
+    base_price: np.base_price,
+    market_price: np.market_price,
+    unit_price_file_id: unitPriceFileId,
+    name: np.name,
+    taxRate:np.taxRate,
+    specs:np.specs?np.specs:'',
+    original_code:np.original_code,
+    unit:np.unit?np.unit:'',
+    type: np.type,
+    short_name: np.shortName !== undefined ? np.shortName : '',
+    glj_id: np.glj_id,
+    is_add:0,
+    grossWeightCoe:np.grossWeightCoe,
+    purchaseStorageRate:np.purchaseStorageRate,
+    offSiteTransportLossRate:np.offSiteTransportLossRate,
+    handlingLossRate:np.handlingLossRate
+  };
+  if(np.from=='cpt') insertData.is_add=1;//如果是来自补充工料机,则都添加新增标记
+  if(insertData.code != insertData.original_code) insertData.is_add=1;//添加的时候如果是复制整块来的,可能在源项目中是新增的工料机,这里也要添上(暂时可能还用不到)
+  return insertData;
+}
 
 async function getUnitPriceData(newProjectGLJList,gljCodes,unitPriceFileId){
   let unitPriceMap = {};
@@ -636,8 +671,8 @@ async function getUnitPriceData(newProjectGLJList,gljCodes,unitPriceFileId){
   for(let np of newProjectGLJList){
     let pkey = getIndex(np);
     if(unitPriceMap[pkey]) continue;
-
-    let insertData = {
+    let insertData = newPriceDataFromPGlj(np,unitPriceFileId)
+    /* let insertData = {
       code: np.code,
       base_price: np.base_price,
       market_price: np.market_price,
@@ -657,7 +692,7 @@ async function getUnitPriceData(newProjectGLJList,gljCodes,unitPriceFileId){
       handlingLossRate:np.handlingLossRate
     };
     if(np.from=='cpt') insertData.is_add=1;//如果是来自补充工料机,则都添加新增标记
-    if(insertData.code != insertData.original_code) insertData.is_add=1;//添加的时候如果是复制整块来的,可能在源项目中是新增的工料机,这里也要添上(暂时可能还用不到)
+    if(insertData.code != insertData.original_code) insertData.is_add=1;//添加的时候如果是复制整块来的,可能在源项目中是新增的工料机,这里也要添上(暂时可能还用不到) */
     newUnitPriceList.push(insertData);
     unitPriceMap[pkey] = insertData;
   }

+ 3 - 4
modules/pm/facade/pm_facade.js

@@ -1816,7 +1816,7 @@ async function prepareInitialData(userId, compilation, example) {
         await updateUsedList(userId, compilation);
         const logData = {
             key: uuidV1(),
-            content: '正在初始化数据,请稍候……',
+            content: '正在加载例题,请稍候……',
             userID: userId,
             compilationID: compilation,
             status: 'start',
@@ -1833,10 +1833,9 @@ async function prepareInitialData(userId, compilation, example) {
                 copyCompleRationSection(userId, compilation),
                 copyCompleGljSection(userId, compilation)
             ];
-           /* 2021-01-19 第一次的时候不自动加载例题,右键加载 
-              if (example && example.length > 0) {
+            if (example && example.length > 0) {
                 prepareTask.push(copyExample(userId, compilation, example));
-            } */
+            }
             await Promise.all(prepareTask);
         } catch (error) {
             doc.errorMsg = '加载例题失败,请检查例题项目是否存在!';

+ 31 - 11
public/web/gljUtil.js

@@ -218,9 +218,16 @@ let gljUtil = {
             let p =0;
             for(let ratio of glj.ratio_data){
                 let rIndex = gljUtil.getIndex(ratio);
-                let tem =  _.find(projectGLJDatas.gljList,function(item){
-                    return rIndex == gljUtil.getIndex(item)
-                });
+                let tem = null;
+                if(projectGLJDatas.gljMap){
+                    tem = projectGLJDatas.gljMap[rIndex]
+                }
+                if(!tem){
+                    tem =  _.find(projectGLJDatas.gljList,function(item){
+                        return rIndex == gljUtil.getIndex(item)
+                    });
+                }
+              
                 if(tem){
                     let tem_marketPrice = this.getMarketPrice(tem,projectGLJDatas,calcOptions,decimalObj,true,_,scMathUtil);  //let priceData=this.getGLJPrice(tem,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,true,_,scMathUtil);
                     let temP = scMathUtil.roundForObj(
@@ -282,9 +289,15 @@ let gljUtil = {
             let p =0;
             for(let ratio of glj.ratio_data){
                 let rIndex = gljUtil.getIndex(ratio);
-                let tem =  _.find(projectGLJDatas.gljList,function(item){
-                    return rIndex == gljUtil.getIndex(item);
-                });
+                let tem = null;
+                if(projectGLJDatas.gljMap){
+                    tem = projectGLJDatas.gljMap[rIndex]
+                }
+                if(!tem){
+                    tem =  _.find(projectGLJDatas.gljList,function(item){
+                        return rIndex == gljUtil.getIndex(item);
+                    });
+                }
                 if(tem){
                     let priceData=this.getGLJPrice(tem,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,true,_,scMathUtil);
                     let temP = scMathUtil.roundForObj(priceData.adjustPrice*scMathUtil.roundForObj(ratio.consumption,quantity_decimal),process_decimal);
@@ -314,16 +327,23 @@ let gljUtil = {
     isDef:function (v) {
         return v !== undefined && v !== null;
     },
+    nullString(key){
+        return (key === undefined || key === null || key === '') ? 'null' : key
+      },
     getIndex(obj, pops){
         let t_index = '';
         let k_arr = [];
         if(!pops) pops = this.gljKeyArray;
-        for (let p of pops) {
-            let tmpK = (obj[p] == undefined || obj[p] == null || obj[p] == '') ? 'null' : obj[p];
-            k_arr.push(tmpK);
+        if(pops.length === 5){
+            return `${this.nullString(obj[pops[0]])}|-|${this.nullString(obj[pops[1]])}|-|${this.nullString(obj[pops[2]])}|-|${this.nullString(obj[pops[3]])}|-|${this.nullString(obj[pops[4]])}`
+        }else{
+            for (let p of pops) {
+                let tmpK = (obj[p] == undefined || obj[p] == null || obj[p] == '') ? 'null' : obj[p];
+                k_arr.push(tmpK);
+            }
+            t_index = k_arr.join("|-|");
+            return t_index;
         }
-        t_index = k_arr.join("|-|");
-        return t_index;
     },
     getGljTypeSeq:function () {
         let gljType = this.gljType;

+ 35 - 9
public/web/scMathUtil.js

@@ -170,19 +170,44 @@ let scMathUtil = {
     isNumber : function (obj) {
         return obj === +obj;
     },
+
+    floatLength:function(num){
+        let lenght = 0;
+        let str =`${num}`;//me.isNumber(num)?num+"":num;
+        let sub = str.split(".")
+        if(sub.length == 2){
+            return sub[1].length;
+        }
+        return lenght
+    },
+
+    innerRound:function(num,lenght,decimal){
+        let value;
+        let pre = 1;
+        if(lenght === 0) return num;
+        if(num<0) pre = -1;//负数的时候先变成正数
+        num = num*pre;
+        let n = Math.pow(10,lenght);
+        value = Math.round(num * n)
+        if(lenght <= decimal){
+            return value/n*pre
+        }else{
+            value = Math.round(value/Math.pow(10,lenght-decimal))
+            return value/Math.pow(10,decimal)*pre
+        }
+    },
+
     roundForObj:function(obj,decimal){
         let me = this;
-        let value;
         if(obj === undefined || obj === null || isNaN(obj)) return 0;
-        let n = Math.pow(10,decimal);
+        let lenght = 10;
+        let value;
         if(me.isNumber(obj)){
-          value = Math.round(obj * n) / n;
-          //value = me.roundTo(obj,-decimal)
-        }else {
-          value = Math.round(Number(obj) * n) / n;
-          //value = me.roundTo(Number(obj),-decimal);
+            value =  me.innerRound(obj,lenght,decimal);
+        }else{
+            value = me.innerRound(Number(obj),lenght,decimal);
         }
-        return value
+        return value;
     },
     roundToString:function(obj,decimal){
         let me = this;
@@ -222,5 +247,6 @@ Number.prototype.toDecimal = function (ADigit) {
     // var s = scMathUtil.roundTo(this, digit);
     // console.log('Number: ' + this + '   Digit: ' + digit + '    Result: ' + s);
     // return parseFloat(s);
-    return scMathUtil.roundTo(this, digit);
+    //scMathUtil.roundTo(this, digit);
+    return scMathUtil.roundForObj(this, -digit); 
 };

+ 11 - 5
public/web/syntax-detection.js

@@ -1,4 +1,4 @@
-/** 
+/**
  * 浏览器兼容性,特性检查
  * 参考列表: http://kangax.github.io/compat-table/es6/
  * 同内核的不同的浏览器需要处理,比如qq浏览器登陆成功后,ie浏览器登陆页面会自动跳转到项目管理页面。因此项目管理页面也需要检测
@@ -151,7 +151,7 @@ function checkSyntax() {
         }
 
         // DOM
-        if (typeof document.documentElement.requestFullscreen !== 'function' && 
+        if (typeof document.documentElement.requestFullscreen !== 'function' &&
             typeof document.documentElement.mozRequestFullscreen !== 'function' &&
             typeof document.documentElement.webkitRequestFullscreen !== 'function' &&
             typeof document.documentElement.msRequestFullscreen !== 'function') {
@@ -170,7 +170,7 @@ function showBrowserTip() {
         '<div class="modal-dialog modal-lg" role="document">' +
         '<div class="modal-content">' +
             '<div class="modal-body">' +
-                '<h5>浏览器版本过低,可能会有安全风险;</h5>' +
+                '<h5>浏览器版本过低</h5>' +
                 '<h5>请更新 「浏览器」 或者 使用 「纵横Z+造价工作平台」 登录。</h5>' +
                 '<div class="row my-4">' +
                     '<div class="col-6">' +
@@ -178,7 +178,13 @@ function showBrowserTip() {
                     '</div>' +
                     '<div class="col-6">' +
                         '<div class="text-center"><a href="https://smartcost.com.cn/downloadzplus" class="btn btn-primary" target="_blank">下载 纵横Z+造价工作平台</a></div>' +
-                    '</div></div></div></div></div></div>';
+                    '</div>' +
+                '</div>' +
+            '</div>' +
+            '<div class="modal-footer">' +
+                '<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>' +
+            '</div>'
+        '</div></div></div>';
     $('body').append(html);
     $('#browser').modal('show');
 }
@@ -191,4 +197,4 @@ $(document).ready(function () {
         showBrowserTip();
         return false;
     }
-});
+});

+ 1 - 1
web/building_saas/main/js/controllers/block_controller.js

@@ -505,7 +505,7 @@ let BlockController = {
 
     preparePasteData : function (datas,billsIDMap,firstParentID,lastNextID,selected) {
         let me = this;
-        me.datas = _.cloneDeep(projectObj.project.Bills.datas);
+        me.datas = _.clone(projectObj.project.Bills.datas);
         let bills = [],rations=[],ration_gljs = [],ration_coes = [],quantity_details = [],ration_installations = [],ration_templates=[];
         let firstBillIDs = [],lastBillID = null;//记录第一层清单的ID,和第一层的最后一个清单ID
         let firstIDMap = {};

+ 8 - 2
web/building_saas/main/js/main.js

@@ -30,10 +30,16 @@ $(function () {
         //refreshSubSpread();
     });
 
-    $('#tab_report').on('shown.bs.tab', function(e){
-        projectObj.project.calcProgram.doTenderCalc();   // 进入报表前先自动调价计算一遍
+    $('#tab_report').on('shown.bs.tab', function(e){   
         sessionStorage.setItem('mainTab', '#tab_report');
         autoFlashHeight();
+        $.bootstrapLoading.start();
+        setTimeout(function(){
+            projectObj.project.calcProgram.doTenderCalc();   // 进入报表前先自动调价计算一遍
+            $.bootstrapLoading.end();
+        }, 100);
+       
+    
     });
     let mainResizeEles = getMainResizeEles();
     SlideResize.verticalSlide(mainResizeEles.eleObj, mainResizeEles.limit, function(){

+ 8 - 0
web/building_saas/main/js/models/project_glj.js

@@ -1,3 +1,5 @@
+
+
 /**
  * 工料机汇总相关数据
  *
@@ -82,6 +84,11 @@ ProjectGLJ.prototype.refreshByDatas = function(datas){
 
 ProjectGLJ.prototype.loadToCache = function (data) {
     this.datas = data;
+    this.datas.gljMap =  {};
+    for(let g of this.datas.gljList){
+       this.datas.gljMap[gljUtil.getIndex(g)]=g;
+    }
+
 }
 
 /**
@@ -1001,6 +1008,7 @@ ProjectGLJ.prototype.loadNewProjectGLJToCache = function (data,tIDMap) {//把新
     let uIndex = gljUtil.getIndex(data.unit_price);
     if(!unitPriceMap[uIndex])  unitPriceMap[uIndex] = data.unit_price;
     this.datas.gljList.push(data);
+    this.datas.gljMap[gljUtil.getIndex(data)]= data;
     IDMap[data.id] = data;
     return data;
 };

+ 1 - 1
web/building_saas/main/js/models/ration_glj.js

@@ -102,7 +102,7 @@ let ration_glj = {
                 }
             }
 
-            result = gljOprObj.combineWithProjectGlj(result);
+            result = gljOprObj.combineWithProjectGlj(result,false);
 
             if (!needOneBill) return result;
 

+ 4 - 4
web/building_saas/main/js/views/glj_col.js

@@ -261,7 +261,7 @@ let gljCol = {
             setting.view.lockColumns = newArray;
         }
     },
-    initGljCol: function (showAdjustPrice, showTenderFields) {
+    initGljCol: function (showAdjustPrice, showTenderFields,init=false) {
       let me = gljCol;
       if (showAdjustPrice !== true) {
         me.removeCol('adjustPrice', me.ration_glj_setting);
@@ -274,7 +274,7 @@ let gljCol = {
         me.removeCol('priceFrom', me.project_glj_setting);
       } 
       
-      me.showTenderFields(showTenderFields, false);
+      me.showTenderFields(showTenderFields, false,init);
 
       gljOprObj.setting = me.ration_glj_setting;
       projectGljObject.projectGljSetting = me.project_glj_setting;
@@ -282,7 +282,7 @@ let gljCol = {
       me.setScopeFormater();
       gljOprObj.scopeSetting = me.scopeSetting;
     },
-    showTenderFields: function (showFields = false, needRefresh = false){
+    showTenderFields: function (showFields = false, needRefresh = false,init=false){
         let me = gljCol;
 
         let PGLJHeader = me.project_glj_setting.header;
@@ -308,7 +308,7 @@ let gljCol = {
 
         colSettingObj.setVisible('feesIndex.common.tenderUnitFee', showFields);
         colSettingObj.setVisible('feesIndex.common.tenderTotalFee', showFields);
-        colSettingObj.updateColSetting(true);
+        colSettingObj.updateColSetting(true,init);
 
         if (needRefresh){
             if(projectGljObject.projectGljSpread) {

+ 10 - 3
web/building_saas/main/js/views/glj_view.js

@@ -855,9 +855,16 @@ var gljOprObj = {
         var temRationGLJs = [];
         for (var i = 0; i < mixRatioList.length; i++) {
             let mIndex = gljOprObj.getIndex(mixRatioList[i],gljKeyArray);
-            var pg = _.find(projectGljs, function (item) {
-                return gljOprObj.getIndex(item,gljKeyArray) == mIndex
-            });//改关联关系
+            let pgljMap = projectObj.project.projectGLJ.datas.gljMap;
+            let pg = null;
+            if(pgljMap){
+                pg = pgljMap[mIndex];
+            }
+            if(!pg){//兼容旧数据,以防万一
+                pg = _.find(projectGljs, function (item) {
+                    return gljOprObj.getIndex(item,gljKeyArray) == mIndex
+                });//改关联关系
+            }
             if(pg){
                 let tem = {
                     mixRatioId:mixRatioList[i].id,

+ 2 - 2
web/building_saas/main/js/views/main_tree_col.js

@@ -696,7 +696,7 @@ let colSettingObj = {
         }
         return false;
     },
-    updateColSetting: function (skipSetValue = false) {
+    updateColSetting: function (skipSetValue = false,init=false) {
         let mainSheet = projectObj.mainSpread.getActiveSheet();
         if(!skipSetValue){
             let sheet = this.settingSpread.getActiveSheet();
@@ -711,7 +711,7 @@ let colSettingObj = {
             mainSheet.showColumn(projectObj.project.projSetting.mainGridSetting.frozenCols, GC.Spread.Sheets.HorizontalPosition.left);
         });
         //refresh nodes to autoFitRow
-        projectObj.mainController.refreshTreeNode(projectObj.project.mainTree.roots, true);
+       if(init===false) projectObj.mainController.refreshTreeNode(projectObj.project.mainTree.roots, true);
         if(!skipSetValue){
             //列设置将项目特征和工作内容都取消打钩后,更新快速列设置
             if(!this.getVisible('itemCharacterText')){

+ 9 - 3
web/building_saas/main/js/views/project_view.js

@@ -965,14 +965,15 @@ var projectObj = {
                 });
                 let startShowTime = +new Date();
                 that.mainController = TREE_SHEET_CONTROLLER.createNew(that.project.mainTree, that.mainSpread.getActiveSheet(), that.project.projSetting.mainGridSetting);
-                that.mainController.showTreeData();
+               
                 let endShowTime = +new Date();
                 console.log(`show data时间——${endShowTime - startShowTime}`);
                 that.mainController.bind('refreshBaseActn', that.refreshBaseActn);
                 that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.beforeTreeSelectedChange, that.beforeMainTreeSelectedChange);
                 that.mainController.bind(TREE_SHEET_CONTROLLER.eventName.treeSelectedChanged, that.treeSelectedChanged);
                 gljCol.initGljCol(that.project.projSetting.glj_col?that.project.projSetting.glj_col.showAdjustPrice:false,
-                  that.project.property.tenderSetting.showTenderFields?that.project.property.tenderSetting.showTenderFields:false);
+                  that.project.property.tenderSetting.showTenderFields?that.project.property.tenderSetting.showTenderFields:false,true);
+                  that.mainController.showTreeData();
                 subObj.initSubSpread();//初始化主界面下方的表格
                 if(!projectReadOnly){
                     that.mainSpreadEscKey(that.mainSpread, that.mainSpreadEditStarting, that.mainSpreadEditEnded);
@@ -1760,7 +1761,12 @@ var projectObj = {
                     name: '造价计算',
                     icon: 'fa-calculator',
                     callback: function () {
-                        project.calcProgram.calcAllNodesAndSave();
+                        $.bootstrapLoading.start();
+                        setTimeout(function(){
+                            project.calcProgram.calcAllNodesAndSave();
+                            $.bootstrapLoading.end();
+                        },100)
+                        
                     },
                     disabled: function () {
                         if (projectReadOnly) {

+ 1 - 1
web/building_saas/main/js/views/tender_price_view.js

@@ -419,7 +419,7 @@ let tender_obj={
         // 量价类,工料机消耗量调整系数不允许输入
         let treeNode = me.tenderTree.items[row];
         if (calcTools.isVolumePrice(treeNode) || calcTools.isGljRation(treeNode)){
-            if ([11,12,13,14,15].includes(col))
+            if ([10,11,12,13,14].includes(col))
                 return false;
         };
         return true;

+ 7 - 7
web/building_saas/pm/js/pm_import.js

@@ -261,14 +261,14 @@ const importView = (() => {
             feeStandardName: curEngineering.lib.feeName,    //费用标准
             engineering: curEngineering.lib.engineering,    //定额取费专业
             projectEngineering: curEngineering.lib.projectEngineering,  //单位工程取费专业
-            featureLibID: curEngineering.lib.feature_lib[0] ? curEngineering.lib.feature_lib[0].id : '',    //工程特征
+            featureLibID: curEngineering.lib.feature_lib && curEngineering.lib.feature_lib[0] ? curEngineering.lib.feature_lib[0].id : '',    //工程特征
             indexName: curEngineering.lib.indexName,    // 指标名称
-            engineerInfoLibID: curEngineering.lib.engineer_info_lib[0] ? curEngineering.lib.engineer_info_lib[0].id : '',   // 工程信息指标
-            engineerFeatureLibID: curEngineering.lib.engineer_feature_lib[0] ? curEngineering.lib.engineer_feature_lib[0].id : '',  //工程特征指标
-            economicLibID: curEngineering.lib.economic_lib[0] ? curEngineering.lib.economic_lib[0].id : '',    // 主要经济指标
-            mainQuantityLibID: curEngineering.lib.main_quantity_lib[0] ? curEngineering.lib.main_quantity_lib[0].id : '',   // 主要工程量指标
-            materialLibID: curEngineering.lib.material_lib[0] ? curEngineering.lib.material_lib[0].id : '', // 主要工料指标
-            progressiveLibID: curEngineering.lib.progressive_lib[0] ? curEngineering.lib.progressive_lib[0].id: '', // 累进库
+            engineerInfoLibID: curEngineering.lib.engineer_info_lib && curEngineering.lib.engineer_info_lib[0] ? curEngineering.lib.engineer_info_lib[0].id : '',   // 工程信息指标
+            engineerFeatureLibID: curEngineering.lib.engineer_feature_lib && curEngineering.lib.engineer_feature_lib[0] ? curEngineering.lib.engineer_feature_lib[0].id : '',  //工程特征指标
+            economicLibID: curEngineering.lib.economic_lib && curEngineering.lib.economic_lib[0] ? curEngineering.lib.economic_lib[0].id : '',    // 主要经济指标
+            mainQuantityLibID: curEngineering.lib.main_quantity_lib && curEngineering.lib.main_quantity_lib[0] ? curEngineering.lib.main_quantity_lib[0].id : '',   // 主要工程量指标
+            materialLibID: curEngineering.lib.material_lib && curEngineering.lib.material_lib[0] ? curEngineering.lib.material_lib[0].id : '', // 主要工料指标
+            progressiveLibID: curEngineering.lib.progressive_lib && curEngineering.lib.progressive_lib[0] ? curEngineering.lib.progressive_lib[0].id: '', // 累进库
             calcProgram: { name: taxData.program_lib.name, id: taxData.program_lib.id },  //计算程序
             colLibID: taxData.col_lib.id,   //列设置
             templateLibID: taxData.template_lib.id, //清单模板

+ 1 - 1
web/users/html/index.html

@@ -318,7 +318,7 @@
             <div class="container">
                <div class="row">
                   <div class="col-6">
-                     <h3><img src="/web/users/images/laohuicon.png" class="mr-3">加班少一点,胜算多一点</h3>
+                     <h3><img src="/web/users/images/laohuicon.png" class="mr-3">胜算多一点,加班少一点,</h3>
                   </div>
                   <div class="col-6">
                      <div class="footer_menu">