瀏覽代碼

Merge branch '3.0.4_online'

vian 4 年之前
父節點
當前提交
aeea8429b7
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. 2 2
      web/building_saas/main/js/models/calc_program.js
  2. 5 2
      web/building_saas/main/js/views/main_tree_col.js

+ 2 - 2
web/building_saas/main/js/models/calc_program.js

@@ -1040,7 +1040,7 @@ let calcTools = {
         if (!commonUtil.isNumber(maxPrice)) {
             return false;
         }
-        return totalFee > maxPrice;
+        return totalFee > +maxPrice;
     },
     // 清单价格是否小于最低限价
     unitFeeLTMinPrice: function (node, feeField) {
@@ -1053,7 +1053,7 @@ let calcTools = {
         if (!commonUtil.isNumber(minPrice)) {
             return false;
         }
-        return totalFee < minPrice;
+        return totalFee < +minPrice;
     },
     
     getTenderCalcType: function () {

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

@@ -320,10 +320,13 @@ let MainTreeCol = {
             /* if(+$('#fileKind').val() === _fileKind.tender) {
                 return true;
             } */
-            return projectObj.project.projectInfo.importedByInterface || node.data.outPutMaxPrice === false || node.data.outPutLimitPrice === false;
+            const hasOutPutMaxPriceCol = !!projectObj.project.projSetting.main_tree_col.cols.find(item => item.data.field === 'outPutMaxPrice');
+            const hasOutPutLitmitPriceCol = !!projectObj.project.projSetting.main_tree_col.cols.find(item => item.data.field === 'outPutLitmitPrice');
+            return projectObj.project.projectInfo.importedByInterface || (hasOutPutMaxPriceCol && (node.data.outPutMaxPrice === undefined || node.data.outPutMaxPrice === false)) || (hasOutPutLitmitPriceCol && (node.data.outPutLimitPrice === undefined || node.data.outPutLimitPrice === false));
         },
         minPrice: function (node) {
-            return projectObj.project.projectInfo.importedByInterface || node.data.outPutLimitPrice === false;
+            const hasOutPutLitmitPriceCol = !!projectObj.project.projSetting.main_tree_col.cols.find(item => item.data.field === 'outPutLitmitPrice');
+            return projectObj.project.projectInfo.importedByInterface || (hasOutPutLitmitPriceCol && (node.data.outPutLimitPrice === undefined || node.data.outPutLimitPrice === false));
         },
         // 超高降效
         forOverHeight: function (node) {