Преглед на файлове

计量审批,重新审批可用问题

MaiXinRong преди 5 години
родител
ревизия
04ac7fb4c2
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 1
      app/controller/stage_controller.js
  2. 0 1
      app/middleware/stage_check.js

+ 3 - 1
app/controller/stage_controller.js

@@ -906,7 +906,9 @@ module.exports = app => {
          */
         async checkAuditAgain(ctx) {
             try {
-                this._checkStageCanModify(ctx);
+                if (ctx.stage.revising) {
+                    throw '台账修订中,请勿修改提交期数据';
+                }
 
                 if (ctx.stage.auditors[ctx.stage.auditors.length - 1].aid === ctx.session.sessionUser.accountId && ctx.stage.status === auditConst.status.checked && ctx.stage.order === ctx.stage.highOrder) {
                     await ctx.service.stageAudit.checkAgain(ctx.stage.id, ctx.stage.times);

+ 0 - 1
app/middleware/stage_check.js

@@ -86,7 +86,6 @@ module.exports = options => {
                     stage.curOrder = accountId === stage.curAuditor.aid ? stage.curAuditor.order : stage.curAuditor.order - 1;
                 }
                 stage.readOnly = (stage.status !== status.checking && stage.status !== status.checkNoPre) || accountId !== stage.curAuditor.aid;
-                stage.readOnly = stage.auditors !== undefined && stage.auditors.length !== 0 && stage.auditors[stage.auditors.length - 1].aid === accountId && stage.status === status.checked && stage.order === stage.highOrder ? false : stage.readOnly;
             } else if (shareIds.indexOf(accountId) !== -1) { // 分享人
                 if (stage.status === status.uncheck) {
                     throw '您无权查看该数据';