|
@@ -408,6 +408,23 @@ module.exports = app => {
|
|
|
tender.cur_ratio = ctx.helper.mul(ctx.helper.div(tender.gather_tp, tender.sum, 2), 100);
|
|
|
tender.other_tp = ctx.helper.sub(ctx.helper.sub(tender.sum, tender.pre_gather_tp), tender.gather_tp);
|
|
|
tender.other_ratio = Math.max(0, 100 - tender.pre_ratio - tender.cur_ratio);
|
|
|
+ if (lastStage.status === auditConst.stage.status.uncheck) {
|
|
|
+ const status_name = await this.ctx.service.projectAccount.getAccountInfoById(lastStage.user_id);
|
|
|
+ lastStage.status_users = status_name ? status_name.name : '';
|
|
|
+ lastStage.auditors = [];
|
|
|
+ } else {
|
|
|
+ const status_name = await this.ctx.service.stageAudit.getAuditorByStatus(lastStage.id, lastStage.status, lastStage.times);
|
|
|
+ lastStage.status_users = status_name ? status_name.name : '';
|
|
|
+ const times = lastStage.status === auditConst.stage.status.checkNo ? lastStage.times - 1 : lastStage.times;
|
|
|
+ lastStage.auditors = await ctx.service.stageAudit.getAuditors(lastStage.id, times);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (tender.ledger_status !== auditConst.ledger.status.uncheck) {
|
|
|
+ const status_name = await this.ctx.service.ledgerAudit.getStatusName(tender.id, tender.ledger_times);
|
|
|
+ tender.status_users = status_name ? status_name.name : '';
|
|
|
+ const times = tender.status === auditConst.ledger.status.checkNo ? tender.times - 1 : tender.times;
|
|
|
+ tender.auditors = await ctx.service.ledgerAudit.getAuditors(tender.id, times);
|
|
|
+ }
|
|
|
}
|
|
|
const monthProgress = [];
|
|
|
for (const s of stages) {
|
|
@@ -460,7 +477,7 @@ module.exports = app => {
|
|
|
materialData = materials[0];
|
|
|
materialData.curAuditor = await ctx.service.materialAudit.getAuditorByStatus(materialData.id, materialData.status, materialData.times);
|
|
|
const times = materialData.status === auditConst.material.status.checkNo ? materialData.times - 1 : materialData.times;
|
|
|
- materialData.auditors = await ctx.service.materialAudit.getAuditors(materialData.id, times);
|
|
|
+ materialData.auditors = materialData.status === auditConst.material.status.uncheck ? [] : await ctx.service.materialAudit.getAuditors(materialData.id, times);
|
|
|
}
|
|
|
// 修订完成数目
|
|
|
const reviseNum = await ctx.service.ledgerRevise.count({ tid: tender.id, status: auditConst.revise.status.checked });
|