Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js =================================================================== diff -u -r40435 -r40469 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40435) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40469) @@ -81,6 +81,26 @@ return result; } +//PYQZYY-207:扩展字段 +var summaryHidden = true; +var summaryTitle = '材料数量汇总'; +var washingRrejectionRateHidden = true; +var washingRrejectionRateTitle = '清洗不合格率'; +if (sstsConfig.extensionsConfigOfQualityMonitoring) { + 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 || '材料数量汇总'; + } + if (fieldName == 'washingRrejectionRate') { + washingRrejectionRateHidden = false; + washingRrejectionRateTitle = title || '清洗不合格率'; + } + } +} + //获取表头列数组和总宽度 function getTableHeaderAndWidth(fixedColumnNames, dynamicColumn, subTable_FormDefinitionItemArray) { //固定表头列 @@ -287,6 +307,10 @@ width = 125 } else if (arr[j] == "当次炉次灭菌总包数") { width = 115 + } else if (arr[j] == "当天清洗外来器械件数") { + width = 100 + } else if (arr[j] == "当天清洗不合格率") { + width = 100 } widthArr.push(width); if (item.split('-_-')[0] !== '-') { @@ -390,8 +414,16 @@ if (result.washAmountMap && result.washAmountMap[dateTime] && result.washAmountMap[dateTime]['当天清洗外来器械件数']) { newAnswerAmount = result.washAmountMap[dateTime]['当天清洗外来器械件数']; } - tdHtml += "" + newAnswerAmount + ""; + tdHtml += "" + newAnswerAmount + ""; } + } else if (option == washingRrejectionRateTitle && dateTime !== '合计') { + if (dateTimeIndex == 1) { + var newAnswerAmount = 0; + if (result.washAmountMap && result.washAmountMap[dateTime] && result.washAmountMap[dateTime]['unQualityRatio']) { + newAnswerAmount = result.washAmountMap[dateTime]['unQualityRatio']; + } + tdHtml += "" + newAnswerAmount + ""; + } } else { tdHtml += "" + answer + ""; } @@ -453,79 +485,67 @@ 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 || '材料数量汇总'; + if (!summaryHidden && result.scope !== '无' && result.scope !== '') { + var materialSumAmount = 0; + if (result.materialSum && result.materialSum.length > 0) { + for (var i = 0; i < result.materialSum.length; i++) { + materialSumAmount = result.materialSum[0].amount; } } - if (!summaryHidden && result.scope !== '无' && result.scope !== '') { - var materialSumAmount = 0; - if (result.materialSum && result.materialSum.length > 0) { - for (var i = 0; i < result.materialSum.length; i++) { - materialSumAmount = result.materialSum[0].amount; - } - } - tableHtml += ""; - tableHtml += "" + summaryTitle + ""; - 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 += "" + materialSumAmount + ""; - } else if (result.scope == "器械包") { - tableHtml += "" + materialSumAmount + ""; - } else if (result.scope == "材料") { - tableHtml += "" + materialSumAmount + ""; - } + tableHtml += ""; + tableHtml += "" + summaryTitle + ""; + if (result.scope !== '无' && result.scope !== '' && (result.scope == '灭菌炉记录' && result.dataType == '监测范围为灭菌炉记录的定期监测数据')) { tableHtml += ""; + } + if (result.scope == "材料和器械包") { 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 + } + if (result.fixedColumnNames.indexOf('器械包材料总件数') >= 0) { + tableHtml += ""; + } + if (result.scope == "材料和器械包") { + tableHtml += ""; + tableHtml += "" + materialSumAmount + ""; + } else if (result.scope == "器械包") { + tableHtml += "" + materialSumAmount + ""; + } else if (result.scope == "材料") { + tableHtml += "" + materialSumAmount + ""; + } + 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 + ""; } + tableHtml += "" + answerHtml + ""; } } - //BJCYZXYYY-19:添加备注 - tableHtml += ""; - tableHtml += ""; } + //BJCYZXYYY-19:添加备注 + tableHtml += ""; + tableHtml += ""; } if (sumTdHtml !== '') { tableHtml += "";