|
@@ -150,7 +150,8 @@ module.exports = app => {
|
|
}
|
|
}
|
|
// 获取审批流程中左边列表
|
|
// 获取审批流程中左边列表
|
|
ctx.stage.auditors2 = await ctx.service.stageAudit.getAuditGroupByListWithOwner(ctx.stage.id, times);
|
|
ctx.stage.auditors2 = await ctx.service.stageAudit.getAuditGroupByListWithOwner(ctx.stage.id, times);
|
|
- if (ctx.stage.status === auditConst.status.uncheck || ctx.stage.status === auditConst.status.checkNo) {
|
|
|
|
|
|
+ const { status } = ctx.stage;
|
|
|
|
+ if (status === auditConst.status.uncheck || status === auditConst.status.checkNo) {
|
|
ctx.stage.auditorList = await ctx.service.stageAudit.getAuditors(ctx.stage.id, ctx.stage.times);
|
|
ctx.stage.auditorList = await ctx.service.stageAudit.getAuditors(ctx.stage.id, ctx.stage.times);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1016,11 +1017,13 @@ module.exports = app => {
|
|
}
|
|
}
|
|
|
|
|
|
await ctx.service.stageAudit.start(ctx.stage.id, ctx.stage.times);
|
|
await ctx.service.stageAudit.start(ctx.stage.id, ctx.stage.times);
|
|
- const auditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, ctx.stage.times);
|
|
|
|
- ctx.body = { err: 0, msg: '', data: [] };
|
|
|
|
|
|
+ // const auditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, ctx.stage.times);
|
|
|
|
+ // ctx.body = { err: 0, msg: '', data: [] };
|
|
|
|
+ ctx.redirect(ctx.request.header.referer);
|
|
} catch (err) {
|
|
} catch (err) {
|
|
this.log(err);
|
|
this.log(err);
|
|
- ctx.body = this.ajaxErrorBody(err, '上报失败');
|
|
|
|
|
|
+ ctx.redirect(ctx.request.header.referer);
|
|
|
|
+ // ctx.body = this.ajaxErrorBody(err, '上报失败');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -1037,7 +1040,7 @@ module.exports = app => {
|
|
if (!this.ctx.stage.curAuditor || this.ctx.stage.curAuditor.aid !== ctx.session.sessionUser.accountId) {
|
|
if (!this.ctx.stage.curAuditor || this.ctx.stage.curAuditor.aid !== ctx.session.sessionUser.accountId) {
|
|
throw '您无权进行该操作';
|
|
throw '您无权进行该操作';
|
|
}
|
|
}
|
|
- const data = JSON.parse(ctx.request.body.data);
|
|
|
|
|
|
+ const data = ctx.request.body;
|
|
data.checkType = parseInt(data.checkType);
|
|
data.checkType = parseInt(data.checkType);
|
|
// const data = {
|
|
// const data = {
|
|
// checkType: parseInt(ctx.request.body.checkType),
|
|
// checkType: parseInt(ctx.request.body.checkType),
|
|
@@ -1053,20 +1056,20 @@ module.exports = app => {
|
|
}
|
|
}
|
|
|
|
|
|
await ctx.service.stageAudit.check(ctx.stage.id, data, ctx.stage.times);
|
|
await ctx.service.stageAudit.check(ctx.stage.id, data, ctx.stage.times);
|
|
- const stageOrder = parseInt(ctx.params.order);
|
|
|
|
- const stage = await ctx.service.stage.getDataByCondition({
|
|
|
|
- tid: ctx.tender.id,
|
|
|
|
- order: stageOrder,
|
|
|
|
- });
|
|
|
|
- const auditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, ctx.stage.times);
|
|
|
|
- ctx.body = { err: 0, msg: '', data: [] };
|
|
|
|
- // ctx.redirect(ctx.request.header.referer);
|
|
|
|
|
|
+ // const stageOrder = parseInt(ctx.params.order);
|
|
|
|
+ // const stage = await ctx.service.stage.getDataByCondition({
|
|
|
|
+ // tid: ctx.tender.id,
|
|
|
|
+ // order: stageOrder,
|
|
|
|
+ // });
|
|
|
|
+ // const auditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, ctx.stage.times);
|
|
|
|
+ // ctx.body = { err: 0, msg: '', data: [] };
|
|
|
|
+ ctx.redirect(ctx.request.header.referer);
|
|
} catch (err) {
|
|
} catch (err) {
|
|
// console.log(err);
|
|
// console.log(err);
|
|
this.log(err);
|
|
this.log(err);
|
|
- ctx.body = this.ajaxErrorBody(err, '提交失败');
|
|
|
|
|
|
+ // ctx.body = this.ajaxErrorBody(err, '提交失败');
|
|
// ctx.session.postError = err.toString();
|
|
// ctx.session.postError = err.toString();
|
|
- // ctx.redirect(ctx.request.header.referer);
|
|
|
|
|
|
+ ctx.redirect(ctx.request.header.referer);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
/**
|