Browse Source

签字入库机制判断更新

laiguoran 2 years atrás
parent
commit
da7fbf0184
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/service/payment_rpt_audit.js

+ 3 - 1
app/service/payment_rpt_audit.js

@@ -32,7 +32,9 @@ module.exports = app => {
                 if (!rptAudit) {
                     throw '当前人不存在报表角色中';
                 }
-                if (this.ctx.detail.uid !== uid && this._.findIndex(this.ctx.detail.auditors, { aid: uid }) === -1) {
+                if ((this.ctx.detail.status !== auditConst.status.uncheck && this.ctx.detail.status !== auditConst.status.checkNo && this.ctx.detail.uid === uid) ||
+                    (this._.findIndex(this.ctx.detail.auditors, { aid: uid }) === -1 && this.ctx.detail.uid !== uid) ||
+                    (this._.findIndex(this.ctx.detail.auditors, { aid: uid }) !== -1 && this.ctx.detail.curAuditor && this.ctx.detail.curAuditor.aid !== uid)) {
                     let report_json = JSON.parse(this.ctx.detail.report_json);
                     report_json = await this.ctx.service.paymentDetail.signOneSignatureData(report_json, rptAudit.signature_name, signature_msg);
                     // 同步期信息