瀏覽代碼

签名修复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;
+                            }
                         }
                     }
                 }