소스 검색

修复变更审批bug

ellisran 1 년 전
부모
커밋
5b8fc6952a
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      app/service/change.js

+ 1 - 2
app/service/change.js

@@ -859,7 +859,6 @@ module.exports = app => {
                 // 判断是否终审方法需要更改了,因为存在修改审批流程的操作,会使判断是否终审有问题
                 const curAudit = await this.ctx.service.changeAudit.getCurAuditor(changeData.cid, changeData.times);
                 const nextAudit = await this.ctx.service.changeAudit.getDataByCondition({ cid: changeData.cid, times: changeData.times, usite: curAudit.usite + 1 });
-
                 // 设置审批人通过
                 const audit_update = {
                     id: curAudit.id,
@@ -899,7 +898,7 @@ module.exports = app => {
                         await this.transaction.update(this.ctx.service.changeAuditList.tableName, list_update);
                     }
                 }
-                if (nextAudit === undefined) {
+                if (!nextAudit) {
                     // 变更令审批完成
                     change_update.status = audit.flow.status.checked;
                     change_update.p_code = postData.p_code;