|
@@ -265,7 +265,14 @@ class updateReviseGclTree extends loadGclBaseTree {
|
|
|
if (this.items.length > 0) result.update.push({id: this.parent.id, ledger_id: this.parent.ledger_id, is_leaf: 0});
|
|
|
} else {
|
|
|
for (const bn of this.baseNodes) {
|
|
|
- if (bn.children && bn.children.length > 0) continue;
|
|
|
+ if (bn.children && bn.children.length > 0) {
|
|
|
+ if (bn.order !== bn.org_order) {
|
|
|
+ result.update.push({
|
|
|
+ id: bn.id, ledger_id: bn.ledger_id, order: bn.order,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
if (bn.deal_qty < bn.org_deal_qty || bn.sjcl_qty < bn.org_sjcl_qty || bn.qtcl_qty < bn.org_qtcl_qty || bn.sgfh_qty < bn.org_sgfh_qty) {
|
|
|
result.errors.push({
|
|
@@ -285,7 +292,7 @@ class updateReviseGclTree extends loadGclBaseTree {
|
|
|
sgfh_qty: bn.sgfh_qty, sjcl_qty: bn.sjcl_qty, qtcl_qty: bn.qtcl_qty, quantity: bn.quantity,
|
|
|
sgfh_tp: bn.sgfh_tp || 0, sjcl_tp: bn.sjcl_tp || 0, qtcl_tp: bn.qtcl_tp || 0, total_price: bn.total_price || 0,
|
|
|
});
|
|
|
- } else if (bn.order != bn.org_order) {
|
|
|
+ } else if (bn.order !== bn.org_order) {
|
|
|
result.update.push({
|
|
|
id: bn.id, ledger_id: bn.ledger_id, order: bn.order,
|
|
|
});
|