Browse Source

台账修订,修改表达式刷新问题

MaiXinRong 5 years atrás
parent
commit
21af84975a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app/public/js/revise.js

+ 4 - 3
app/public/js/revise.js

@@ -593,7 +593,7 @@ $(document).ready(() => {
             postData(window.location.pathname + '/update', {postType: 'update', postData: data}, function (result) {
                 const refreshNode = billsTree.loadPostData(result);
                 expr.val(select[field]);
-                billsTreeSpreadObj.refreshTree(info.sheet, refreshNode);
+                billsTreeSpreadObj.refreshTree(billsSheet, refreshNode);
             });
         });
 
@@ -996,6 +996,7 @@ $(document).ready(() => {
 
             const expr = $(this);
             const select = SpreadJsObj.getSelectObject(posSheet);
+            const row = posSheet.getSelections()[0].row;
             const field = expr.attr('field'), orgValue = expr.attr('org'), newValue = trimInvalidChar(expr.val());
             if (orgValue === newValue || (!orgValue && newValue == '')) { return; }
 
@@ -1013,11 +1014,11 @@ $(document).ready(() => {
             }
 
             // 更新至服务器
-            postData(window.location.pathname + '/update', {posPostType: 'update', posData: data}, function (result) {
+            postData(window.location.pathname + '/update', {postType: 'pos', posPostType: 'update', postData: data}, function (result) {
                 const updateRst = pos.updateDatas(result.pos);
                 expr.val(select[field]);
                 // 刷新当前行, 不适用于新增(在非下一空白行新增)
-                SpreadJsObj.reLoadRowData(info.sheet, _.toNumber(row));
+                SpreadJsObj.reLoadRowData(posSheet, row);
                 const loadResult = billsTree.loadPostData(result.ledger);
                 billsTreeSpreadObj.refreshTree(billsSheet, loadResult);
                 billsTreeSpreadObj.refreshOperationValid(billsSheet);