Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp =================================================================== diff -u -r19807 -r21980 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp (.../updateAmount.jsp) (revision 19807) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp (.../updateAmount.jsp) (revision 21980) @@ -96,6 +96,9 @@ if(inputObj.value != null && inputObj.value != "" && row != null && row != ''){ window.parent.openElement.value =inputObj.value; window.parent.changeRecycleAmount(row); + if(window.parent.updateBindGoods){ + window.parent.updateBindGoods(row); + } closeLayer(); }else if(inputObj.value != null && inputObj.value != "" && name != null && name != ''){ var result = window.parent.validateStuffInTheBasketAmount(tousseName,name,type,parseInt(inputObj.value,10)); Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addTousse.jsp =================================================================== diff -u -r20876 -r21980 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addTousse.jsp (.../addTousse.jsp) (revision 20876) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addTousse.jsp (.../addTousse.jsp) (revision 21980) @@ -55,7 +55,7 @@ window.parent.addToussItem(toussItem,sstsConfig.addTousseAtLastForRecycle); //已删除又添加该物品jsonArray处理 window.parent.cleanDeleteTousseItem(tousseDefinitionId); - + window.parent.addBindGoods(toussItem,sstsConfig.addTousseAtLastForRecycle); closeLayer(); } Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java =================================================================== diff -u -r21838 -r21980 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java (.../TousseDefinitionManagerImpl.java) (revision 21838) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java (.../TousseDefinitionManagerImpl.java) (revision 21980) @@ -1840,11 +1840,17 @@ temp.put("isApplyEntireTousse", tousseDefinition.getIsApplyEntireTousse()); temp.put("expressInvoice", tousseDefinition.getExpressInvoice()); //是否快速发货 + String isThereIdentificationCard = "否"; + if(!tousseDefinition.isIDCardDisabled()){ + isThereIdentificationCard = "是"; + } + temp.put("isThereIdentificationCard", isThereIdentificationCard); String unit = tousseDefinition.getUnit(); if (unit == null) { unit = ""; } temp.put("unit", unit); + temp.put("isRecycling", tousseDefinition.getIsRecycling()); if (TousseDefinition.PACKAGE_TYPE_DISINFECTION .equals(tousseDefinition.getTousseType())) { JSONArray materialsArry = getMaterialsOfDisinfectionGoods(tousseDefinition); Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp =================================================================== diff -u -r21236 -r21980 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp (.../recycleForTouchScreen.jsp) (revision 21236) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp (.../recycleForTouchScreen.jsp) (revision 21980) @@ -7,6 +7,8 @@ <%@page import="com.forgon.tools.SpringBeanManger"%> <%@page import="com.forgon.disinfectsystem.common.*"%> <%@page import="com.forgon.directory.acegi.tools.AcegiHelper"%> +<%@page import="com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseDefinition"%> + <%@page import="com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseInstance,com.forgon.disinfectsystem.entity.recyclingerror.RecyclingError,com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager"%> @@ -167,6 +169,10 @@ $("#customIntoBasketDiv").hide(); } }); + +var PACKAGE_TYPE_INSIDE = '<%=TousseDefinition.PACKAGE_TYPE_INSIDE%>'; +var PACKAGE_TYPE_DISINFECTION = '<%=TousseDefinition.PACKAGE_TYPE_DISINFECTION%>'; + Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r21252 -r21980 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 21252) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 21980) @@ -175,6 +175,7 @@ } increaseAmount(row); setTousseItemLoadedAmountCss(row); + updateBindGoods(row); } /** @@ -185,6 +186,7 @@ var recycleAmount = $('#recycleAmount'+row).val() == ''?0:parseInt($('#recycleAmount'+row).val(),10)-1; if(recycleAmount >= 0){ $('#recycleAmount'+row).val(recycleAmount); + updateBindGoods(row); } changeRecycleAmount(row); setTousseItemLoadedAmountCss(row); @@ -1932,8 +1934,102 @@ $("#loadedAmount" + row).css("background","#b7d9a5");//绿色 } } - /** + * 修改数量的时候,更新绑定物品.调用此方法的时候,回收数量已经更新 + * @param row + */ +function updateBindGoods(row){ + var toussItem = { + tousseDefinitionID: $('#tousseDefinitionID' + row).val(), + tousseName:$('#tousseName' + row).val(), + recycleAmount:$('#recycleAmount' + row).val(), + tousseType:$('#tousseType' + row).val() + }; + addBindGoods(toussItem,sstsConfig.addTousseAtLastForRecycle); +} +/** + * 添加绑定物品 + * @param toussItem + * @param appendLast + */ +function addBindGoods(toussItem,appendLast){ + var params = { +// settleAccountsDepartCoding: top.Ext4.getCmp('settleAccountsDepartCoding').getValue(),//只有一次性物品才用 +// handleDepartCode: top.Ext4.getCmp('handleDepartCoding').getValue(),//只有一次性物品才用 + goodName: toussItem.tousseName, + bindCount: toussItem.recycleAmount, + goodId: toussItem.tousseDefinitionID, + goodType: toussItem.tousseType + }; + $.ajax({ + type:'POST', + url:WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getBindGoods.do', + data:params, + dataType:'json', + success:function(result){ + if(result && result.success && result.data.length > 0){ + for(var i = 0; i < result.data.length;++i){ + var record = result.data[i]; + if(record.isRecycling != '是' || (record.tousseType != PACKAGE_TYPE_INSIDE && record.tousseType != PACKAGE_TYPE_DISINFECTION)){ + //回收只处理器械包跟消毒物品,用要是需要回收的 + continue; + } + var row = tousseItemExists(record.id,record.name,record.tousseType); + if(row == -1){ + row = document.getElementById("tousseItemTable").rows.length; + var timeStr = new Date().getTime(); + var errorDamageQmKey = record.id + "_" + timeStr; + var toussItem = { + row: row, + tousseItemId: '', + tousseName: record.name, + tousseDefinitionID: record.id, + applicationAmount: 0, + recycleAmount: 0, + loadedAmount: 0, + isCleanedEntirely: record.isCleanedEntirely, + tousseType: record.tousseType, + isThereIdentificationCard: record.isThereIdentificationCard, + isApplyEntireTousse: record.isApplyEntireTousse, + urgentAmount:0, + errorDamageQmKey:errorDamageQmKey + }; + addToussItem(toussItem,appendLast); + //已删除又添加该物品jsonArray处理 + cleanDeleteTousseItem(record.id); + } + $('#recycleAmount'+row).val(record.count); + setTousseItemLoadedAmountCss(row); + changeRecycleAmount(row); + } + } + }, + error:function(XMLHttpRequest, textStatus, errorThrown){ + alertDiv('获取绑定物品失败'); + } + }); +} +/** + * 判断是否存在对应的物品,如果存在,返回对应的行号,否则返回-1; + * @param tousseDefinitionID 包定义id + * @param tousseName 器械包名称,如果是消毒物品,就用名称匹配,因为消毒物品的id可能跟界面上的不一样 + * @param tousseType 器械包类型 + * @returns {Number} + */ +function tousseItemExists(tousseDefinitionID,tousseName,tousseType){ + var row = -1; + $('#tousseItemTable').children().first().children().each(function(i,element){ + if(($('#tousseDefinitionID'+i).val() == tousseDefinitionID)||(tousseType == '消毒物品' && $('#tousseName'+i).val() == tousseName)){ + //显示的列表中是否有该器械包 + if($('#deleted'+i).val() == '0'){ + row = i; + return false; + } + } + }); + return row; +} +/** * 添加回收记录明细,tousseName为器械包名称,applicationAmount为申请数量,recycleAmount为回收数量,loadedAmount为装载数量 * @param toussItem 物品明细 * @param appendLast 是否追加到最后一行