|
@@ -767,12 +767,12 @@ module.exports = app => {
|
|
where: { tid: tenderId },
|
|
where: { tid: tenderId },
|
|
orders: [['order', 'desc']],
|
|
orders: [['order', 'desc']],
|
|
});
|
|
});
|
|
- if (stages.length === 0) return stages;
|
|
|
|
if (stages.length > 0 && stages[0].status === auditConst.status.uncheck) {
|
|
if (stages.length > 0 && stages[0].status === auditConst.status.uncheck) {
|
|
stages.splice(0, 1);
|
|
stages.splice(0, 1);
|
|
}
|
|
}
|
|
// 最新一期计量(未审批完成),取上一个人的期详细数据,应实时计算
|
|
// 最新一期计量(未审批完成),取上一个人的期详细数据,应实时计算
|
|
const stage = stages[0];
|
|
const stage = stages[0];
|
|
|
|
+ if (stages.length === 0) return stages;
|
|
await this.checkStageGatherDataByDataCollect(stage);
|
|
await this.checkStageGatherDataByDataCollect(stage);
|
|
for (const s of stages) {
|
|
for (const s of stages) {
|
|
s.tp = this.ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]);
|
|
s.tp = this.ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]);
|