Browse Source

台账修订,附件定位问题

MaiXinRong 11 months ago
parent
commit
573793a50b
2 changed files with 9 additions and 3 deletions
  1. 5 2
      app/public/js/revise.js
  2. 4 1
      app/public/js/revise_history.js

+ 5 - 2
app/public/js/revise.js

@@ -2138,7 +2138,7 @@ $(document).ready(() => {
         billsTree.loadDatas(result.bills);
         treeCalc.calculateAll(billsTree);
         for (const t of result.tags) {
-            t.node = billsTree.datas.find(x => {return x.id === t.lid});
+            t.node = billsTree.nodes.find(x => {return x.id === t.lid});
         }
         billsTag.loadDatas(result.tags);
         SpreadJsObj.loadSheetData(billsSheet, SpreadJsObj.DataType.Tree, billsTree);
@@ -2150,6 +2150,9 @@ $(document).ready(() => {
         posSpreadObj.loadCurPosData();
         SpreadJsObj.resetTopAndSelect(posSheet);
 
+        for (const r of result.att) {
+            r.node = billsTree.datas.find(x => {return x.id === r.lid});
+        }
         reviseAtt = $.ledger_att({
             selector: '#fujian',
             key: 'id',
@@ -2161,7 +2164,7 @@ $(document).ready(() => {
             readOnly: false, // todo fileUploadPermission,
             locate: function (att) {
                 if (!att) return;
-                SpreadJsObj.locateTreeNode(billsSheet, att.node.tree_id, true);
+                SpreadJsObj.locateTreeNode(billsSheet, att.node.ledger_id, true);
                 billsTreeSpreadObj.loadRelaAtt();
                 posSpreadObj.loadCurPosData();
             }

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

@@ -170,6 +170,9 @@ $(document).ready(() => {
         posSpreadObj.loadCurPosData();
         SpreadJsObj.resetTopAndSelect(posSheet);
 
+        for (const r of result.att) {
+            r.node = billsTree.datas.find(x => {return x.id === r.lid});
+        }
         reviseAtt = $.ledger_att({
             selector: '#fujian',
             key: 'id',
@@ -181,7 +184,7 @@ $(document).ready(() => {
             readOnly: true, // todo fileUploadPermission,
             locate: function (att) {
                 if (!att) return;
-                SpreadJsObj.locateTreeNode(billsSheet, att.node.tree_id, true);
+                SpreadJsObj.locateTreeNode(billsSheet, att.node.ledger_id, true);
                 billsTreeSpreadObj.loadRelaAtt();
                 posSpreadObj.loadCurPosData();
             }