Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r28705 -r28709 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 28705) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 28709) @@ -9,6 +9,7 @@ var newAmount = 0; var isDelete = false; var saveBasketsArr = []; +var shareDeparts = []; /** * 不回收的器械包的集合。这个是由绑定带出来的器械包,并且不回收,在回收这里本来是不做处理的。现在要能修改原来的申请数量,相关的还有装配任务 */ @@ -747,7 +748,8 @@ }, error:function(msg){ } - }); + }); + shareDeparts = []; return true; } @@ -1698,10 +1700,23 @@ } }else{ //扫描标识牌实例条码 barcode = msg.idCardInstance.barcode; - if($('#depart').attr('value') == ''){ + var departValue = $('#depart').attr('value'); + if(departValue == ''){ $('#depart').val(msg.tousseInstance.locationForDisplay) $('#departCode').val(msg.tousseInstance.location) } + if(msg.shareDeparts.length > 0){ + if(msg.shareDeparts.indexOf(departValue) == -1 && departValue !== ''){ + alertDiv('该器械包不属于该科室。'); + return; + } + shareDeparts = msg.shareDeparts; + }else { + if(!isUndefinedOrNullOrEmpty(tousseDepart) && $('#depart').attr('value') != tousseDepart && msg.tousseInstance.status != '已废弃'){ + alertDiv('该器械包不属于该科室。'); + return; + } + } var tousseDepart = isUndefinedOrNullOrEmpty(msg.tousseInstance.locationForDisplay2)?msg.tousseInstance.locationForDisplay:msg.tousseInstance.locationForDisplay2; // 对于已废弃的包,不检查其位置和所属科室的信息 var ti = msg.tousseInstance; @@ -5124,6 +5139,12 @@ }) } function selectDepart(departName,departCode){ + if(shareDeparts.length > 0){ + if(shareDeparts.indexOf(departName) == -1){ + alertDiv('该科室跟器械包的科室为共用科室,请删除器械包后再切换'); + return; + } + } var oldValue = document.getElementById('departCode').value; //加载科室申领模板 if(params_id == '' && params_appId == '' && sstsConfig.isLoadApplyTemplateForAddRecycleRecord == true){