|
|
@@ -1113,19 +1113,20 @@ module.exports = app => {
|
|
|
await ctx.service.tenderInfo.saveTenderInfo(ctx.tender.id, { shenpi: postData });
|
|
|
let auditList = [];
|
|
|
let groupList = [];
|
|
|
+ const spType = shenpiConst.sp_type[data.code]|| shenpiConst.cost_sp_type[data.code];
|
|
|
if (data.status === shenpiConst.sp_status.gdspl) {
|
|
|
- groupList = await ctx.service.shenpiGroup.getGroupList(ctx.tender.id, shenpiConst.sp_type[data.code]) || [];
|
|
|
+ groupList = await ctx.service.shenpiGroup.getGroupList(ctx.tender.id, spType) || [];
|
|
|
if (groupList && groupList.length > 0) {
|
|
|
for (const group of groupList) {
|
|
|
if (group.change_type) group.change_type = JSON.parse(group.change_type);
|
|
|
- group.auditGroupList = await ctx.service.shenpiAudit.getAuditGroupList(ctx.tender.id, shenpiConst.sp_type[data.code], data.status, group.id);
|
|
|
+ group.auditGroupList = await ctx.service.shenpiAudit.getAuditGroupList(ctx.tender.id, spType, data.status, group.id);
|
|
|
if (group.is_select) auditList = group.auditGroupList;
|
|
|
}
|
|
|
} else {
|
|
|
- auditList = await ctx.service.shenpiAudit.getAuditGroupList(ctx.tender.id, shenpiConst.sp_type[data.code], data.status);
|
|
|
+ auditList = await ctx.service.shenpiAudit.getAuditGroupList(ctx.tender.id, spType, data.status);
|
|
|
}
|
|
|
} else if (data.status === shenpiConst.sp_status.gdzs) {
|
|
|
- auditList = await ctx.service.shenpiAudit.getAudit(ctx.tender.id, shenpiConst.sp_type[data.code], data.status);
|
|
|
+ auditList = await ctx.service.shenpiAudit.getAudit(ctx.tender.id, spType, data.status);
|
|
|
}
|
|
|
ctx.body = { err: 0, msg: '', data: { auditList, groupList } };
|
|
|
} catch (err) {
|