Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js =================================================================== diff -u -r16021 -r16035 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 16021) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 16035) @@ -1107,6 +1107,25 @@ {name : 'interruptOptType'}, {name : 'quatifyMonitoryId'} ]); + +/** + * 不做监测目前只关心"生物监测"其实还有"物理监测"和"化学监测" + */ +function notDoMonitor() { + top.Ext.getCmp('physicsResult').setValue("无"); + top.Ext.getCmp('chemistryResult').setValue("无"); + top.Ext.getCmp('biologyResult').setValue("无"); + top.Ext.getCmp('physicsResult').disable(); + top.Ext.getCmp('chemistryResult').disable(); + top.Ext.getCmp('biologyResult').disable(); + + top.Ext.getCmp('biologicalMonitoringStartDate').disable(); + top.Ext.getCmp('biologicalMonitoringEndDate').disable(); + top.Ext.getCmp('monitorCheckerCode').disable(); + top.Ext.getCmp('monitorChecker').disable(); + top.Ext.getCmp('monitorUser').disable(); +} + //参数reSterilization true:重新灭菌 function addAndEditSterilizationRecord(id,currentStatus,reSterilization) { tousseItemCountJsonStore = new Ext.data.Store({ @@ -2381,27 +2400,21 @@ } }); + var isIncludeForeignTousse = false; //此灭菌记录是否包含外来器械包 if(id != null && id > 0){ var t_amount = action.result.data.tousseAmount; var f_amount = action.result.data.foreignTousseAmount; var d_amount = action.result.data.dressingTousseAmount; var p_amount = action.result.data.proxyTousseAmount; var r_amount = action.result.data.reviewedBasketAmount; + if (f_amount) { + isIncludeForeignTousse = true; + } top.Ext.getCmp('typeTotalAmount').setText("篮筐:"+r_amount+" ,器械包:"+t_amount+" ,敷料包:"+d_amount+" ,外来器械包:"+f_amount+", 代理灭菌包:"+p_amount); } if(action.result.data.status != statusEnd){ //还没灭菌完成 - top.Ext.getCmp('physicsResult').setValue("无"); - top.Ext.getCmp('chemistryResult').setValue("无"); - top.Ext.getCmp('biologyResult').setValue("无"); - top.Ext.getCmp('physicsResult').disable(); - top.Ext.getCmp('chemistryResult').disable(); - top.Ext.getCmp('biologyResult').disable(); - - top.Ext.getCmp('biologicalMonitoringEndDate').disable(); - top.Ext.getCmp('monitorCheckerCode').disable(); - top.Ext.getCmp('monitorChecker').disable(); - top.Ext.getCmp('monitorUser').disable(); + notDoMonitor(); if(action.result.data.status == statusFailure && reSterilization == false){ top.Ext.getCmp('monitorBtn').show(); top.Ext.getCmp('saveBtn').hide(); @@ -2421,26 +2434,27 @@ top.Ext.getCmp('biologicalMonitoringStartDate').setValue(formatDateYear(biologicalMonitoringStartDate)); //设置生物监测的开始时间 top.Ext.getCmp('biologicalMonitoringEndDate').setValue(formatDateYear(action.result.data.biologicalMonitoringEndDate)); //设置生物监测的结束时间 } else { - top.Ext.getCmp('physicsResult').setValue("合格"); - top.Ext.getCmp('chemistryResult').setValue("合格"); - top.Ext.getCmp('biologyResult').setValue("合格"); - top.Ext.getCmp('biologicalMonitoringStartDate').setValue(top.Ext.getCmp('endDate').getValue()); + if (isIncludeForeignTousse) { //没有添加过生物监测的,并且此灭菌记录有外来器械包才做生物监测 + top.Ext.getCmp('physicsResult').setValue("合格"); + top.Ext.getCmp('chemistryResult').setValue("合格"); + top.Ext.getCmp('biologyResult').setValue("合格"); + top.Ext.getCmp('biologicalMonitoringStartDate').setValue(top.Ext.getCmp('endDate').getValue()); + + var temp = top.Ext.getCmp('biologicalMonitoringStartDate').getValue().getTime() + _biologicalMonitoringTime; + top.Ext.getCmp('biologicalMonitoringEndDate').setValue(new Date(temp)); + top.Ext.getCmp('monitorUser').setValue(userName); + } else { + notDoMonitor(); + } - var temp = top.Ext.getCmp('biologicalMonitoringStartDate').getValue().getTime() + _biologicalMonitoringTime; - top.Ext.getCmp('biologicalMonitoringEndDate').setValue(new Date(temp)); } - - if (!action.result.data.monitorUser) { - top.Ext.getCmp('monitorUser').setValue(userName); - } top.Ext.getCmp('monitorBtn').show(); top.Ext.getCmp('saveBtn').hide(); disableItems(); } if(id == 0) { - if(scanUser == true) - { + if(scanUser == true){ top.Ext.getCmp('sterilizationUser').setValue(''); } }