|  | @@ -130,6 +130,35 @@ let zTreeOprObj = {
 | 
	
		
			
				|  |  |          document.getElementById("rpt_narrow").checked = cfg.isNarrow;
 | 
	
		
			
				|  |  |          document.getElementById("rpt_fill_zero").checked = cfg.fillZero;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    extractRptCfg: function (cfg) {
 | 
	
		
			
				|  |  | +        cfg.margins.Left = $("#elementMargin_Left").get(0).value;
 | 
	
		
			
				|  |  | +        cfg.margins.Right = $("#elementMargin_Right").get(0).value;
 | 
	
		
			
				|  |  | +        cfg.margins.Top = $("#elementMargin_Top").get(0).value;
 | 
	
		
			
				|  |  | +        cfg.margins.Bottom = $("#elementMargin_Bottom").get(0).value;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        for (let font of cfg.fonts) {
 | 
	
		
			
				|  |  | +            let fontPropSuffix = "title";
 | 
	
		
			
				|  |  | +            if (font.CfgDispName === "表标题") {
 | 
	
		
			
				|  |  | +                fontPropSuffix = "title";
 | 
	
		
			
				|  |  | +            } else if (font.CfgDispName === "列标题") {
 | 
	
		
			
				|  |  | +                fontPropSuffix = "column";
 | 
	
		
			
				|  |  | +            } else if (font.CfgDispName === "正文内容") {
 | 
	
		
			
				|  |  | +                fontPropSuffix = "content";
 | 
	
		
			
				|  |  | +            } else if (font.CfgDispName === "合计") {
 | 
	
		
			
				|  |  | +                fontPropSuffix = "summary";
 | 
	
		
			
				|  |  | +            } else if (font.CfgDispName === "表眉/表脚") {
 | 
	
		
			
				|  |  | +                fontPropSuffix = "header_footer";
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            font.Name = document.getElementById("fontName_" + fontPropSuffix).value;
 | 
	
		
			
				|  |  | +            font.FontHeight = document.getElementById("fontHeight_" + fontPropSuffix).value;
 | 
	
		
			
				|  |  | +            font.FontBold = (document.getElementById("font_bold_" + fontPropSuffix).className === "btn btn-sm btn-outline-secondary active")?"T":"F";
 | 
	
		
			
				|  |  | +            font.FontItalic = (document.getElementById("font_italic_" + fontPropSuffix).className === "btn btn-sm btn-outline-secondary active")?"T":"F";
 | 
	
		
			
				|  |  | +            font.FontUnderline = (document.getElementById("font_underline_" + fontPropSuffix).className === "btn btn-sm btn-outline-secondary active")?"T":"F";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        cfg.showVerticalLine = document.getElementById("rpt_vertical_line").checked;
 | 
	
		
			
				|  |  | +        cfg.isNarrow = document.getElementById("rpt_narrow").checked;
 | 
	
		
			
				|  |  | +        cfg.fillZero = document.getElementById("rpt_fill_zero").checked;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      refreshNodes: function() {
 | 
	
		
			
				|  |  |          let me = this;
 | 
	
		
			
				|  |  |          let private_setupIsParent = function(node){
 | 
	
	
		
			
				|  | @@ -320,16 +349,38 @@ let rptControlObj = {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getAllInOneBook: function () {
 | 
	
		
			
				|  |  | -        let me = rptControlObj;
 | 
	
		
			
				|  |  |          if (zTreeOprObj.checkedRptTplNodes && zTreeOprObj.checkedRptTplNodes.length > 0) {
 | 
	
		
			
				|  |  | -            let orgRptName = zTreeOprObj.checkedRptTplNodes[0].name;
 | 
	
		
			
				|  |  | +            let orgRptName = projectInfoObj.projectInfo.name;
 | 
	
		
			
				|  |  |              let refRptTplIds = [];
 | 
	
		
			
				|  |  |              for (let node of zTreeOprObj.checkedRptTplNodes) {
 | 
	
		
			
				|  |  |                  refRptTplIds.push(node.refId);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            let url =  "/report_api/getExcelInOneBook/" + projectInfoObj.projectInfo.ID + "/" + refRptTplIds.join(",") + "/" +
 | 
	
		
			
				|  |  | -                me.getCurrentPageSize() + "/" + orgRptName + "/" + 'normal';
 | 
	
		
			
				|  |  | -            window.location = url;
 | 
	
		
			
				|  |  | +            window.location = "/report_api/getExcelInOneBook/" + projectInfoObj.projectInfo.ID + "/" + refRptTplIds.join(",") + "/" +
 | 
	
		
			
				|  |  | +                rptControlObj.getCurrentPageSize() + "/" + orgRptName + "/" + 'normal';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getAllIndividualExcelBook: function () {
 | 
	
		
			
				|  |  | +        let me = rptControlObj;
 | 
	
		
			
				|  |  | +        if (zTreeOprObj.checkedRptTplNodes && zTreeOprObj.checkedRptTplNodes.length > 0) {
 | 
	
		
			
				|  |  | +            let urls = [];
 | 
	
		
			
				|  |  | +            let orientation = ((zTreeOprObj.checkedRptTplNodes.length > 1)?null:me.getCurrentOrientation());
 | 
	
		
			
				|  |  | +            for (let tplNode of zTreeOprObj.checkedRptTplNodes) {
 | 
	
		
			
				|  |  | +                let orgRptName = tplNode.name;
 | 
	
		
			
				|  |  | +                let url =  "/report_api/getExcel/" + projectInfoObj.projectInfo.ID + "/" + tplNode.refId + "/" +
 | 
	
		
			
				|  |  | +                    me.getCurrentPageSize() + "/" + orientation + "/" + orgRptName + "/" + true + "/" + 'normal';
 | 
	
		
			
				|  |  | +                urls.push(url);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            downloadReport(urls);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    checkAndGetExcel: function () {
 | 
	
		
			
				|  |  | +        if (zTreeOprObj.treeObj) {
 | 
	
		
			
				|  |  | +            let chkNodes = zTreeOprObj.treeObj.getCheckedNodes(true);
 | 
	
		
			
				|  |  | +            if (chkNodes.length > 0) {
 | 
	
		
			
				|  |  | +                $("#show_excel_output_cfg").trigger("click");
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                rptControlObj.getAllIndividualExcelBook();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getExcel: function () {
 | 
	
	
		
			
				|  | @@ -337,17 +388,7 @@ let rptControlObj = {
 | 
	
		
			
				|  |  |          if ($("#excelExportType_AllInOneBook").get(0).checked) {
 | 
	
		
			
				|  |  |              me.getAllInOneBook();
 | 
	
		
			
				|  |  |          } else if ($("#excelExportType_IndividualBook").get(0).checked) {
 | 
	
		
			
				|  |  | -            if (zTreeOprObj.checkedRptTplNodes && zTreeOprObj.checkedRptTplNodes.length > 0) {
 | 
	
		
			
				|  |  | -                let urls = [];
 | 
	
		
			
				|  |  | -                let orientation = ((zTreeOprObj.checkedRptTplNodes.length > 1)?null:me.getCurrentOrientation());
 | 
	
		
			
				|  |  | -                for (let tplNode of zTreeOprObj.checkedRptTplNodes) {
 | 
	
		
			
				|  |  | -                    let orgRptName = tplNode.name;
 | 
	
		
			
				|  |  | -                    let url =  "/report_api/getExcel/" + projectInfoObj.projectInfo.ID + "/" + tplNode.refId + "/" +
 | 
	
		
			
				|  |  | -                        me.getCurrentPageSize() + "/" + orientation + "/" + orgRptName + "/" + true + "/" + 'normal';
 | 
	
		
			
				|  |  | -                    urls.push(url);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                downloadReport(urls);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +            me.getAllIndividualExcelBook();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getPDF: function() {
 | 
	
	
		
			
				|  | @@ -433,6 +474,12 @@ let rptControlObj = {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    restoreCustCFG: function () {
 | 
	
		
			
				|  |  | +        let me = this;
 | 
	
		
			
				|  |  | +        zTreeOprObj.renderRptCfg(zTreeOprObj.defReportPageCfg);
 | 
	
		
			
				|  |  | +        zTreeOprObj.extractRptCfg(zTreeOprObj.reportPageCfg);
 | 
	
		
			
				|  |  | +        me.saveCustCfg();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      saveCustCfg: function() {
 | 
	
		
			
				|  |  |          let params = {};
 | 
	
		
			
				|  |  |          params.custCfg = zTreeOprObj.reportPageCfg;
 |