Browse Source

新增项目节,光标刷新问题

MaiXinRong 3 năm trước cách đây
mục cha
commit
9012a64634
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      app/public/js/ledger.js

+ 4 - 1
app/public/js/ledger.js

@@ -2294,7 +2294,10 @@ $(document).ready(function() {
             treeOperationObj.refreshTree(mainSheet, refreshNode);
             if (refreshNode.create && refreshNode.create.length > 0) {
                 mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
-                SpreadJsObj.reloadRowsBackColor(mainSheet, [sel.row, refreshNode.create[refreshNode.create.length - 1].index]);
+                const refreshRow = [sel.row, refreshNode.create[refreshNode.create.length - 1].index];
+                const curIndex = mainTree.nodes.indexOf(mainNode);
+                if (sel.row !== curIndex && curIndex >= 0) refreshRow.push(curIndex);
+                SpreadJsObj.reloadRowsBackColor(mainSheet, refreshRow);
             } else {
                 const node = _.find(ledgerTree.nodes, {code: stdNode.code, name: stdNode.name});
                 if (node) {