|
@@ -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;
|
|
|
}
|
|
|
}
|