|
@@ -297,6 +297,7 @@ class PayCalculator {
|
|
|
x.org_tp = x.tp || 0;
|
|
|
x.org_start_tp = x.start_tp || 0;
|
|
|
x.org_range_tp = x.range_tp || 0;
|
|
|
+ x.org_end_tp = x.end_tp || 0;
|
|
|
});
|
|
|
this.getCalcBase();
|
|
|
this.getCalcAdd();
|
|
@@ -304,7 +305,8 @@ class PayCalculator {
|
|
|
const calcPays = this.sortPaysByCalc(payTree);
|
|
|
this.calculate(calcPays);
|
|
|
payTree.nodes.forEach(p => {
|
|
|
- p.calcUpdate = !this.ctx.helper.numEqual(p.org_tp, p.tp) || !this.ctx.helper.numEqual(p.org_start_tp, p.start_tp) || !this.ctx.helper.numEqual(p.org_range_tp, p.range_tp);
|
|
|
+ p.calcUpdate = !this.ctx.helper.numEqual(p.org_tp, p.tp) || !this.ctx.helper.numEqual(p.org_end_tp, p.end_tp)
|
|
|
+ || !this.ctx.helper.numEqual(p.org_start_tp, p.start_tp) || !this.ctx.helper.numEqual(p.org_range_tp, p.range_tp) ;
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -493,7 +495,7 @@ class PhasePayDetail extends TreeService {
|
|
|
|
|
|
// 查询应返回的结果
|
|
|
const resultData = {};
|
|
|
- resultData.create = await this.getNextsData(masterId, select.tree_id, children.length);
|
|
|
+ resultData.create = await this.getNextsData(masterId, select.tree_id, children.length + 1);
|
|
|
if (children.length === 0) resultData.update = await this.getDataByKid(masterId, select.tree_id);
|
|
|
return resultData;
|
|
|
}
|