瀏覽代碼

收方单表调整

Tony Kang 2 年之前
父節點
當前提交
b305a2a8d2
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      app/view/report/rpt_individual.ejs

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

@@ -131,6 +131,10 @@
                 let canvas = document.getElementById("rptIndividualCanvas");
 
                 if (currentPageRst && currentPageRst.items && currentPageRst.items.length > 0) {
+                    if (currentPageRst.items.length > 1) {
+                        //理论上要清理冗余数据
+                        currentPageRst.items = currentPageRst.items.slice(0,1);
+                    }
                     let size = JpcCanvasOutput.getReportSizeInPixel(currentPageRst, SCREEN_DPI);
                     canvas.width = size[0] + 20;
                     if (size[1] > size[0]) {
@@ -206,7 +210,8 @@
             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-normal.js', 'normal', _getPdfFontCallback);
+                dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', _getPdfFontCallback);
                 dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', _getPdfFontCallback);
             }
         }