cy
2022-06-28 2ba5c891b24d4d0cd6ce7ef833592e4f576ee5e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!doctype html>
<html class="no-js">
<head>
 
<style type="text/css" id="printStyle">
        .reportTable{
        width:190mm;
        margin:0px auto;
        font-size:12px;
        color:#121212;
        text-align:center;
        border-collapse:collapse;
        line-height:22px;
        }
        .reportTable td{
        border:1px solid #888; margin:0;padding:8px 0px 8px 5px;line-height:22px;
        }
        #nameTr{ border:0px; }
        #nameTr td{ border:0px; font-size:12px; color:#121212;line-height:20px; }
        
        #titleTr{ border:0px; }
        #titleTr td{ border:0px; font-size:25px;font-face:微软雅黑;}
</style>
 
<meta charset="utf-8">
<title>配置采集报告</title>
[#include "/business/pages/include/static.html" /]
<link rel="stylesheet" type="text/css" href="${common_static}/static/style/ci/dialog.css"/>
<script language="javascript" src="${common_static}/static/plugins/print/LodopFuncs.js"></script>
 
<script type="text/javascript">
    
    var LODOP; //声明为全局变量 
    function prn1_preview() {
        LODOP=getLodop();
        CreateOneFormPage();
        LODOP.PREVIEW();
    };
    function CreateOneFormPage(){
        LODOP.SET_PRINT_PAGESIZE(1,0,0,"A4");
        LODOP.SET_PRINT_STYLEA(1,"Angle",90);
        
        //LODOP.ADD_PRINT_HTM("1.0cm","0.5cm","RightMargin:0.9cm","BottomMargin:9mm",document.documentElement.innerHTML);
        LODOP.ADD_PRINT_HTM("1.0cm","0.5cm","RightMargin:0.9cm","BottomMargin:9mm",document.getElementById("printDiv").innerHTML);
    };
    
    function saveAsFile(){ 
        LODOP=getLodop();   
        LODOP.PRINT_INIT(""); 
        LODOP.ADD_PRINT_TABLE(100,20,500,80,document.documentElement.innerHTML); 
        LODOP.SET_SAVE_MODE("Orientation",2); //Excel文件的页面设置:横向打印   1-纵向,2-横向;
        LODOP.SET_SAVE_MODE("PaperSize",9);  //Excel文件的页面设置:纸张大小   9-对应A4
        LODOP.SET_SAVE_MODE("Zoom",90);       //Excel文件的页面设置:缩放比例
        LODOP.SET_SAVE_MODE("CenterHorizontally",true);//Excel文件的页面设置:页面水平居中
        LODOP.SET_SAVE_MODE("CenterVertically",true); //Excel文件的页面设置:页面垂直居中
        LODOP.SAVE_TO_FILE("配置采集报告.xls");
       }
 
    function onDialogBtnClick(btnID, dialogID, config){//此函数放在子页面
        if(btnID == "btnExport"){
            saveAsFile();
        }
        if(btnID == "btnPrint"){
            prn1_preview();
        }
    }
    
    function showReport(type){
        var orderId = '${RequestParameters.orderId}';
        var flowId = '${RequestParameters.flowId}';
        var projectId = '${RequestParameters.projectId}';
        var param = {orderId:orderId,flowId:flowId,projectId:projectId};
        if(type == 1){
            $("#printDiv").load("${base}/business/pages/ciadd/getCollectionReport.html",param);
        }else{
            $("#printDiv").load("${base}/business/pages/ciadd/reportDetail.html",param);
        }
    }
    </script>
</head>
 
<body class="fullscreen">
[#include "/business/pages/include/header.html" /]
 
[#assign focusLabel = Constants.WORKFLOW_BASE_BUSINESS_TYPE_INCIDENT]
[#include "/business/pages/include/myheader.html" /]
[#if resMap?? && resMap?size>0]
 <div class="check_btn clearfix">
        
        <a class="common close" href="javascript:window.close();"><span>关闭</span></a>
        <a class="common export" href="javascript:saveAsFile();"><span>导出</span></a>
        <a class="common export" href="javascript:prn1_preview();"><span>打印</span></a>
        <a class="common export" href="javascript:showReport(1);"><span>采集报告</span></a>
        <a class="common export" href="javascript:showReport(2)"><span>采集明细</span></a>
    </div>
    <div class="device" id="printDiv" style="padding:0;border:0;">
    
      
      
  </div>
 [/#if]
[#include "/business/pages/include/footer.html" /]
</body>
</html>