|
@@ -233,7 +233,7 @@ let zTreeOprObj = {
|
|
|
params.rpt_tpl_id = treeNode.refId;
|
|
params.rpt_tpl_id = treeNode.refId;
|
|
|
params.prj_id = projectObj.project.projectInfo.ID;
|
|
params.prj_id = projectObj.project.projectInfo.ID;
|
|
|
params.custCfg = me.reportPageCfg;
|
|
params.custCfg = me.reportPageCfg;
|
|
|
- me.requestReport(params);
|
|
|
|
|
|
|
+ me.requestNormalReport(params);
|
|
|
}
|
|
}
|
|
|
me.countChkedRptTpl();
|
|
me.countChkedRptTpl();
|
|
|
}
|
|
}
|
|
@@ -257,13 +257,70 @@ let zTreeOprObj = {
|
|
|
},
|
|
},
|
|
|
changeCfg: function() {
|
|
changeCfg: function() {
|
|
|
let me = zTreeOprObj;
|
|
let me = zTreeOprObj;
|
|
|
- let params = {};
|
|
|
|
|
- params.pageSize = rptControlObj.getCurrentPageSize();
|
|
|
|
|
- params.orientation = rptControlObj.getCurrentOrientation();
|
|
|
|
|
- params.rpt_tpl_id = me.currentNode.refId;
|
|
|
|
|
- params.prj_id = projectObj.project.projectInfo.ID;
|
|
|
|
|
- params.custCfg = me.reportPageCfg;
|
|
|
|
|
- me.requestReport(params);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (me.currentNode) {
|
|
|
|
|
+ if (me.currentNode.hasOwnProperty('flags') && me.currentNode.flags.hasOwnProperty('reportType') && me.currentNode['flags']['reportType'] !== 'NA') {
|
|
|
|
|
+ let refRptTplIds = [], refBillSumPrjsIds = [], refGljSumPrjsIds = [];
|
|
|
|
|
+ if (me.currentNode['flags']['reportType'] === 'billSummary') {
|
|
|
|
|
+ refBillSumPrjsIds.push(me.currentNode.refId);
|
|
|
|
|
+ } else if (me.currentNode['flags']['reportType'] === 'gljSummary') {
|
|
|
|
|
+ refGljSumPrjsIds.push(me.currentNode.refId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (zTreeOprObj.selectedPrjIDs.length > 0) {
|
|
|
|
|
+ let params = rptControlObj.creatCommonExportParam(refRptTplIds, refBillSumPrjsIds, refGljSumPrjsIds);
|
|
|
|
|
+ params.pageSize = rptControlObj.getCurrentPageSize();
|
|
|
|
|
+ params.orientation = rptControlObj.getCurrentOrientation();
|
|
|
|
|
+ params.rpt_ids = refRptTplIds;
|
|
|
|
|
+ params.rpt_bill_tpl_ids = refBillSumPrjsIds;
|
|
|
|
|
+ params.rpt_glj_tpl_ids = refGljSumPrjsIds;
|
|
|
|
|
+ params.custCfg = me.reportPageCfg;
|
|
|
|
|
+ CommonAjax.postEx("report_api/getMultiReports", params, 10000, true,
|
|
|
|
|
+ function(result){
|
|
|
|
|
+ hintBox.unWaitBox();
|
|
|
|
|
+ let pageRst = result[0];
|
|
|
|
|
+ let canvas = document.getElementById("rptCanvas");
|
|
|
|
|
+ if (pageRst && pageRst.items && pageRst.items.length > 0) {
|
|
|
|
|
+ me.resetAfter(pageRst);
|
|
|
|
|
+ me.currentRptPageRst = pageRst;
|
|
|
|
|
+ me.maxPages = pageRst.items.length;
|
|
|
|
|
+ me.currentPage = 1;
|
|
|
|
|
+ me.displayPageValue();
|
|
|
|
|
+ let size = JpcCanvasOutput.getReportSizeInPixel(me.currentRptPageRst, getScreenDPI());
|
|
|
|
|
+ canvas.width = size[0] + 20;
|
|
|
|
|
+ if (size[1] > size[0]) {
|
|
|
|
|
+ canvas.height = size[1] + 100;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ canvas.height = size[1] + 50;
|
|
|
|
|
+ }
|
|
|
|
|
+ me.showPage(1, canvas);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //返回了无数据表
|
|
|
|
|
+ JpcCanvasOutput.cleanCanvas(canvas);
|
|
|
|
|
+ JpcCanvasOutput.drawPageBorder(me.currentRptPageRst, canvas, getScreenDPI());
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(err){
|
|
|
|
|
+ hintBox.unWaitBox();
|
|
|
|
|
+ }, function(ex){
|
|
|
|
|
+ hintBox.unWaitBox();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (me.currentNode['flags']['reportType'] === 'billSummary') {
|
|
|
|
|
+ me.requestPrjFolderForBillsSummary();
|
|
|
|
|
+ } else if (me.currentNode['flags']['reportType'] === 'gljSummary') {
|
|
|
|
|
+ me.requestPrjFolderForGljSummary();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let params = {};
|
|
|
|
|
+ params.pageSize = rptControlObj.getCurrentPageSize();
|
|
|
|
|
+ params.orientation = rptControlObj.getCurrentOrientation();
|
|
|
|
|
+ params.rpt_tpl_id = me.currentNode.refId;
|
|
|
|
|
+ params.prj_id = projectObj.project.projectInfo.ID;
|
|
|
|
|
+ params.custCfg = me.reportPageCfg;
|
|
|
|
|
+ me.requestNormalReport(params);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
resetAfter: function (pageRst) {
|
|
resetAfter: function (pageRst) {
|
|
|
let size = pageRst[JV.NODE_PAGE_INFO][JV.NODE_PAGE_SIZE].slice(0);
|
|
let size = pageRst[JV.NODE_PAGE_INFO][JV.NODE_PAGE_SIZE].slice(0);
|
|
@@ -275,7 +332,7 @@ let zTreeOprObj = {
|
|
|
document.getElementById("hrefRptOrientation").innerHTML = "横向";
|
|
document.getElementById("hrefRptOrientation").innerHTML = "横向";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- requestReport: function (params) {
|
|
|
|
|
|
|
+ requestNormalReport: function (params) {
|
|
|
let me = zTreeOprObj;
|
|
let me = zTreeOprObj;
|
|
|
hintBox.waitBox();
|
|
hintBox.waitBox();
|
|
|
CommonAjax.postEx("report_api/getReport", params, 60000, true,
|
|
CommonAjax.postEx("report_api/getReport", params, 60000, true,
|
|
@@ -943,16 +1000,7 @@ let rptControlObj = {
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
confirmCfgChange: function() {
|
|
confirmCfgChange: function() {
|
|
|
- let treeNode = zTreeOprObj.currentNode;
|
|
|
|
|
- if (treeNode.nodeType === TPL_TYPE_TEMPLATE && treeNode.refId > 0) {
|
|
|
|
|
- let params = {};
|
|
|
|
|
- params.pageSize = rptControlObj.getCurrentPageSize();
|
|
|
|
|
- params.rpt_tpl_id = treeNode.refId;
|
|
|
|
|
- params.prj_id = projectObj.project.projectInfo.ID;
|
|
|
|
|
- params.custCfg = zTreeOprObj.reportPageCfg;
|
|
|
|
|
- zTreeOprObj.requestReport(params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ zTreeOprObj.changeCfg();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|