|
@@ -261,6 +261,13 @@ module.exports = app => {
|
|
|
if (await this._checkRelaStageConflict(relaStage, data)) throw '选择的计量期,已被调用,请刷新页面后选择计量期新增合同支付';
|
|
|
|
|
|
const prePhase = maxOrder > 0 ? await this.getPhasePayByOrder(tid, maxOrder) : null;
|
|
|
+ if (prePhase) {
|
|
|
+ data.end_calc_tp = this.ctx.helper.add(prePhase.calc_tp, prePhase.pre_calc_tp);
|
|
|
+ data.end_pay_tp = this.ctx.helper.add(prePhase.pay_tp, prePhase.pre_pay_tp);
|
|
|
+ data.end_cut_tp = this.ctx.helper.add(prePhase.cut_tp, prePhase.pre_cut_tp);
|
|
|
+ data.end_sf_tp = this.ctx.helper.add(prePhase.sf_tp, prePhase.pre_sf_tp);
|
|
|
+ data.end_yf_tp = this.ctx.helper.add(prePhase.yf_tp, prePhase.pre_yf_tp);
|
|
|
+ }
|
|
|
const calcBase = await this.getCalcBase(relaStage, prePhase);
|
|
|
data.calc_base = JSON.stringify(calcBase);
|
|
|
const transaction = await this.db.beginTransaction();
|