Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r16725 -r16977 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 16725) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 16977) @@ -412,6 +412,12 @@ var result = Ext.decode(response.responseText); if(result.success){ top.Ext.getCmp('scope').setValue(result.data.scope); + if(sstsConfig.hasOwnProperty('isInspectScopeHideTousseMsg') && sstsConfig.isInspectScopeHideTousseMsg){ + if("无" == result.data.scope){ + // 如果监测范围为无,隐藏器械包信息 + top.Ext.getCmp('tousseInfoFieldSet').setVisible(false); + } + } top.Ext.getCmp('optionAmount').setValue(''); var baseInfoPanel = top.Ext.getCmp('baseInfoPanel'); if("是" == result.data.isInsertBasket){ @@ -1602,6 +1608,12 @@ }else{ top.Ext.getCmp("formDefinitionId").setValue(result.data.formDefinition.id); } + if(sstsConfig.hasOwnProperty('isInspectScopeHideTousseMsg') && sstsConfig.isInspectScopeHideTousseMsg){ + if("无" == result.data.scope){ + // 如果监测范围为无,隐藏器械包信息 + top.Ext.getCmp('tousseInfoFieldSet').setVisible(false); + } + } top.Ext.getCmp('responsibilityPart').setValue(result.data.responsibilityPart); top.Ext.getCmp('dateTime').setValue(Ext.util.Format.date(new Date(result.data.dateTime.time),"Y-m-d H:i")); top.Ext.getCmp('material').setValue(result.data.material); Index: ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js =================================================================== diff -u -r16514 -r16977 --- ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 16514) +++ ssts-web/src/main/webapp/disinfectsystem/routineMonitoring/routineMonitoringView.js (.../routineMonitoringView.js) (revision 16977) @@ -561,6 +561,11 @@ top.Ext.getCmp('scope2').setValue(result.data.scope); top.Ext.getCmp('optionAmount2').setValue(''); var items = new Array(); + if('无' == result.data.scope){ + hideQualityMonitoringTousseMsg(); + }else{ + showQualityMonitoringTousseMsg(); + } // 如果显示炉次炉号,添加表单 if(result.data.showSterilizerNumFrequency == '是'){ items.push(createQualityMonitoringElementSterNameQW('')); @@ -966,6 +971,11 @@ top.Ext.getCmp('remark2').setValue(result.data.remark); top.Ext.getCmp('optionAmount2').setValue(''); + if('无' == result.data.scope){ + hideQualityMonitoringTousseMsg(); + }else{ + showQualityMonitoringTousseMsg(); + } // 如果显示炉次炉号,添加表单 if(result.showSterNameAndFre == '是'){ items.push(createQualityMonitoringElementSterNameQW(result.data.sterilizerName)); @@ -1017,7 +1027,32 @@ setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'dateTime2'); //(设置抽检时间,取服务器时间 cjr) } } - +/** + * 隐藏定期监测的质量监测记录的器械包信息 + */ +function hideQualityMonitoringTousseMsg(){ + top.Ext.getCmp('tempBarcode2').setVisible(false); + top.Ext.getCmp('tempBarcode2').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tousseName2').setVisible(false); + top.Ext.getCmp('tousseName2').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('material2').setVisible(false); + top.Ext.getCmp('material2').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('amount2').setVisible(false); + top.Ext.getCmp('amount2').getEl().up('.x-form-item').setDisplayed(false); +} +/** + * 显示定期监测的质量监测记录的器械包信息 + */ +function showQualityMonitoringTousseMsg(){ + top.Ext.getCmp('tempBarcode2').setVisible(true); + top.Ext.getCmp('tempBarcode2').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('tousseName2').setVisible(true); + top.Ext.getCmp('tousseName2').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('material2').setVisible(true); + top.Ext.getCmp('material2').getEl().up('.x-form-item').setDisplayed(true); + top.Ext.getCmp('amount2').setVisible(true); + top.Ext.getCmp('amount2').getEl().up('.x-form-item').setDisplayed(true); +} /* * 选择监测项下拉框的某个选项时调用 */ @@ -1078,6 +1113,9 @@ top.Ext.getCmp('repacking').setVisible(true); top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(true); } + if(result.data.scope == "无"){ + hideTousseAndMaterialMsg(); + } for(var i = 0 ; i< result.data.items.length ; i++){ var item = result.data.items[i]; if(top.Ext.getCmp('optionAmount').getValue() == null || top.Ext.getCmp('optionAmount').getValue() == ''){ @@ -1529,6 +1567,7 @@ }else{ top.Ext.getCmp("formDefinitionId").setValue(result.data.formDefinition.id); } + top.Ext.getCmp('dateTime').setValue(Ext.util.Format.date(new Date(result.data.dateTime.time),"Y-m-d H:i")); top.Ext.getCmp('material').setValue(result.data.material); top.Ext.getCmp('amount').setValue(result.data.amount); @@ -1628,6 +1667,9 @@ top.Ext.getCmp('repacking').setVisible(true); top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(true); } + if(result.data.scope == "无"){ + hideTousseAndMaterialMsg(); + } top.Ext.getCmp('addRoutineMonitoringForm').remove('itemsFieldSet'); if(items.length > 0){ @@ -1681,6 +1723,20 @@ } } +function hideTousseAndMaterialMsg(){ + top.Ext.getCmp('recycle').setVisible(false); + top.Ext.getCmp('recycle').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('repacking').setVisible(false); + top.Ext.getCmp('repacking').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tempBarcode').setVisible(false); + top.Ext.getCmp('tempBarcode').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('tousseName').setVisible(false); + top.Ext.getCmp('tousseName').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('material').setVisible(false); + top.Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(false); + top.Ext.getCmp('amount').setVisible(false); + top.Ext.getCmp('amount').getEl().up('.x-form-item').setDisplayed(false); +} function updateControlStatus(){ var tousseType = top.Ext.getCmp('tousseType').getValue(); var tousseInstanceId = top.Ext.getCmp('tousseInstanceId').getValue(); @@ -1815,12 +1871,15 @@ } } + var scope = top.Ext.getCmp('scope2').getValue(); var material = top.Ext.getCmp('material2').getValue(); var tousseName = top.Ext.getCmp('tousseName2').getRawValue(); var barcode = top.Ext.getCmp('barcode2').getValue(); - if(!material && !tousseName){ - showResult("请录入抽验器械或器械包名称"); - return false; + if('无' != scope){ + if(!material && !tousseName){ + showResult("请录入抽验器械或器械包名称"); + return false; + } } if(material){