소스 검색

签名修复bug

laiguoran 4 년 전
부모
커밋
a4ed16bef2
1개의 변경된 파일15개의 추가작업 그리고 13개의 파일을 삭제
  1. 15 13
      app/view/report/index_sign.ejs

+ 15 - 13
app/view/report/index_sign.ejs

@@ -379,19 +379,21 @@
             $(this).attr('disabled', true);
             $(this).text('签名条件判断中...');
             // 判断同表中历史归档是否已存在签名
-            const archiveList = _.find(ARCHIVE_LIST, { rpt_id: rptArchiveObj.currentNode.ID.toString() });
-            if (archiveList && archiveList.items) {
-                const aidList = _.map(archiveList.items, 'uuid');
-                _.remove(aidList, function (n) {
-                    return n === rptArchiveObj.currentArchiveUuid;
-                });
-                if (aidList.length > 0) {
-                    for (const a of aidList) {
-                        if (_.findIndex(signLogList, { uuid: a }) !== -1) {
-                            toastr.error('历史归档中已存在签名,请勿重复签署');
-                            $(this).attr('disabled', false);
-                            $(this).text('确定');
-                            return false;
+            if(rptArchiveObj.currentNode && rptArchiveObj.currentArchiveUuid) {
+                const archiveList = _.find(ARCHIVE_LIST, { rpt_id: rptArchiveObj.currentNode.ID.toString() });
+                if (archiveList && archiveList.items) {
+                    const aidList = _.map(archiveList.items, 'uuid');
+                    _.remove(aidList, function (n) {
+                        return n === rptArchiveObj.currentArchiveUuid;
+                    });
+                    if (aidList.length > 0) {
+                        for (const a of aidList) {
+                            if (_.findIndex(signLogList, { uuid: a }) !== -1) {
+                                toastr.error('历史归档中已存在签名,请勿重复签署');
+                                $(this).attr('disabled', false);
+                                $(this).text('确定');
+                                return false;
+                            }
                         }
                     }
                 }