|
@@ -1195,7 +1195,9 @@ module.exports = app => {
|
|
|
try {
|
|
|
await this._getStageAuditViewData(ctx);
|
|
|
const renderData = await this._getDefaultRenderData(ctx);
|
|
|
- if (ctx.stage.times !== ctx.stage.curTimes) {
|
|
|
+ if (ctx.stage.status === auditConst.status.checkNo && !ctx.stage.readOnly) {
|
|
|
+ renderData.compareAuditors = ctx.stage.auditHistory[ctx.stage.curTimes - 2];
|
|
|
+ } else if (ctx.stage.times !== ctx.stage.curTimes) {
|
|
|
renderData.compareAuditors = ctx.stage.auditHistory[ctx.stage.curTimes - 1];
|
|
|
} else {
|
|
|
renderData.compareAuditors = ctx.stage.auditors;
|
|
@@ -1224,8 +1226,10 @@ module.exports = app => {
|
|
|
}
|
|
|
for (const order of data.roles) {
|
|
|
const data = { order, bills: [], pos: [] };
|
|
|
- data.bills = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, order);
|
|
|
- data.pos = await ctx.service.stagePos.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, order);
|
|
|
+ const compareTimes = ctx.stage.status === auditConst.status.checkNo && !ctx.stage.readOnly
|
|
|
+ ? ctx.stage.curTimes - 1 : ctx.stage.curTimes;
|
|
|
+ data.bills = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, compareTimes, order);
|
|
|
+ data.pos = await ctx.service.stagePos.getAuditorStageData(ctx.tender.id, ctx.stage.id, compareTimes, order);
|
|
|
result.roles.push(data);
|
|
|
}
|
|
|
ctx.body = { err: 0, msg: '', data: result };
|