Browse Source

审核意见取最后一次

TonyKang 5 years ago
parent
commit
691c6375e2
1 changed files with 6 additions and 2 deletions
  1. 6 2
      app/public/report/js/rpt_signature.js

+ 6 - 2
app/public/report/js/rpt_signature.js

@@ -537,10 +537,14 @@ let rptSignatureHelper = {
                     sCell.Value = '同意'; //默认的
                     for (const role_rel of currRoleRelList) {
                         if (sCell.signature_name === role_rel.signature_name + '_审核意见') {
+                            let preDate = '';
                             for (const audit_rel of currAuditList) {
                                 if (role_rel.acc_id === audit_rel.aid) {
-                                    sCell.Value = audit_rel.opinion;
-                                    break;
+                                    if (audit_rel.end_time > preDate && audit_rel.status === 3) {
+                                        sCell.Value = audit_rel.opinion;
+                                        preDate = audit_rel.end_time;
+                                    }
+                                    //不能break,实际会有多个审核意见,以最后一个为准
                                 }
                             }
                             break;