Explorar el Código

现场收方下载重复问题

TonyKang hace 3 años
padre
commit
f7b2ccac37
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      app/view/report/rpt_individual.ejs

+ 6 - 2
app/view/report/rpt_individual.ejs

@@ -230,8 +230,12 @@
     function exportPDF() {
         //导出PDF
         if (currentPageRst) {
-            dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', _getPdfFontCallback);
-            dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', _getPdfFontCallback);
+            if (pdfFont['SmartSimsun'].length === 2) {
+                JpcJsPDFHelper.outputAsPdf(currentPageRst, PAGE_SIZE, currentReportName, [], []);
+            } else {
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', _getPdfFontCallback);
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', _getPdfFontCallback);
+            }
         }
     }