郎学彬 vor 4 Jahren
Ursprung
Commit
65448cf37b

+ 126 - 0
src/main/webapp/admin/jtfjt/reportManageDetailJtfjt.html

@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报告详情</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+	<div class="shadow-content" style="margin:1.5rem; text-align: center;">
+		<p id = "reportTitle" style="margin:15px; font-size : 20px"></p>
+    	<table id="reportTable" class="layui-table"></table>
+    	<div id = "reportDiv" style = "margin : 20px; text-align : left;"></div>
+    	<div id = "reportFujian" style = "margin : 20px; text-align : right;">
+    		<a style = "color : red;" onclick = "downLoadFujian()">附件下载</a>
+    	</div>
+	</div>
+    <script>
+	var pageId = getQueryString("pageId");
+	var reportId = getQueryString("reportId");		//报告id
+	var fileName = chineseUrlDecodeURI(getQueryString("fileName"));	//报告名称
+	
+	var type = getQueryString("type");				//报告类型00:excel 01:word
+	var typeId = getQueryString("typeId");			//报告类型id
+	var reportType = getQueryString("reportType");	//报告类型
+	
+	var cols = null;
+	
+	// word
+		$("#reportTable").hide();
+		$("#reportTitle").html(fileName);
+		$.request({
+			action : 'JtfjtReportAction/reportInfDetail',
+			data : {
+				reportId : reportId
+			},
+			success : function(data) {
+				var resJSON = eval('(' + data.data.data + ')');
+				var reportDesc = resJSON.descStr;
+				
+				$("#reportDiv").html(reportDesc);
+				
+				/* // 周报下的excel
+				var excelList = resJSON.excelList;
+				if (!isEmpty(excelList)) {
+					var tableHtml = '<table class="layui-table">';
+					for (var i = 0; i < excelList.length; i ++) {
+						tableHtml += '<tr>';
+						var childList = excelList[i];
+						for (var j = 0; j < childList.length; j ++) {
+							tableHtml += '<td>' + childList[j] + '</td>';
+						}
+						tableHtml += '</tr>';
+					}
+					tableHtml += '</table>';
+					$("#reportDiv").append(tableHtml);
+				} */
+				if (reportType != "TQTDYB") {
+					$("#reportFujian").hide();
+				}
+			},
+			error : function(data2) {
+				$.ErrorAlert(data2.MINErrorMessage);
+			}
+	  	});
+	
+	function reportTable(excelList, typeId, isEdit) {
+		var html = '';
+		for (var i = 0; i < excelList.length; i ++) {
+			html += '<tr>';
+			var excelChildList = excelList[i];
+			for (var j = 0; j < excelChildList.length; j ++) {
+				// 合计列增加穿透
+				if ((j == excelChildList.length - 1)) {
+					// 台区停电次数
+					if (i == 2) {
+						html += '<td style="cursor: pointer" onclick="tqtd0()">' + excelChildList[j] + '</td>';
+					// 2个月停电3次及以上台区
+					} else if (i == 5) {
+						html += '<td style="cursor: pointer" onclick="tqtd1()">' + excelChildList[j] + '</td>';
+					// 2个月停电3次及以上台区且昨日停电
+					} else if (i == 6) {
+						html += '<td style="cursor: pointer" onclick="tqtd2()">' + excelChildList[j] + '</td>';
+					} else if (i == 7) {
+						html += '<td style="cursor: pointer" onclick="tqtd3()">' + excelChildList[j] + '</td>';
+					} else {
+						html += '<td>' + excelChildList[j] + '</td>';
+					}
+				} else {
+					html += '<td>' + excelChildList[j] + '</td>';
+				}
+			}
+			html += '</tr>';
+		}
+		$("#reportTable").html(html);
+	}
+	
+	// 台区次数穿透
+	function tqtd0(){
+		var openPageId = pageId + "-01";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD01", '', pageId, null);
+	}
+	// 2个月停电3次及以上台区穿透
+	function tqtd1(){
+		var openPageId = pageId + "-02";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD02", '', pageId, null);
+	}
+	// month个月停电count次及以上台区且昨日停电穿透
+	function tqtd2(){
+		var openPageId = pageId + "-03";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD03", '', pageId, null);
+	}
+	// 2个月停电1次及以上台区且昨日停电穿透
+	function tqtd3(){
+		var openPageId = pageId + "-04";
+		openMainTabPage(openPageId, "详情", "tqtd/reportManageDetailChuantou.html?pageId="+openPageId+"&reportId="+reportId+"&chuantouType=TQTD04", '', pageId, null);
+	}
+	
+	function downLoadFujian() {
+		var data = {reportId : reportId};
+		exportExcel("../../TQTDReportAction/reportInfFujian",data);
+	}
+    </script>
+</body>
+
+</html>

+ 78 - 0
src/main/webapp/admin/jtfjt/reportManageUpdateJtfjt.html

@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报告详情</title>
+    <script src="../../js/min-loader-next.js"></script>
+    <script src="../../js/report.js"></script>
+</head>
+<body class="content">
+	<div class="shadow-content" style="margin:1.5rem; text-align: center;">
+		<p id = "reportTitle" style="margin:15px; font-size : 20px" contenteditable = "true"></p>
+    	<table id="reportTable" class="layui-table"></table>
+	</div>
+	<div class="layui-form-item box-button" style="margin-top:50px">
+          <div class="layui-input-block">
+				<button class="layui-btn" onclick = "saveReport()">保存</button>
+          </div>
+    </div>
+    <script>
+	var pageId = getQueryString("pageId");
+	var reportId = getQueryString("reportId");		//报告id
+	var fileName = chineseUrlDecodeURI(getQueryString("fileName"));	//报告名称
+	
+	var type = getQueryString("type");		//报告类型00:excel 01:word
+	var typeId = getQueryString("typeId");	//报告类型id
+	
+	var cols = null;
+	
+	// excel
+	if ("00" == type) {
+		$("#reportTitle").html(fileName);
+		$.request({
+			action : 'ReportManageAction/reportInfDetail',
+			data : {
+				reportId : reportId
+			},
+			success : function(data) {
+				var reportDataJsonStr = data.data.data;
+				var excelList = eval('(' + reportDataJsonStr + ')');
+				reportTable(excelList, typeId, true);
+			},
+			error : function(data2) {
+				$.ErrorAlert(data2.MINErrorMessage);
+			}
+	  	});
+	// word
+	} else {
+		
+	}
+
+	function saveReport() {
+		// excel
+		if ("00" == type) {
+			var excelList = getTableToArray("reportTable");
+			$.request({
+				action : 'ReportManageAction/reportInfUpdate',
+				data : {
+					reportId : reportId,
+					excelList : JSON.stringify(excelList),
+					reportName : $("#reportTitle").html()
+				},
+				success : function(data) {
+					$.SuccAlert("保存成功!");
+					setTimeout(function(){
+						deleteTabPageParent(pageId); 
+					}, 1500)
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+		  	});
+		}
+	}
+    </script>
+</body>
+
+</html>