username@email.com
2025-07-29 4bf2b5d9caa83082f690a84c4518f3ad6ad6d599
CY_ECommercePlatform/CY.WebForm/Pages/work/OA_DocumentDetail.aspx
@@ -13,12 +13,79 @@
        .tableStyle div { text-align: left; overflow: visible; line-height: 15px; }
        .tableStyle tr, td, th { padding: 0px; height: auto; }
    </style>
        <script type="text/javascript">
            Preview =   function () {
                OnPrint();
                try {
                    LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
                    if ((LODOP == null) || (typeof (LODOP.VERSION) == "undefined")) return;
                    var div_tool = document.getElementById('div_tool');
                    var printparams = div_tool.getAttribute('printparams');
                    if (!printparams) {
                        // alert("1");
                        // LODOP.SET_PRINT_PAGESIZE(0, 1700, 1200, "A4");
                    }
                    else {
                        printparams = printparams.toString().split(',');
                        LODOP.SET_PRINT_PAGESIZE(parseInt(printparams[0]), parseInt(printparams[1]), parseInt(printparams[2]), printparams[3]);
                    }
                    if ($("#div_tool").attr("issideways") == "true") {
                        LODOP.ADD_PRINT_TABLE(30, 30, "95%", "90%", $(document.documentElement).html());
                        LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
                    } else if ($("#div_tool").attr("issideways") == "printinfo") {
                        var Oldhtml = "";
                        if (printStyle != "" && printStyle != undefined && printContent !== "") {
                            Oldhtml = printStyle + "<body>" + printContent + "</body>";
                            LODOP.ADD_PRINT_HTM(30, 30, "95%", "90%", Oldhtml);
                        }
                        else {
                            $(".warning").remove();
                            //alert($(document.documentElement).html());
                            LODOP.ADD_PRINT_HTM(30, 43, "95%", "90%", $(document.documentElement).html());
                        }
                    } else {
                        var Oldhtml = "";
                        if (printStyle != "" && printStyle != undefined && printContent !== "") {
                            Oldhtml = printStyle + "<body>" + printContent + "</body>";
                            LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", Oldhtml);
                        }
                        else {
                            $(".warning").remove();
                            /*alert($(document.documentElement).html());*/
                            /* LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", $(document.documentElement).html());*/
                            // 获取HTML内容
                            var content = $(document.documentElement).html();
                            // 将内容按分页标签分割
                            var pages = content.split('<div class="page-break"></div>');
                            // 遍历每一页的内容
                            for (var i = 0; i < pages.length; i++) {
                                /*  alert(pages[i]);*/
                                if (i > 0) LODOP.NewPage(); // 对于非第一页,添加新页
                                // 添加打印内容
                                LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", pages[i]);
                            }
                        }
                    }
                    LODOP.PREVIEW();
                } catch (e) {
                    //alertMsg('异常信息:' + e.message);
                }
                OnPrintOver();
            }
        </script>
</head>
<body>
    <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="/Pages/common/install_lodop32.exe"></embed>
    </object>
    <div id='div_tool' issideways="true" printparams='1,2100,2970, "A4"'>
    <div id='div_tool' issideways="printinfo" printparams='1,2100,2970, "A4"'>
    </div>
    <form id="form1" class="form2" runat="server">
    <table style="width: 590px; margin-top: 30px; margin: 0 auto;">