Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js =================================================================== diff -u -r40469 -r40482 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40469) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 40482) @@ -254,6 +254,16 @@ if (!tableHeaderMap[tableHeader[i]]) { rowspan = 2; is2Column = true; + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2 && tableHeader[i] == '合格') { + rowspan = 1; + if (result.scope == "材料和器械包") { + colspan = 2; + } else if (result.scope == "器械包") { + colspan = 1; + } else if (result.scope == "材料") { + colspan = 1; + } + } } else { colspan = tableHeaderMap[tableHeader[i]].length; } @@ -290,6 +300,16 @@ tableHtml += ""; if (Object.keys(tableHeaderMap).length > 0) { tableHtml += ""; + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2) { + if (result.scope == "材料和器械包") { + tableHtml += "包数"; + tableHtml += "件数"; + } else if (result.scope == "器械包") { + tableHtml += "包数"; + } else if (result.scope == "材料") { + tableHtml += "件数"; + } + } for (var i = 0; i < tableHeader1.length; i++) { var item = tableHeader1[i]; if (tableHeaderMap[item]) { @@ -342,6 +362,7 @@ var amount1 = 0; var amount2 = 0; var amount3 = 0; + var amount4 = 0; var sumTdHtml = ''; for (var dateTime in MapToObject(tableBody)) { var dateTimeRowspan = Object.keys(tableBody[dateTime]).length; @@ -368,7 +389,7 @@ } } tdHtml += "" + arr[0].createUserName + ""; - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { var value = ''; if (arr[0].isQualified == '是') { value = '√'; @@ -379,6 +400,50 @@ value = ''; } tdHtml += "" + value + ""; + } else if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2) { + var qualifiedAmount = ''; + var qualifiedRegisterMaterialAmount = ''; + if (arr[0].isQualified == '是') { + qualifiedAmount = newAmount; + qualifiedRegisterMaterialAmount = newRegisterMaterialAmount; + } else if (dateTime == '合计') { + qualifiedAmount = amount3; + qualifiedRegisterMaterialAmount = amount4; + } + + if (result.scope == "材料和器械包") { + if (rowspan > 1 && index == 1) { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } else if (rowspan == 1) { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } + tdHtml += "" + qualifiedRegisterMaterialAmount + ""; + if (arr[0].isQualified == '是') { + amount4 += qualifiedRegisterMaterialAmount; + } + } else if (result.scope == "器械包") { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } else if (result.scope == "材料") { + tdHtml += "" + qualifiedRegisterMaterialAmount + ""; + if (arr[0].isQualified == '是') { + amount4 += qualifiedRegisterMaterialAmount; + } + } else { + var value = ''; + if (arr[0].isQualified == '是') { + value = '√'; + } + tdHtml += "" + value + ""; + } } if (tableHeader1.length > 0) { for (var i = 0; i < tableHeader1.length; i++) { @@ -513,8 +578,19 @@ } tableHtml += ""; tableHtml += ""; - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { tableHtml += ""; + } else if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2) { + if (result.scope == "材料和器械包") { + tableHtml += ""; + tableHtml += ""; + } else if (result.scope == "器械包") { + tableHtml += ""; + } else if (result.scope == "材料") { + tableHtml += ""; + } else { + tableHtml += ""; + } } if (tableHeader1.length > 0) { for (var i = 0; i < tableHeader1.length; i++) { @@ -525,17 +601,19 @@ 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; + if (result.materialSum && result.materialSum.length > 0) { + 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 } - continue } } } @@ -587,6 +665,7 @@ var amount1 = 0; var amount2 = 0; var amount3 = 0; + var amount4 = 0; var sumTdHtml = ''; for (var dateTime in MapToObject(tableBody)) { var index = 1; @@ -637,7 +716,7 @@ tdHtml += "" + arr[0].positionMsg + ""; } tdHtml += "" + arr[0].createUserName + ""; - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { var value = ''; if (arr[0].isQualified == '是') { value = '√'; @@ -648,6 +727,50 @@ value = ''; } tdHtml += "" + value + ""; + } else if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2) { + var qualifiedAmount = ''; + var qualifiedRegisterMaterialAmount = ''; + if (arr[0].isQualified == '是') { + qualifiedAmount = newAmount; + qualifiedRegisterMaterialAmount = newRegisterMaterialAmount; + } else if (dateTime == '合计') { + qualifiedAmount = amount3; + qualifiedRegisterMaterialAmount = amount4; + } + + if (result.scope == "材料和器械包") { + if (rowspan > 1 && index == 1) { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } else if (rowspan == 1) { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } + tdHtml += "" + qualifiedRegisterMaterialAmount + ""; + if (arr[0].isQualified == '是') { + amount4 += qualifiedRegisterMaterialAmount; + } + } else if (result.scope == "器械包") { + tdHtml += "" + qualifiedAmount + ""; + if (arr[0].isQualified == '是') { + amount3 += qualifiedAmount; + } + } else if (result.scope == "材料") { + tdHtml += "" + qualifiedRegisterMaterialAmount + ""; + if (arr[0].isQualified == '是') { + amount4 += qualifiedRegisterMaterialAmount; + } + } else { + var value = ''; + if (arr[0].isQualified == '是') { + value = '√'; + } + tdHtml += "" + value + ""; + } } if (tableHeader1.length > 0) { for (var i = 0; i < tableHeader1.length; i++) { @@ -746,8 +869,19 @@ } tableHtml += ""; tableHtml += ""; - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { tableHtml += ""; + } else if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 2) { + if (result.scope == "材料和器械包") { + tableHtml += ""; + tableHtml += ""; + } else if (result.scope == "器械包") { + tableHtml += ""; + } else if (result.scope == "材料") { + tableHtml += ""; + } else { + tableHtml += ""; + } } if (tableHeader1.length > 0) { for (var i = 0; i < tableHeader1.length; i++) { @@ -758,17 +892,19 @@ 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; + if (result.materialSum && result.materialSum.length > 0) { + 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 } - continue } } } Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r40474 -r40482 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40474) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40482) @@ -2130,7 +2130,7 @@ top.Ext.getCmp('addQualityMonitoringForm').remove('itemsFieldSet'); hideExtractCheckMaterial(); //BJCYZXYYY-10:添加时新增“合格信息”区域 - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { top.Ext.getCmp('qualifiedInformationSet').setVisible(false); } top.Ext.getCmp('addQualityMonitoringForm').doLayout(); @@ -2549,17 +2549,21 @@ } top.Ext.getCmp('handleDepart').setValue(result.data.handleDepart); //BJCYZXYYY-10:添加时新增“合格信息”区域(HZSRMYY-89改进) - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { if (isQualified == '是') { - selectEmptyDo(); + if(sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1){ + selectEmptyDo(); + } top.Ext.getCmp('qualifiedInformationSet').setVisible(true); } else if (isQualified == '否') { top.Ext.getCmp('isQualified').setValue('否'); return } else { var recordQualifiedInformation = result.data.recordQualifiedInformation; if (recordQualifiedInformation == '是') { - selectEmptyDo(); + if(sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1){ + selectEmptyDo(); + } top.Ext.getCmp('qualifiedInformationSet').setVisible(true); } else { top.Ext.getCmp('qualifiedInformationSet').setVisible(false); @@ -5208,18 +5212,15 @@ //BJCYZXYYY-10:添加时新增“合格信息”区域 var isQualified = result.data.isQualified || '否'; //BJCYZXYYY-10:添加时新增“合格信息”区域(HZSRMYY-89改进) - if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1) { - var recordQualifiedInformation = result.data.recordRecycleInformation; + if (sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction) { var isQualified = result.data.isQualified; top.Ext.getCmp('isQualified').setValue(isQualified); - if (recordQualifiedInformation == '是') { - if (isQualified == '是') { + if (isQualified == '是') { + if(sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction == 1){ selectEmptyDo(); top.Ext.getCmp('qualifiedInformationSet').setVisible(true); - } else if (isQualified == '否') { - top.Ext.getCmp('qualifiedInformationSet').setVisible(true); } - } else { + } else if (isQualified == '否') { top.Ext.getCmp('qualifiedInformationSet').setVisible(false); } } else {