|
@@ -943,6 +943,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
async _commonGetAudit(ctx, params, stgAudit) {
|
|
|
+ const COMMON_INVALID_STATUS_FOR_ORG = [1, 6]; // 对原报来说,待上报、重新上报状态就不能默认为审核通过
|
|
|
switch (params.stage_id) {
|
|
|
case -300: // 变更令
|
|
|
const changeAudit = await ctx.service.changeAudit.getAuditors(params.change_id, params.change_times, 'asc', true);
|
|
@@ -988,7 +989,8 @@ module.exports = app => {
|
|
|
const advanceList = await ctx.service.advance.getAdvanceListDirectly(params.tender_id);
|
|
|
for (const advance of advanceList) {
|
|
|
if (advance.id === params.advance_id) {
|
|
|
- stgAudit.push({ aid: advance.uid, status: 3, opinion: '同意', end_time: advance.end_time || (new Date()), order: 0 }); // 加上原报,默认status为3
|
|
|
+ stgAudit.push({ aid: advance.uid, status: 3, opinion: '同意', end_time: advance.create_time || (new Date()), order: 0 }); // 加上原报,默认status为3
|
|
|
+ if (COMMON_INVALID_STATUS_FOR_ORG.includes(advance.status)) stgAudit[0].status = advance.status;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -1005,6 +1007,8 @@ module.exports = app => {
|
|
|
for (const material of materialList) {
|
|
|
if (material.id === params.material_id) {
|
|
|
stgAudit.push({ aid: material.user_id, status: 3, opinion: '同意', end_time: material.in_time, order: 0 }); // 加上原报,默认status为3
|
|
|
+ if (COMMON_INVALID_STATUS_FOR_ORG.includes(material.status)) stgAudit[0].status = material.status;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
const materialAdjAuditList = await ctx.service.materialAudit.getAuditorsByTender(params.tender_id);
|