Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r29668 -r29669 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 29668) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 29669) @@ -2857,9 +2857,8 @@ if($(this).attr('type') == 'hidden'){ var hideStr = $(this).val(); var json = JSON.parse(hideStr); - var delButton = $(this).next().next().next().next().find('a'); - - if(json.tousseName == tousseName){ + if(json.tousseName == tousseName && (json.tousseInstanceBarcode || '') == ''){ + var delButton = $(this).next().next().next().next().find('a'); var count = parseInt($(this).next().next().next().text()); var recycleCount = count+recycleAmount; if(tousseLenght == 1){ @@ -2875,20 +2874,18 @@ deleteBasketItem(delButton,0); } }else { - if(json.classifiedItemId == ''){ - if(recycleCount > 0){ - $(this).next().next().next().html(recycleCount); - json.amount = recycleCount; - $(this).val(JSON.stringify(json)); - deleteBasketItem(delButton,count); - return false; - }else { - json.amount = 0-count; - $(this).val(JSON.stringify(json)); - deleteBasketItem(delButton,0); - recycleCount1 = recycleCount; - return false; - } + if(recycleCount > 0){ + $(this).next().next().next().html(recycleCount); + json.amount = recycleCount; + $(this).val(JSON.stringify(json)); + deleteBasketItem(delButton,count); + return false; + }else { + json.amount = 0-count; + $(this).val(JSON.stringify(json)); + deleteBasketItem(delButton,0); + recycleCount1 = recycleCount; + return false; } } } @@ -3140,7 +3137,6 @@ //将器械包放入篮筐中,入筐 function putTousseInTheBasket(row,recycleAmountNew){ var inputSuccess = false; - newAmount = 0; if($('#basketsUl').children().length > 0){ var basketsObj = $('#basketsUl').children().eq(0).find('input[type=hidden]').val(); basketsObj = JSON.parse(basketsObj); @@ -3171,7 +3167,6 @@ return false; } var amount = recycleAmountNew || recycleAmount - parseInt($('#loadedAmount'+row).val(),10); - newAmount = amount; //回收数量扣减入筐操作 如果已经入筐就不能入筐,只能是手动从篮筐里面删除,因为程序不晓得从哪个篮筐里面扣减 if(amount > 9999){ @@ -3229,7 +3224,6 @@ return; } } - var orgUnitName = $('#depart').val(); if(amount == 0){ alertDiv('没有可以放入篮筐的器械包。'); @@ -3291,14 +3285,10 @@ if((0-amount)>(loadedAmount-sessionTousseInstance[item].idsArray1.length)){ alertDiv('有'+sessionTousseInstance[item].idsArray1.length+'个包实例条码已入筐,最多只能减少'+(loadedAmount-sessionTousseInstance[item].idsArray1.length)+'个'); return - }else { - tousseIntoBasketFunction("",tousseDefinitionID,tousseName,amount,isCleanedEntirely,orgUnitName,"","",tousseType,row,isIDCard,1,{}); } - }else { - tousseIntoBasketFunction("",tousseDefinitionID,tousseName,amount,isCleanedEntirely,orgUnitName,"","",tousseType,row,isIDCard,1,{}); } + tousseIntoBasketFunction("",tousseDefinitionID,tousseName,amount,isCleanedEntirely,orgUnitName,"","",tousseType,row,isIDCard,1,{}); } - newAmount = 0; } setTousseItemLoadedAmountCss(row); refreshAllBasketTotalNum(); @@ -6238,7 +6228,9 @@ isIdCard = true; } createBasketUiElement(basket.containerBarcode,basket.id,basket.containerName,washClassifyType,basket.sequence,isIdCard) - + + var barcodeArray1 = []; + var idsArray1 = []; for(var j = 0 ; j < basket.classfiedItems.length ; j++){ var ci = record.classifyBaskets[i].classfiedItems[j]; var containerBarcode = record.classifyBaskets[i].containerBarcode; @@ -6301,7 +6293,25 @@ var json = getBasketItemJSON(ci.id,"器械包",ci.orgUnitName,ci.tousseDefinition.name,"",ci.amount,ci.tousseAmountForMaterial,ci.idCardBarcode,ci.tousseDefinitionID,ci.basketGroupBarcodes,putBasketMaxAmount,tousseType,ci.lastTousseInstanceId,ci.tousseInstanceBarcode,washClassifyType); $('dl[class="sed clearfix"]:eq(0)').find("input:first").val(json); - } + } + if((ci.tousseInstanceBarcode || '') !== ''){ + if(sessionTousseInstance.hasOwnProperty(ci.tousseDefinitionID)){ + sessionTousseInstance[ci.tousseDefinitionID].amount++; + sessionTousseInstance[ci.tousseDefinitionID].barcodeArray1.push(ci.tousseInstanceBarcode); + sessionTousseInstance[ci.tousseDefinitionID].idsArray1.push(ci.lastTousseInstanceId); + }else { + barcodeArray1.push(ci.tousseInstanceBarcode); + idsArray1.push(ci.lastTousseInstanceId); + sessionTousseInstance[ci.tousseDefinitionID] = { + name:ci.name, + amount:1,//总数量 + barcodeArray:[],//未入筐的条码 + idsArray:[],//未入筐的id + barcodeArray1:barcodeArray1,//已入筐的条码 + idsArray1:idsArray1//已入筐的id + } + } + } } } } Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/commonRecycle.js =================================================================== diff -u -r28022 -r29669 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/commonRecycle.js (.../commonRecycle.js) (revision 28022) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/commonRecycle.js (.../commonRecycle.js) (revision 29669) @@ -4,7 +4,6 @@ var recycleAmount = $('#recycleAmount'+row).val() == ''?0:parseInt($('#recycleAmount'+row).val(),10)+1; if (recycleAmount <= MAX_RECYCLE_AMOUNT){ $('#recycleAmount'+row).val(recycleAmount); - changeRecycleAmount(row); } else{ showMessage("最大回收数量为" + MAX_RECYCLE_AMOUNT + ",不能大于该数量!");