|
@@ -237,9 +237,14 @@ module.exports = app => {
|
|
|
setupSomeDftCustomizeCfg(rptTpl);
|
|
|
printCom.initialize(rptTpl);
|
|
|
printCom.analyzeData(ctx.helper, rptTpl, tplData, defProperties, JV.PAGING_OPTION_NORMAL, JV.OUTPUT_TYPE_NORMAL, customSelect, []);
|
|
|
- //
|
|
|
+ const maxPages = printCom.totalPages;
|
|
|
let pageRst = null;
|
|
|
- pageRst = printCom.outputAsSimpleJSONPageArray(ctx.helper, rptTpl, tplData, 1, 1, defProperties, params.custCfg, customSelect);
|
|
|
+ //
|
|
|
+ if (maxPages > 0) {
|
|
|
+ pageRst = printCom.outputAsSimpleJSONPageArray(ctx.helper, rptTpl, tplData, 1, 1, defProperties, params.custCfg, customSelect);
|
|
|
+ } else {
|
|
|
+ pageRst = printCom.outputAsPreviewPage(rptTpl, defProperties);
|
|
|
+ }
|
|
|
return pageRst;
|
|
|
} catch (ex) {
|
|
|
console.log('报表数据异常, tender id: ' + params.tender_id);
|