12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <!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>
|