Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js =================================================================== diff -u -r40379 -r40402 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40379) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40402) @@ -318,6 +318,7 @@ var amount1 = 0; var amount2 = 0; var amount3 = 0; + var sumTdHtml = ''; for (var dateTime in MapToObject(tableBody)) { var dateTimeRowspan = Object.keys(tableBody[dateTime]).length; if (dateMap[dateTime]) { @@ -449,8 +450,27 @@ } } if (dateTime == '合计') { + sumTdHtml += tdHtml; + } + } + if (sstsConfig.extensionsConfigOfQualityMonitoring) { + var summaryHidden = true; + var summaryTitle = '材料数量汇总'; + for (var i = 0; i < sstsConfig.extensionsConfigOfQualityMonitoring.length; i++) { + var fieldName = sstsConfig.extensionsConfigOfQualityMonitoring[i].fieldName || ''; + var title = sstsConfig.extensionsConfigOfQualityMonitoring[i].title || ''; + if (fieldName == 'summaryOfMaterialQuantities') { + summaryHidden = false; + summaryTitle = title || '材料数量汇总'; + } + } + var materialSumAmount = 0; + for (var i = 0; i < result.materialSum.length; i++) { + materialSumAmount = result.materialSum[0].amount; + } + if (!summaryHidden) { tableHtml += ""; - tableHtml += "" + dateTime + ""; + tableHtml += "" + summaryTitle + ""; if (result.scope !== '无' && result.scope !== '' && (result.scope == '灭菌炉记录' && result.dataType == '监测范围为灭菌炉记录的定期监测数据')) { tableHtml += ""; } @@ -462,19 +482,76 @@ } if (result.scope == "材料和器械包") { tableHtml += ""; - tableHtml += "" + amount1 + ""; - tableHtml += "" + amount2 + ""; + tableHtml += "" + materialSumAmount + ""; } else if (result.scope == "器械包") { - tableHtml += "" + amount1 + ""; + tableHtml += "" + materialSumAmount + ""; } else if (result.scope == "材料") { - tableHtml += "" + amount2 + ""; + tableHtml += "" + materialSumAmount + ""; } - tableHtml += tdHtml; + tableHtml += ""; + tableHtml += ""; + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { + tableHtml += ""; + } + if (tableHeader1.length > 0) { + for (var i = 0; i < tableHeader1.length; i++) { + if (tableHeaderMap[tableHeader1[i]]) { + var options = tableHeaderMap[tableHeader1[i]]; + var answerHtml = ''; + for (var j = 0; j < options.length; j++) { + var questionName = tableHeader1[i]; + questionName = questionName.split('-_-').length > 1 ? questionName.split('-_-')[0] : questionName; + var option = options[j]; + for (var k = 0; k < result.materialSum.length; k++) { + var newQuestionName = result.materialSum[k].questionName; + var newOption = result.materialSum[k].option; + var answer = result.materialSum[k].answer; + if (newQuestionName == questionName && newOption == option) { + if (answerHtml == '') { + answerHtml += option + 'x' + answer; + } else { + answerHtml += '、' + option + 'x' + answer; + } + continue + } + } + } + tableHtml += "" + answerHtml + ""; + } + } + } //BJCYZXYYY-19:添加备注 tableHtml += ""; tableHtml += ""; } } + if (sumTdHtml !== '') { + tableHtml += ""; + tableHtml += "合计"; + if (result.scope !== '无' && result.scope !== '' && (result.scope == '灭菌炉记录' && result.dataType == '监测范围为灭菌炉记录的定期监测数据')) { + tableHtml += ""; + } + if (result.scope == "材料和器械包") { + tableHtml += ""; + } + if (result.fixedColumnNames.indexOf('器械包材料总件数') >= 0) { + tableHtml += ""; + } + if (result.scope == "材料和器械包") { + tableHtml += ""; + tableHtml += "" + amount1 + ""; + tableHtml += "" + amount2 + ""; + } else if (result.scope == "器械包") { + tableHtml += "" + amount1 + ""; + } else if (result.scope == "材料") { + tableHtml += "" + amount2 + ""; + } + tableHtml += sumTdHtml; + //BJCYZXYYY-19:添加备注 + tableHtml += ""; + tableHtml += ""; + } + tableHtml += ""; tableHtml += ""; return tableHtml;