Browse Source

update obj before refresh

zhongzewei 7 years ago
parent
commit
68742db1b4
1 changed files with 6 additions and 5 deletions
  1. 6 5
      web/building_saas/main/js/views/project_view.js

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

@@ -752,12 +752,14 @@ $('#property_ok').click(function () {
     //清单工程量精度
     let newBillsDecimalDatas = billsDecimalView.toBillsDecimalDatas(billsDecimalView.cache);
     if(billsDecimalView.toUpdate(billsQuanDecimal.datas, newBillsDecimalDatas)){
+        billsQuanDecimal.datas = newBillsDecimalDatas;
         reCalcBills = true;
         properties['property.billsQuantityDecimal'] = newBillsDecimalDatas;
     }
     //小数位数
     let updateDecimal = m_getDecimalData($('input', '#poj-settings-decimal'));
     if(toUpdateDecimal(decimalObj, updateDecimal)){
+        setDecimal(decimalObj, updateDecimal);
         reCalcRations = true;
         reCalcBills = true;
         properties['property.decimal'] = updateDecimal;
@@ -776,7 +778,6 @@ $('#property_ok').click(function () {
         reCalcRations = true;
         reCalcBills = true;
     };
-    console.log(properties);
     // 重新计算树节点
     let changedNodes = [];
     if (reCalcRations)    // 定额动,全部计算。
@@ -813,13 +814,13 @@ $('#property_ok').click(function () {
             mixDatas.labourCoes.updateData || mixDatas.rations.length > 0 || mixDatas.bills.length > 0;
     }
 
-    if(hasMixData()){
+/*    if(hasMixData()){
         CommonAjax.post('/pm/api/updateMixDatas', {user_id: userID, mixDataArr: mixDatas}, function (rstData) {
-/*            if (changedNodes.length > 0) {
+/!*            if (changedNodes.length > 0) {
                 for (let node of changedNodes){delete node.changed};
             };
-            if (mixDatas.labourCoes.updateData) labourCoeView.refresh();*/
+            if (mixDatas.labourCoes.updateData) labourCoeView.refresh();*!/
             window.location.href = '/main?project=' + projectID;
         });
-    }
+    }*/
 });