Selaa lähdekoodia

刷新项目表

TonyKang 4 vuotta sitten
vanhempi
commit
d62aa51e94

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

@@ -2841,7 +2841,12 @@ $('#property_ok').click(function () {
 
     if (diffBillsPriceFeatureDatas.length > 0) {
         //刷新指标基价
-        chkAndResetBills();
+        if (billsGuidance.bills.tree) {
+            chkAndResetBills(billsGuidance.bills.workBook.getActiveSheet());
+            billsGuidance.bills.workBook.refresh();
+        } else {
+            chkAndResetBills(null);
+        }
     }
 });
 

+ 15 - 1
web/building_saas/main/js/views/std_bills_unit_price_feature.js

@@ -40,7 +40,7 @@ function chkAndSetBillsUnitPrice(billsNodes) {
     }
 }
 
-function chkAndResetBills() {
+function chkAndResetBills(adHocSheet) {
     //用户调整了工程特征后调用
     for (let key in projectObj.project.mainTree.nodes) {
         const node = projectObj.project.mainTree.nodes[key];
@@ -60,6 +60,20 @@ function chkAndResetBills() {
                     break;
                 }
             }
+            if (adHocSheet) {
+                let rCount = adHocSheet.getRowCount();
+                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(node.data.code, cell1.value()) && _chkIfEquals(node.data.name, cell2.value()) && _chkIfEquals(node.data.unit, cell3.value())) {
+                        let cell4 = adHocSheet.getCell(idx, 4);
+                        unitFeeVal = unitFeeVal.toFixed(2);
+                        if (unitFeeVal === '0.00') unitFeeVal = '';
+                        cell4.value(unitFeeVal);
+                    }
+                }
+            }
         }
     }
     // 调整了后需要重新计算