소스 검색

综合单价、综合合价只读控制

MaiXinRong 7 년 전
부모
커밋
90e4302c3f
2개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 1
      web/building_saas/main/js/views/main_tree_col.js
  2. 3 1
      web/building_saas/main/js/views/project_view.js

+ 7 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -38,12 +38,18 @@ let MainTreeCol = {
         billsParent: function (node) {
         billsParent: function (node) {
             return node.sourceType === projectObj.project.Bills.getSourceType() && node.source.children.length > 0;
             return node.sourceType === projectObj.project.Bills.getSourceType() && node.source.children.length > 0;
         },
         },
+        leafBillsWithDetail: function (node) {
+            return (!MainTreeCol.readOnly.billsParent(node)) && (node.children.length > 0);
+        },
         forCalcBase: function (node) {
         forCalcBase: function (node) {
             // to do according to billsParentType
             // to do according to billsParentType
             return MainTreeCol.readOnly.billsParent(node) || MainTreeCol.readOnly.non_bills(node);
             return MainTreeCol.readOnly.billsParent(node) || MainTreeCol.readOnly.non_bills(node);
         },
         },
         forUnitFee: function (node) {
         forUnitFee: function (node) {
-            return MainTreeCol.readOnly.ration(node) || MainTreeCol.readOnly.billsParent(node);
+            return MainTreeCol.readOnly.ration(node) || MainTreeCol.readOnly.billsParent(node) || MainTreeCol.readOnly.leafBillsWithDetail(node);
+        },
+        forTotalFee: function (node) {
+            return MainTreeCol.readOnly.non_bills(node) || MainTreeCol.readOnly.billsParent(node) || (MainTreeCol.readOnly.leafBillsWithDetail(node));
         }
         }
     },
     },
     cellType: {
     cellType: {

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

@@ -112,7 +112,7 @@ var projectObj = {
         }
         }
         if (value) {
         if (value) {
             value = value.toDecimal(colSetting.data.decimal);
             value = value.toDecimal(colSetting.data.decimal);
-        } else {
+        } else if (editingText && editingText !== '') {
             value = null;
             value = null;
             alert('当前输入的数据类型不正确,请重新输入。');
             alert('当前输入的数据类型不正确,请重新输入。');
         }
         }
@@ -176,6 +176,8 @@ var projectObj = {
 
 
             } else if (fieldName === 'quantity' && project.quantity_detail.quantityEditChecking(value,node,fieldName)) {
             } else if (fieldName === 'quantity' && project.quantity_detail.quantityEditChecking(value,node,fieldName)) {
                 projectObj.updateAndReCalculate(node, fieldName, value);
                 projectObj.updateAndReCalculate(node, fieldName, value);
+            } else if (fieldName === 'feesIndex.common.unitFee') {
+                projectObj.updateAndReCalculate(node, fieldName, value);
             } else {
             } else {
                 if (node.sourceType === project.Bills.getSourceType()) {
                 if (node.sourceType === project.Bills.getSourceType()) {
                     project.Bills.updateField(node.source, fieldName, value, true);
                     project.Bills.updateField(node.source, fieldName, value, true);