浏览代码

金额概况计算结果调整

MaiXinRong 5 年之前
父节点
当前提交
bb912ad70a
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      app/service/stage.js

+ 10 - 0
app/service/stage.js

@@ -221,6 +221,16 @@ module.exports = app => {
                     const tp = await this.ctx.service.stagePay.getSpecialTotalPrice(stage);
                     stage.yf_tp = tp.yf;
                     stage.sf_tp = tp.sf;
+                } else if (stage.tp_history) {
+                    const his = this.ctx.helper._.find(stage.tp_history, {times: stage.curTimes, order: stage.curOrder});
+                    if (his) {
+                        stage.contract_tp = his.contract_tp;
+                        stage.qc_tp = his.qc_tp;
+                        stage.yf_tp = his.yf_tp;
+                        stage.sf_tp = his.sf_tp;
+                        stage.tp = this.ctx.helper.add(stage.contract_tp, stage.qc_tp);
+                        stage.end_tp = this.ctx.helper.add(stage.pre_tp, stage.tp);
+                    }
                 }
             }
         }