Sfoglia il codice sorgente

修复签名最后几页bug

laiguoran 3 anni fa
parent
commit
99e1a363c8
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      app/view/report/index_sign.ejs

+ 4 - 4
app/view/report/index_sign.ejs

@@ -497,7 +497,7 @@
                         }
 
                         function signPdfRound(requestJson, num, round, roundNum, name) {
-                            if (num !== round) {
+                            if (num <= round) {
                                 requestJson.SignPosition.startPage = (num-1)*roundNum + 1;
                                 requestJson.SignPosition.endPage = num+1 > round ? -1 : num*roundNum;
                             }
@@ -505,14 +505,14 @@
                             NetcaPKI.SignatureCreatorSignSealEx(requestJson)
                                 .Then(function (res)
                                 {
-                                    if (num !== round) {
+                                    ++num;
+                                    if (num <= round) {
                                         requestJson.srcBytes = res.destFileEncode;
                                         let uhtml = ' <span class="text-success"><i class="fa fa-check"></i> '+ name +'('+ USER_NAME +')</span>';
-                                        const nowRound = (num-1)*roundNum;
+                                        const nowRound = (num-2)*roundNum;
                                         for (let i = 0; i < roundNum; i++) {
                                             $('#page-list tr').eq(nowRound + i).children('td').eq(2).append(uhtml);
                                         }
-                                        ++num;
                                         signPdfRound(requestJson, num, round, roundNum, name);
                                     } else {
                                         const doc = convertBase64UrlToBlob(res.destFileEncode);