|
@@ -1021,16 +1021,19 @@ let rptControlObj = {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ _hidePdfIniPage: function () {
|
|
|
|
|
+ if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
+ $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
getPdfFontCallback: function(fontProperty) {
|
|
getPdfFontCallback: function(fontProperty) {
|
|
|
let me = rptControlObj;
|
|
let me = rptControlObj;
|
|
|
rptTplObj.pdfFont['SmartSimsun'].push(fontProperty);
|
|
rptTplObj.pdfFont['SmartSimsun'].push(fontProperty);
|
|
|
if (rptTplObj.pdfFont['SmartSimsun'].length === 2) {
|
|
if (rptTplObj.pdfFont['SmartSimsun'].length === 2) {
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
me.getPDFEx();
|
|
me.getPDFEx();
|
|
|
- }, 10);
|
|
|
|
|
|
|
+ }, 20);
|
|
|
// me.getPDFEx();
|
|
// me.getPDFEx();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1070,10 +1073,7 @@ let rptControlObj = {
|
|
|
CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
|
|
CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
|
|
|
function(result){
|
|
function(result){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
|
for (let idx = 0; idx < result.length; idx++) {
|
|
for (let idx = 0; idx < result.length; idx++) {
|
|
|
let pageData = result[idx];
|
|
let pageData = result[idx];
|
|
@@ -1082,18 +1082,12 @@ let rptControlObj = {
|
|
|
},
|
|
},
|
|
|
function(failRst){
|
|
function(failRst){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
console.log(failRst);
|
|
console.log(failRst);
|
|
|
},
|
|
},
|
|
|
function(exceptionRst){
|
|
function(exceptionRst){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
console.log(exceptionRst);
|
|
console.log(exceptionRst);
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
@@ -1118,10 +1112,7 @@ let rptControlObj = {
|
|
|
CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
|
|
CommonAjax.postEx("report_api/getMultiReports", params, WAIT_TIME_EXPORT, true,
|
|
|
function(result){
|
|
function(result){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
|
for (let idx = 0; idx < result.length; idx++) {
|
|
for (let idx = 0; idx < result.length; idx++) {
|
|
|
let pageData = result[idx];
|
|
let pageData = result[idx];
|
|
@@ -1130,18 +1121,12 @@ let rptControlObj = {
|
|
|
},
|
|
},
|
|
|
function(failRst){
|
|
function(failRst){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
console.log(failRst);
|
|
console.log(failRst);
|
|
|
},
|
|
},
|
|
|
function(exceptionRst){
|
|
function(exceptionRst){
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
console.log(exceptionRst);
|
|
console.log(exceptionRst);
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
@@ -1150,10 +1135,7 @@ let rptControlObj = {
|
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
let pageSize = rptControlObj.getCurrentPageSize();
|
|
|
let pageData = zTreeOprObj.currentRptPageRst;
|
|
let pageData = zTreeOprObj.currentRptPageRst;
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
- if ($('#ini_PDF_cover').is(':visible')) {
|
|
|
|
|
- $("#ini_PDF_Btn_Cancel").trigger("click");
|
|
|
|
|
- // $("#ini_PDF_cover").remove();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ me._hidePdfIniPage();
|
|
|
JpcJsPDFHelper.outputAsPdf(pageData, pageSize, rpt_names[0]);
|
|
JpcJsPDFHelper.outputAsPdf(pageData, pageSize, rpt_names[0]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|