|
@@ -928,7 +928,7 @@ module.exports = app => {
|
|
|
stgAuditForOrg = null,
|
|
|
stageFlow = null,
|
|
|
stageList = [];
|
|
|
- if (![-100, -200, -300, -301, -302, -303].includes(params.stage_id)) {
|
|
|
+ if (params.stage_id > 0) {
|
|
|
stgAudit = await ctx.service.stageAudit.getStageAudit(params.stage_id, params.stage_times);
|
|
|
stgAuditForOrg = await ctx.service.stageAudit.getStageAudit(params.stage_id, 1);
|
|
|
stageList = await ctx.service.stage.getValidStagesShort(params.tender_id);
|
|
@@ -950,24 +950,32 @@ module.exports = app => {
|
|
|
switch (params.stage_id) {
|
|
|
case -300: // 变更令
|
|
|
const changeAudit = await ctx.service.changeAudit.getAuditors(params.change_id, params.change_times, true);
|
|
|
+ const change = await ctx.service.change.getChangeByCid(params.change_id);
|
|
|
+ stgAudit.push({ aid: change.uid, status: 3, opinion: '', end_time: change.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.uid, status: audit.status, opinion: audit.sdesc, end_time: audit.sin_time, order: audit.usite });
|
|
|
});
|
|
|
break;
|
|
|
case -301: // 变更方案
|
|
|
const changePlanAudit = await ctx.service.changePlanAudit.getAuditors(params.business_id, params.change_plan_times, true);
|
|
|
+ const change_plan = await ctx.service.changePlan.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_plan.uid, status: change_plan.status, opinion: '', end_time: change_plan.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changePlanAudit.forEach(audit => {
|
|
|
- stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
+ stgAudit.push({ aid: audit.aid, status: 3, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|
|
|
break;
|
|
|
case -302: // 变更立项
|
|
|
const changeProjectAudit = await ctx.service.changeProjectAudit.getAuditors(params.business_id, params.change_project_times, true);
|
|
|
+ const change_project = await ctx.service.changeProject.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_project.uid, status: 3, opinion: '', end_time: change_project.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeProjectAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|
|
|
break;
|
|
|
case -303: // 变更申请
|
|
|
const changeApplyAudit = await ctx.service.changeApplyAudit.getAuditors(params.business_id, params.change_apply_times, true);
|
|
|
+ const change_apply = await ctx.service.changeApply.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_apply.uid, status: 3, opinion: '', end_time: change_apply.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeApplyAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|
|
@@ -1099,24 +1107,32 @@ module.exports = app => {
|
|
|
switch (params.stage_id) {
|
|
|
case -300:
|
|
|
const changeAudit = await ctx.service.changeAudit.getAuditors(params.change_id, params.change_times, true);
|
|
|
+ const change = await ctx.service.change.getChangeByCid(params.change_id);
|
|
|
+ stgAudit.push({ aid: change.uid, status: 3, opinion: '', end_time: change.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.uid, status: audit.status, opinion: audit.sdesc, end_time: audit.sin_time, order: audit.usite });
|
|
|
});
|
|
|
break;
|
|
|
case -301: // 变更方案
|
|
|
const changePlanAudit = await ctx.service.changePlanAudit.getAuditors(params.business_id, params.change_plan_times, true);
|
|
|
+ const change_plan = await ctx.service.changePlan.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_plan.uid, status: 3, opinion: '', end_time: change_plan.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changePlanAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|
|
|
break;
|
|
|
case -302: // 变更立项
|
|
|
const changeProjectAudit = await ctx.service.changeProjectAudit.getAuditors(params.business_id, params.change_project_times, true);
|
|
|
+ const change_project = await ctx.service.changeProject.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_project.uid, status: 3, opinion: '', end_time: change_project.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeProjectAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|
|
|
break;
|
|
|
case -303: // 变更申请
|
|
|
const changeApplyAudit = await ctx.service.changeApplyAudit.getAuditors(params.business_id, params.change_apply_times, true);
|
|
|
+ const change_apply = await ctx.service.changeApply.getDataById(params.business_id);
|
|
|
+ stgAudit.push({ aid: change_apply.uid, status: 3, opinion: '', end_time: change_apply.in_time, order: 0 }); // 加上原报,且默认status = 3
|
|
|
changeApplyAudit.forEach(audit => {
|
|
|
stgAudit.push({ aid: audit.aid, status: audit.status, opinion: audit.opinion, end_time: audit.end_time, times: audit.times, order: audit.order });
|
|
|
});
|