瀏覽代碼

现场收方下载重复问题

TonyKang 3 年之前
父節點
當前提交
f7b2ccac37
共有 1 個文件被更改,包括 6 次插入2 次删除
  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);
+            }
         }
     }