Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recyclingErrors.jsp =================================================================== diff -u -r13518 -r13622 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recyclingErrors.jsp (.../recyclingErrors.jsp) (revision 13518) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recyclingErrors.jsp (.../recyclingErrors.jsp) (revision 13622) @@ -91,14 +91,15 @@ if(!exist){ if(amount > 0){ var item = { - recyclingErrorId: "", - tousseDefinitionID: tousseDefinitionID, - materialDefinitionId: materialDefinitionId, - materialName: materialName, - amount: amount, - errorType: errorType - }; - newJsonArray.push(item); + recyclingErrorId: "", + tousseDefinitionID: tousseDefinitionID, + materialDefinitionId: materialDefinitionId, + materialName: materialName, + amount: amount, + errorType: errorType, + intoBasketAmount : 0 + }; + newJsonArray.push(item); } } if (isErrorExist) { Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r13615 -r13622 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 13615) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 13622) @@ -208,10 +208,25 @@ } -function unloadStaff(name,amount){ +function unloadStaff(name,amount,idCardBarcode){ $('#tousseItemTable').children().first().children().each(function(i,element){ if($('#tousseName'+i).val() == name){ $('#loadedAmount'+i).val(parseInt($('#loadedAmount'+i).val(),10)-parseInt(amount,10)); + var idCard = $('#isThereIdentificationCard'+i).val(); + if(idCard == '是' && idCardBarcode == ''){ + var recyclingErrorJsonArrayStr = $('#recyclingError'+i).val(); + if(recyclingErrorJsonArrayStr != ""){ + var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); + for(var j = 0;j < recyclingErrorJsonArray.length;j++) { + if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ + var intoBasketAmount = parseInt(recyclingErrorJsonArray[j].intoBasketAmount); + recyclingErrorJsonArray[j].intoBasketAmount = intoBasketAmount - parseInt(amount); + $('#recyclingError'+i).val(JSON.stringify(recyclingErrorJsonArray)); + break; + } + } + } + } return false; } }); @@ -320,12 +335,12 @@ var tousseAmountForMaterial = item.tousseAmount; //alert(name+"--"+type+"--"+amount+"--"+tousseNameForMaterial+"--"+usebasketAmount+"--"+basketGroupNum); if(type == '材料'){ - unloadStaff(item.tousseName,tousseAmountForMaterial); + unloadStaff(item.tousseName,tousseAmountForMaterial,idCardBarcode); }else{ name = item.tousseName; var amount = item.amount; - unloadStaff(item.tousseName,amount); + unloadStaff(item.tousseName,amount,idCardBarcode); var basketId = basket.classifyBasketId; var containerBarcode = basket.barcode; @@ -561,6 +576,21 @@ checkLoadedAmount(); } +function setIdCardErrorIntoBasketAmount(row,amount){ + var recyclingErrorJsonArrayStr = $('#recyclingError'+row).val(); + if(recyclingErrorJsonArrayStr != ""){ + var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); + for(var j = 0;j < recyclingErrorJsonArray.length;j++) { + if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ + var intoBasketAmount = recyclingErrorJsonArray[j].intoBasketAmount; + recyclingErrorJsonArray[j].intoBasketAmount = parseInt(intoBasketAmount) + parseInt(amount); + $('#recyclingError'+row).val(JSON.stringify(recyclingErrorJsonArray)); + break; + } + } + } +} + function materialIntoBasket(params){ var success = true; var msg = ""; @@ -1238,17 +1268,25 @@ var recyclingErrorJsonArrayStr = $('#recyclingError'+row).val(); if(recyclingErrorJsonArrayStr != ""){ var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); + var isIdCardLost = false; for(var j = 0;j < recyclingErrorJsonArray.length;j++) { if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ - var errorAmount = recyclingErrorJsonArray[j].amount; - var tousseAmount = parseInt($('#recycleAmount'+row).val(),10); - var scannedAmount = parseInt($('#loadedAmount'+row).val(),10); - if(tousseAmount - scannedAmount != errorAmount){ + isIdCardLost = true; + var errorAmount = parseInt(recyclingErrorJsonArray[j].amount); + var intoBasketAmount = parseInt(recyclingErrorJsonArray[j].intoBasketAmount); + if(errorAmount == 0 || errorAmount == intoBasketAmount){ showMsg = $('#tousseName'+row).val()+"扫描的标识牌数量不等于回收数量,如果标识牌丢失,请在回收误差中登记丢失记录!"; + }else{ + if(errorAmount - intoBasketAmount >0){ + amount = errorAmount - intoBasketAmount; + } } break; } } + if(!isIdCardLost && amount > 0){ + showMsg = $('#tousseName'+row).val()+"扫描的标识牌数量不等于回收数量,如果标识牌丢失,请在回收误差中登记丢失记录!"; + } }else{ var tousseAmount = parseInt($('#recycleAmount'+row).val(),10); var scannedAmount = parseInt($('#loadedAmount'+row).val(),10); @@ -1301,6 +1339,10 @@ }; addBasketItemElement(basketItem); $('#loadedAmount'+row).val(parseInt(amount,10)+parseInt($('#loadedAmount'+row).val(),10)); + //丢失报损器械 + if(isIDCard == '是'){ + setIdCardErrorIntoBasketAmount(row,amount); + } //相关器械包样式变更以区分是否已入筐 $("#loadedAmount" + row).css("background","#b7d9a5"); @@ -1345,6 +1387,10 @@ addBasketItemElement(basketItem); } $('#loadedAmount'+row).val(parseInt(amount,10)+parseInt($('#loadedAmount'+row).val(),10)); + //丢失报损器械 + if(isIDCard == '是'){ + setIdCardErrorIntoBasketAmount(row,amount); + } //相关器械包样式变更以区分是否已入筐 $('#loadedAmount'+row).css("background","#b7d9a5"); @@ -1539,16 +1585,39 @@ $('#tousseItemTable').children().first().children().each(function(index,element){ if($('#deleted'+index).val() == '0'){ isThereTousseItems = true; + var tousseType = $('#tousseType'+index).val(); - if($('#recycleAmount'+index).val() == '' || parseInt($('#recycleAmount'+index).val(),10) == 0){ + var recyclingAmount = parseInt($('#recycleAmount'+index).val(),10); + var loadedAmount = parseInt($('#loadedAmount'+index).val(),10); + + if(recyclingAmount == '' || recyclingAmount == 0){ isThereRecycleAmountEmpty = true; return false; } - if(parseInt($('#recycleAmount'+index).val(),10) != parseInt($('#loadedAmount'+index).val(),10)){ + if(recyclingAmount != loadedAmount){ isAllTousseInTheBasket = false; return false; } + //标识牌丢失验证 + var isIDCard = $('#isThereIdentificationCard'+index).val(); + if(isIDCard == '是'){ + var recyclingErrorJsonArrayStr = $('#recyclingError'+index).val(); + if(recyclingErrorJsonArrayStr != ""){ + var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); + for(var j = 0;j < recyclingErrorJsonArray.length;j++) { + if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ + var errorType = recyclingErrorJsonArray[j].errorType; + var errorAmount = recyclingErrorJsonArray[j].amount; + var intoBasketAmount = recyclingErrorJsonArray[j].intoBasketAmount; + if(errorType == '缺失' && errorAmount != intoBasketAmount){ + isAllTousseInTheBasket = false; + } + break; + } + } + } + } } }); @@ -1706,24 +1775,20 @@ } } } - var recyclingErrorAmount = recycleAmount - (idCardUnLoadedAmount + loadedAmount); - if(recyclingErrorAmount > 0){ - var recyclingErrorJsonArrayStr = $('#recyclingError' + i).val(); - if(recyclingErrorJsonArrayStr != ""){ - var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); - for(var j = 0;j < recyclingErrorJsonArray.length;j++) { - if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ - var errorAmount = recyclingErrorJsonArray[j].amount; - if(recyclingErrorAmount != errorAmount){ - alertDiv($('#tousseName'+i).val()+"扫描的标识牌数量不等于回收数量,如果标识牌丢失,请在回收误差中登记丢失记录!"); - }else{ - addJsonItem(result,tousseId,errorAmount,'是',''); - } - break; - } - } - } - } + var recyclingErrorJsonArrayStr = $('#recyclingError' + i).val(); + if(recyclingErrorJsonArrayStr != ""){ + var recyclingErrorJsonArray = JSON.parse(recyclingErrorJsonArrayStr); + for(var j = 0;j < recyclingErrorJsonArray.length;j++) { + if(recyclingErrorJsonArray[j].materialName == '器械包标识牌'){ + var errorAmount = parseInt(recyclingErrorJsonArray[j].amount); + var intoBasketAmount = parseInt(recyclingErrorJsonArray[j].intoBasketAmount); + if(errorAmount - intoBasketAmount > 0){ + addJsonItem(result,tousseId,errorAmount - intoBasketAmount,'是',''); + } + break; + } + } + } }else{ addJsonItem(result,tousseId,unLoadedAmount,'否',''); } @@ -1794,6 +1859,7 @@ var tousseName = data[j].tousseName; var recycleAmount = data[j].recycleAmount; var tousseDefinitionID = data[j].tousseDefinitionID; + var tousseIdCardBarcode = data[j].idCardBarcode; var basketGroupBarcodeArray = new Array(); //篮筐上限验证 var dataArray = new Array(); @@ -1859,6 +1925,11 @@ $('#tousseItemTable').children().first().children().each(function(i,element){ if($('#tousseDefinitionID'+i).val() == tousseDefinitionID){ $('#loadedAmount'+i).val(parseInt(recycleAmount,10)+parseInt($('#loadedAmount'+i).val(),10)); + + var idCard = $('#isThereIdentificationCard'+i).val(); + if(idCard == '是' && tousseIdCardBarcode == ''){ + setIdCardErrorIntoBasketAmount(i,recycleAmount); + } $('#loadedAmount'+i).css("background","#b7d9a5"); return false; } @@ -2115,7 +2186,8 @@ tousseDefinitionID: error.tousseDefinitionId, materialDefinitionId: error.materialDefinitionId, materialName: error.materialName, - amount: error.amount + amount: error.amount, + intoBasketAmount:error.amount }; recyclingErrorJsonArray.push(errorObj); } Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.jsp =================================================================== diff -u -r13615 -r13622 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.jsp (.../awaitForRecycleList.jsp) (revision 13615) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.jsp (.../awaitForRecycleList.jsp) (revision 13622) @@ -737,7 +737,10 @@ if(msg.isIdCardBarcode){ selectIdCardBarcode(barcode); } - alertDiv(msg.message,false); + //省医不需要标识牌提示 + if("该标识牌没有器械包装配记录!(即没有关联的器械包实例)" != msg.message){ + alertDiv(msg.message,false); + } return; } } Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/customIntoBasket.jsp =================================================================== diff -u -r13559 -r13622 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/customIntoBasket.jsp (.../customIntoBasket.jsp) (revision 13559) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/customIntoBasket.jsp (.../customIntoBasket.jsp) (revision 13622) @@ -454,6 +454,7 @@ array[len].tousseDefinitionID = json.tousseDefinitionID; array[len].tousseName = json.tousseName; array[len].recycleAmount = json.tousseAmount; + array[len].idCardBarcode = json.idCardBarcode; array[len].materials = new Array(); array[len].materials[0] = obj; }