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

Merge branch '3.0.4_online'

vian 5 роки тому
батько
коміт
0fd63d9a73

+ 2 - 2
public/web/sheet/sheet_common.js

@@ -407,9 +407,9 @@ var sheetCommonObj = {
         return c
     },
     // 无法勾选的复选框
-    getReadOnlyCheckBox () {
+    getReadOnlyCheckBox (threeState = false) {
         function ReadOnlyCheckBox() {}
-        ReadOnlyCheckBox.prototype = this.getCheckBox(true);
+        ReadOnlyCheckBox.prototype = this.getCheckBox(threeState);
         ReadOnlyCheckBox.prototype.processMouseUp = function () {
             return;
         };

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

@@ -1054,7 +1054,7 @@
      const totalFee = this.getFee(node, feeField);
      const maxPrice = node.data.maxPrice;
      // 最高限价有值才对比
-     if (!commonUtil.isDef(maxPrice)) {
+     if (!commonUtil.isNumber(maxPrice)) {
        return false;
      }
      return totalFee > maxPrice;
@@ -1067,7 +1067,7 @@
      const totalFee = this.getFee(node, feeField);
      const minPrice = node.data.minPrice;
      // 最低限价有值才对比
-     if (!commonUtil.isDef(minPrice)) {
+     if (!commonUtil.isNumber(minPrice)) {
        return false;
      }
      return totalFee < minPrice;

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

@@ -415,14 +415,14 @@ let MainTreeCol = {
       if (node.sourceType === projectObj.project.Bills.getSourceType()) {
         return projectObj.project.projectInfo.importedByInterface  || projectObj.project.projectInfo.property.lockBills
           ? sheetCommonObj.getReadOnlyCheckBox()
-          : sheetCommonObj.getCheckBox(true);
+          : sheetCommonObj.getCheckBox();
       }
     },
     outPutLimitPrice: function (node) {
       if (node.sourceType === projectObj.project.Bills.getSourceType()) {
         return projectObj.project.projectInfo.importedByInterface || projectObj.project.projectInfo.property.lockBills
           ? sheetCommonObj.getReadOnlyCheckBox()
-          : sheetCommonObj.getCheckBox(true);
+          : sheetCommonObj.getCheckBox();
       }
     },
     /* maxPrice: function (node, setting) {

+ 10 - 0
web/building_saas/main/js/views/project_view.js

@@ -530,6 +530,16 @@ var projectObj = {
                 gljOprObj.showRationGLJSheetData();
             }
             else {//不涉及计算的,只改updateData的值就好了
+                if (node.sourceType === project.Bills.getSourceType()) {
+                    if(fieldName === "maxPrice" || fieldName === 'minPrice'){
+                        if(value == null){
+                            value = "";
+                        }else {
+                            value = scMathUtil.roundToString(value,getDecimal("unitPrice", node))
+                        }
+                    }
+                    project.Bills.updateField(node.source, fieldName, value, false);
+                }
                 node.updateData[fieldName] = value;
                 node.changed = true;
                 if (colSetting.data.wordWrap) {