|
@@ -335,6 +335,19 @@ module.exports = app => {
|
|
|
// await this.ctx.service.stage.checkStageGatherData(lastStage);
|
|
|
// }
|
|
|
const stage = ctx.stage;
|
|
|
+ if (stage) {
|
|
|
+ await this.ctx.service.stage.checkStageGatherData(stage);
|
|
|
+ stage.tp = this.ctx.helper.sum([stage.contract_tp, stage.qc_tp, stage.pc_tp]);
|
|
|
+ stage.pre_tp = this.ctx.helper.add(stage.pre_contract_tp, stage.pre_qc_tp);
|
|
|
+ stage.end_tp = this.ctx.helper.add(stage.pre_tp, stage.tp);
|
|
|
+ // if (stage.yf_tp && stage.sf_tp === 0) {
|
|
|
+ // const sf = await this.ctx.service.stagePay.getHistorySf(stage);
|
|
|
+ // if (sf && stage.readOnly) {
|
|
|
+ // await this.ctx.service.stage.update({ sf_tp: sf.tp, pre_sf_tp: sf.pre_tp }, { id: stage.id });
|
|
|
+ // }
|
|
|
+ // stage.sf_tp = sf ? sf.tp : 0;
|
|
|
+ // }
|
|
|
+ }
|
|
|
await ctx.service.stage.loadStageAuditViewData(stage);
|
|
|
const renderData = {
|
|
|
moment,
|