Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js =================================================================== diff -u -r36851 -r37061 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 36851) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 37061) @@ -252,16 +252,23 @@ return dates } -function getTableHtml(data, dataAll) { +function getTableHtml(data, dataAll, title) { var tableHtml = ''; var tableWidth = 'auto' var sumAmount = 0; var sumSettlementPrice = 0; var sumTotalPrice = 0; var sumInfo = {}; + var countTd = 8; + for (var day in dataAll) { + countTd += 1; + } tableHtml += ""; tableHtml += ""; tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; tableHtml += ""; tableHtml += ""; tableHtml += ""; @@ -350,16 +357,23 @@ return tableHtml; } -function getTableHtml2(data) { +function getTableHtml2(data,title) { var tableHtml = ''; var tableWidth = 'auto' var sumAmount = 0; var sumPrice = 0; var colspan1 = 1; var colspan2 = 1; + var countTd = 12; + if (sstsConfig.extendedColumnConfigOfDetailedAccountingMonthlyReport && sstsConfig.extendedColumnConfigOfDetailedAccountingMonthlyReport.indexOf('tousseGroupName') >= 0) { + countTd+=1; + } tableHtml += "
"+title+"
申请科室结算科室类型
"; tableHtml += ""; tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; tableHtml += ""; tableHtml += ""; tableHtml += ""; @@ -718,11 +732,13 @@ var result = Ext.decode(response.responseText); var title = result.parametMap.title; if (result.data && result.data.length > 0) { - var tableHtml = "

" + title + "

"; - tableHtml += getTableHtml(result.data, dataAll) + var tableHtml = ""; + tableHtml += getTableHtml(result.data, dataAll,title) setTimeout(function () { document.getElementById('thisIframe2').contentWindow.document.getElementById('table').innerHTML = tableHtml; document.getElementById('thisIframe2').contentWindow.document.getElementById('ToolBar').style.display = 'block'; + document.getElementById('thisIframe2').contentWindow.document.getElementById('is2Column').value = true; + document.getElementById('thisIframe2').contentWindow.document.getElementById('widthStr').value = widthArr.join(','); myMask.hide(); }, 1000); } else { @@ -753,11 +769,13 @@ var result = Ext.decode(response.responseText); var title = result.parametMap.title; if (result.data && result.data.length > 0) { - var tableHtml = "

" + title + "

"; - tableHtml += getTableHtml2(result.data) + var tableHtml = ""; + tableHtml += getTableHtml2(result.data,title) setTimeout(function () { document.getElementById('thisIframe2').contentWindow.document.getElementById('table').innerHTML = tableHtml; document.getElementById('thisIframe2').contentWindow.document.getElementById('ToolBar').style.display = 'block'; + document.getElementById('thisIframe2').contentWindow.document.getElementById('is2Column').value = true; + document.getElementById('thisIframe2').contentWindow.document.getElementById('widthStr').value = widthArr.join(','); myMask.hide(); }, 1000); } else { Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js =================================================================== diff -u -r36878 -r37061 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 36878) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyView.js (.../departmentMonthlyView.js) (revision 37061) @@ -14,7 +14,10 @@ var widthArr = []; var hiddenExportButton = false; var enableStatisticType = false; -function getTableHtml(data, titleInfoArr, branchesOfHospitalInfo) { +function getTableHtml(data, parametMap) { + var titleInfoArr = parametMap.titleInfoArr || []; + var branchesOfHospitalInfo = parametMap.branchesOfHospitalInfo || []; + var title = parametMap.title; if (sstsConfig.enableWheterToChargeFieldOfDisposableGoods) { var headerArr = {}; var headerTitle = titleInfoArr; @@ -85,10 +88,28 @@ } } } + widthArr = []; + var countTd = 0; + for(var i=0;i"; tableHtml += ""; tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; for (var i = 0; i < headerTitle.length; i++) { var width = 100; if (headerTitle[i].name == '院区') { @@ -105,7 +126,6 @@ } else { tableHtml += ""; } - widthArr.push(width); } tableHtml += ""; tableHtml += ""; @@ -123,7 +143,6 @@ } else { tableHtml += ""; } - widthArr.push(100); } } } @@ -133,16 +152,12 @@ tableHtml += ""; for (var z = 0; z < thirdChildren.length; z++) { tableHtml += ""; - widthArr.push(100); } tableHtml += ""; - widthArr.push(100); for (var z = 0; z < thirdChildren.length; z++) { tableHtml += ""; - widthArr.push(100); } tableHtml += ""; - widthArr.push(100); tableHtml += ""; } is2Column = 3; @@ -267,10 +282,27 @@ } } } + widthArr = []; + var countTd = 0; + for(var i=0;i"; tableHtml += ""; tableHtml += ""; - widthArr = []; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; for (var i = 0; i < headerTitle.length; i++) { var width = 100; if (headerTitle[i].name == '院区') { @@ -287,7 +319,6 @@ } else { tableHtml += ""; } - widthArr.push(width) } tableHtml += ""; tableHtml += ""; @@ -297,7 +328,6 @@ for (var i = 0; i < headerColumn.length; i++) { if (headerColumn[i].name !== '价格合计' && headerColumn[i].name !== '数量合计' && headerColumn[i].name !== '科室记支合计' && headerColumn[i].name !== '包内材料数量合计') { tableHtml += ""; - widthArr.push(100) } } } @@ -737,13 +767,20 @@ timeout: 300000, success: function (response) { var result = Ext.decode(response.responseText); - var title = result.parametMap.title; if (result.data && result.data.length > 0) { - var tableHtml = "

" + title + "

"; - tableHtml += getTableHtml(result.data, result.parametMap.titleInfoArr, result.parametMap.branchesOfHospitalInfo) + var tableHtml = ""; + tableHtml += getTableHtml(result.data, result.parametMap) setTimeout(function () { document.getElementById('thisIframe2').contentWindow.document.getElementById('table').innerHTML = tableHtml; document.getElementById('thisIframe2').contentWindow.document.getElementById('ToolBar').style.display = 'block'; + if(is2Column){ + document.getElementById('thisIframe2').contentWindow.document.getElementById('is2Column').value = 3; + }else if(is2Column == 3){ + document.getElementById('thisIframe2').contentWindow.document.getElementById('is2Column').value = 4; + }else { + document.getElementById('thisIframe2').contentWindow.document.getElementById('is2Column').value = 2; + } + document.getElementById('thisIframe2').contentWindow.document.getElementById('widthStr').value = widthArr.join(','); myMask.hide(); }, 1000); } else { @@ -815,7 +852,7 @@ } } - if(sstsConfig.applyMonthReportOneColumnTemplate || sstsConfig.patternOfAccountingMonthlyReport || sstsConfig.hideAmountColumnOfAccountingMonthlyReportForMultipleBranchesHospital){ + if(sstsConfig.applyMonthReportOneColumnTemplate || sstsConfig.patternOfAccountingMonthlyReport){ enableStatisticType = false; } Index: ssts-web/src/main/webapp/homepage/exportMonitorData.jsp =================================================================== diff -u -r36746 -r37061 --- ssts-web/src/main/webapp/homepage/exportMonitorData.jsp (.../exportMonitorData.jsp) (revision 36746) +++ ssts-web/src/main/webapp/homepage/exportMonitorData.jsp (.../exportMonitorData.jsp) (revision 37061) @@ -109,7 +109,12 @@ LODOP.PREVIEW(); } function exportReportForExcel(){ - var title = document.getElementById('table').getElementsByTagName('p')[0].innerHTML; + var title = ''; + if(document.getElementById('table').getElementsByTagName('p') && document.getElementById('table').getElementsByTagName('p').length > 0){ + title = document.getElementById('table').getElementsByTagName('p')[0].innerHTML; + }else { + title = document.getElementById('title').innerText; + } if (isIE()) { var fileName = title + '.xls'; var tableHtml = ''; @@ -125,7 +130,10 @@ } else { var is2Column = document.getElementById('is2Column').value; var widthStr = document.getElementById('widthStr').value; - var widthArr = widthStr.split(','); + var widthArr = [] + if(widthStr !== ''){ + widthArr = widthStr.split(','); + } XSExport.excelExport( document.getElementById('table'), title,
"+title+"
明细科室结算科室类型
"+title+"
" + headerTitle[i].displayName + "
" + headerColumn[i].name + "
" + thirdChildren[z] + "总价" + thirdChildren[z] + "总数量
"+title+"
" + headerTitle[i].displayName + "
" + headerColumn[i].displayName + "