Преглед изворни кода

计量台账,变更令--变更清单,定位至台账,兼容空白清单关联id为'0'的情况

MaiXinRong пре 4 година
родитељ
комит
5517a2732c
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      app/public/js/stage.js

+ 4 - 2
app/public/js/stage.js

@@ -3057,20 +3057,22 @@ $(document).ready(() => {
                                 unit: changeBills.unit || '',
                                 unit_price: changeBills.unit_price || 0,
                             };
-                            if (changeBills.lid) {
+                            if (changeBills.lid && changeBills.lid !== '0') {
                                 const node = stageTree.nodes.find(x => {return x.id === changeBills.lid});
                                 const posterity = stageTree.getPosterity(node) || [];
                                 posterity.unshift(node);
                                 for (const p of posterity) {
                                     if (checkBillsMatch(p, cb, changeBills.detail)) {
                                         SpreadJsObj.locateTreeNode(slSpread.getActiveSheet(), p.ledger_id);
+                                        stagePosSpreadObj.loadCurPosData();
                                         return;
                                     }
                                 }
                             } else {
                                 for (const node of stageTree.nodes) {
                                     if (checkBillsMatch(node, cb, changeBills.detail)) {
-                                        SpreadJsObj.locateTreeNode(slSpread.getActiveSheet(), p.ledger_id);
+                                        SpreadJsObj.locateTreeNode(slSpread.getActiveSheet(), node.ledger_id);
+                                        stagePosSpreadObj.loadCurPosData();
                                         return;
                                     }
                                 }