|
@@ -31,13 +31,12 @@ module.exports = app => {
|
|
const phasePays = await this.ctx.service.phasePay.getAllPhasePay(ctx.tender.id, 'DESC');
|
|
const phasePays = await this.ctx.service.phasePay.getAllPhasePay(ctx.tender.id, 'DESC');
|
|
const relaStage = [];
|
|
const relaStage = [];
|
|
for (const p of phasePays) {
|
|
for (const p of phasePays) {
|
|
- // todo 加载当前审批人
|
|
|
|
if (p.audit_status !== audit.common.status.checked) await this.ctx.service.phasePay.loadUser(p);
|
|
if (p.audit_status !== audit.common.status.checked) await this.ctx.service.phasePay.loadUser(p);
|
|
relaStage.push(...p.rela_stage);
|
|
relaStage.push(...p.rela_stage);
|
|
}
|
|
}
|
|
const stages = await this.ctx.service.stage.getAllDataByCondition({ where: { tid: ctx.tender.id }, orders: [['order', 'AEC']] });
|
|
const stages = await this.ctx.service.stage.getAllDataByCondition({ where: { tid: ctx.tender.id }, orders: [['order', 'AEC']] });
|
|
const validStages = stages.filter(s => {
|
|
const validStages = stages.filter(s => {
|
|
- return !relaStage.find(r => { return s.id === r.id; });
|
|
|
|
|
|
+ return !relaStage.find(r => { return s.id === r.stage_id; });
|
|
});
|
|
});
|
|
this.ctx.service.phasePay.calculatePhasePay(phasePays);
|
|
this.ctx.service.phasePay.calculatePhasePay(phasePays);
|
|
const renderData = {
|
|
const renderData = {
|