Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r25668 -r25758 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 25668) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 25758) @@ -1,5 +1,7 @@ var tousseArray = new Array(); var deleteTousseItemArray = new Array(); +// 科室绑定的篮筐数量 +var departBindingBasketAmount = 0; /** * 不回收的器械包的集合。这个是由绑定带出来的器械包,并且不回收,在回收这里本来是不做处理的。现在要能修改原来的申请数量,相关的还有装配任务 */ @@ -1080,6 +1082,42 @@ function showSelectTousseDiscardCauseWin(){ return openModalWindow(WWWROOT+"/disinfectsystem/recyclingApplication/selectTousseDiscardCause.jsp?time="+new Date(), "选择回收员", "760", "400"); } +arrayGood = [];//保存已清洗或者已装配 +var quantity = 0;//保存当前已清洗或者已装配的次数 +function loadgin(msg,containerStatus,d){ + + $("#dialogConfirm").dialog({ + resizable: false, + height:325, + width:600, + modal: true, + open: function() { + $("#confirmMsg").text("【"+msg.basket.containerName + "】当前状态为【" + containerStatus + "】,还有物品未装配,是否继续使用该篮筐?"); + }, + close: function() { + $("#confirmMsg").text(""); + }, + buttons: { + "是": function() { + addBasketElement(msg.basket); + $( this ).dialog( "close" ); + loaddialogConfirm(d+1); + }, + "否": function() { + $( this ).dialog( "close" ); + loaddialogConfirm(d+1); + } + } + }); +} + +function loaddialogConfirm(d){ + var loadginGoodLength = arrayGood.length; + if(d <= (loadginGoodLength-1)){ + var containerStatus = arrayGood[d].containerStatus; + loadgin(arrayGood[d].msg,containerStatus,d); + } +} /** * 根据扫描的条码加载对应的对象. * @param barcodeTemp @@ -1152,28 +1190,12 @@ }else if(msg.basket != null){ //不装配的篮筐不能回收扫描 var containerStatus = msg.basket.containerStatus; + quantity++; if(containerStatus == "清洗完成" || containerStatus == "清洗中"){ - $("#dialogConfirm").dialog({ - resizable: false, - height:310, - width:600, - modal: true, - open: function() { - $("#confirmMsg").text("【"+msg.basket.containerName + "】当前状态为【" + containerStatus + "】,还有物品未装配,是否继续使用该篮筐?"); - }, - close: function() { - $("#confirmMsg").text(""); - }, - buttons: { - "是": function() { - addBasketElement(msg.basket); - $( this ).dialog( "close" ); - }, - "否": function() { - $( this ).dialog( "close" ); - } - } - }); + arrayGood.push({msg:msg,containerStatus:containerStatus}); + if(quantity == departBindingBasketAmount){ + loaddialogConfirm(0); + } }else{ addBasketElement(msg.basket); } @@ -1363,6 +1385,7 @@ }else{ alertDiv('没有找到该条码所对应的信息。'); } + // loadgin(msg,containerStatus) $("#codeScan").val(""); barcodeGloble = ""; }, @@ -3702,12 +3725,13 @@ url: WWWROOT + '/disinfectSystem/baseData/containerAction!getWashContainerByBindDepartCode.do', data:'bindDepartCode=' +departCode, dataType:'json', - success:function(retuls){ - if(retuls != ''){ + success:function(result){ + if(result != ''){ $('#scanContainerBarcodeTipUl').hide(); $("#basketsUl").empty(); - for (var i =0 ;i < retuls.length; i++){ - loadBarcodeDevice(retuls[i].barcode); + departBindingBasketAmount = result.length; + for (var i =0 ;i < result.length; i++){ + loadBarcodeDevice(result[i].barcode); } }else{ $("#basketsUl").empty(); @@ -3764,6 +3788,7 @@ } }); } + arrayGood = []; if(isTousseItemTableEmpty()){ processFun(); }else{ @@ -4208,6 +4233,7 @@ $("#tousseItemTable").empty(); $("#basketsUl").empty(); + // 根据申请单的状态,控制按钮的显示与隐藏 if(record.status == '未确认'){ $('#confirmBtnTd').show(); }else if(record.status == '已确认'){ @@ -4223,15 +4249,14 @@ } var row = 0; //快速回收后未回收的包 - var recyclingApplication = record.recyclingApplication; - if(record.items != null){ + if(record.items != null && record.items.length > 0){ canTerminateTousseItemIds = []; for(var i = 0 ; i< record.items.length ; i++){ var tousseItem = record.items[i]; var applyAmount = tousseItem.amount; - if(recyclingApplication != null && recyclingApplication.applicationItems != null){ - var applyItems = recyclingApplication.applicationItems; + if(application != null && application.applicationItems != null){ + var applyItems = application.applicationItems; for(var n = 0;n < applyItems.length;n++){ if(applyItems[n].tousseDefinitionId == tousseItem.tousseDefinitionId){ applyAmount = applyItems[n].amount; @@ -4329,11 +4354,11 @@ var deliverStatus = null; var endStatus = null; - if (recyclingApplication != null) { - recyclingStatus = recyclingApplication.recyclingStatus; - applicationitems = recyclingApplication.applicationItems; - deliverStatus = recyclingApplication.deliverStatus; - endStatus = recyclingApplication.endStatus; + if (application != null) { + recyclingStatus = application.recyclingStatus; + applicationitems = application.applicationItems; + deliverStatus = application.deliverStatus; + endStatus = application.endStatus; } if(applicationitems != null){ @@ -4359,6 +4384,11 @@ if(!recyclingAmount){ recyclingAmount = applicationitems[i].amount; } + // 如果状态为已清点,则将回收数量改为已清点的数量,显示在界面上 + if (recyclingStatus == '已清点'){ + recyclingAmount = applicationitems[i].tallyAmount; + } + var toussItem = { row: row, tousseItemId: '',