|
@@ -1306,10 +1306,10 @@ module.exports = app => {
|
|
|
*/
|
|
|
async checkAudit(ctx) {
|
|
|
try {
|
|
|
- if (!this.ctx.material || this.ctx.material.status !== auditConst.status.checking) {
|
|
|
+ if (!ctx.material || (ctx.material.status !== auditConst.status.checking || ctx.stage.status !== auditConst.status.checkNoPre)) {
|
|
|
throw '当前材料调差期数据有误';
|
|
|
}
|
|
|
- if (!this.ctx.material.curAuditor || this.ctx.material.curAuditor.aid !== ctx.session.sessionUser.accountId) {
|
|
|
+ if (ctx.material.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) < 0) {
|
|
|
throw '您无权进行该操作';
|
|
|
}
|
|
|
const data = {
|
|
@@ -1319,11 +1319,11 @@ module.exports = app => {
|
|
|
if (!data.checkType || isNaN(data.checkType)) {
|
|
|
throw '提交数据错误';
|
|
|
}
|
|
|
- if (data.checkType === auditConst.status.checkNo) {
|
|
|
- if (!data.checkType || isNaN(data.checkType)) {
|
|
|
- throw '提交数据错误';
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (data.checkType === auditConst.status.checkNo) {
|
|
|
+ // if (!data.checkType || isNaN(data.checkType)) {
|
|
|
+ // throw '提交数据错误';
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
await ctx.service.materialAudit.check(ctx.material.id, data, ctx.material.times);
|
|
|
|