Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js
===================================================================
diff -u -r40432 -r40433
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40432)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40433)
@@ -466,7 +466,7 @@
}
if (!summaryHidden) {
var materialSumAmount = 0;
- if(result.materialSum && result.materialSum.length > 0){
+ if (result.materialSum && result.materialSum.length > 0) {
for (var i = 0; i < result.materialSum.length; i++) {
materialSumAmount = result.materialSum[0].amount;
}
@@ -567,6 +567,7 @@
var amount1 = 0;
var amount2 = 0;
var amount3 = 0;
+ var sumTdHtml = '';
for (var dateTime in MapToObject(tableBody)) {
var index = 1;
for (var goodsName in MapToObject(tableBody[dateTime])) {
@@ -683,29 +684,103 @@
index++
}
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 + " | ";
- if (result.scope !== '无' && result.scope !== '' && result.scope !== '灭菌炉记录') {
+ tableHtml += "" + summaryTitle + " | ";
+ tableHtml += " | ";
+ if (result.scope == "材料和器械包") {
tableHtml += " | ";
}
- if (title.indexOf('无菌包质量抽查登记表') >= 0) {
- tableHtml += " | ";
- tableHtml += " | ";
+ if (result.fixedColumnNames.indexOf('器械包材料总件数') >= 0) {
+ tableHtml += " | ";
}
if (result.scope == "材料和器械包") {
- tableHtml += "" + amount1 + " | ";
- tableHtml += "" + amount2 + " | ";
+ tableHtml += " | ";
+ 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 += "合计 | ";
+ 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 += "";
return tableHtml;
}