Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/setForeignTousseDefinition.jsp =================================================================== diff -u -r38659 -r38671 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/setForeignTousseDefinition.jsp (.../setForeignTousseDefinition.jsp) (revision 38659) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/setForeignTousseDefinition.jsp (.../setForeignTousseDefinition.jsp) (revision 38671) @@ -30,6 +30,7 @@ var applicationId = '${param.applicationId}'; var resolution = '${param.resolution}'; var canUpdatePrice = '${param.canUpdatePrice}'; + var canUpdateWeight = '${param.canUpdateWeight}'; var recyclingrecordId = '${param.recyclingrecordId}'; var row = '${param.row}'; @@ -198,8 +199,13 @@ return; } }else if(updateType == 4){ - title = '修改重量'; - isPrice = true; + if(canUpdateWeight == 'true'){ + title = '修改重量'; + isPrice = true; + }else { + alert('修改失败,该物品已经接收,不能修改。'); + return; + } } obj.blur(); var designedTousseWidth = 980; @@ -237,7 +243,7 @@ $.layer({ type : 2, title : [title,true], - iframe : {src : 'updateAmount.jsp?from=errors&resolution='+resolution+'&row='+row+'&recyclingTimes='+recyclingTimes+'&isPrice='+isPrice}, + iframe : {src : 'updateAmount.jsp?from=errors&resolution='+resolution+'&row='+row+'&recyclingTimes='+recyclingTimes+'&isPrice='+isPrice+'&updateType=4&ftMaxWeight='+ftMaxWeight}, area : [width + 'px' , height + 'px'], border : [5, 0.3, '#fff', true], closeBtn : [2 , true], @@ -246,19 +252,6 @@ if(updateType == 3){ return } - if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && applicationId !== '' && updateType == 4){ - var weight_new = $('#weight0').text(); - if(weight_new == '' || parseFloat(weight_new) == 0){ - $('#weight0').text('') - alert("外来器械包的重量必须大于0"); - return - } - if(weight_new !== '' && ftMaxWeight !== '' && parseFloat(weight_new) > parseFloat(ftMaxWeight)){ - $('#weight0').text(weight_old) - alert("外来器械包的重量不能超过最大重量"+ftMaxWeight); - return - } - } if($('#includeImplant'+row).text() == '是' && recyclingStatus == '待回收'){ if(updateType == 0){ var recycleAmount_new = $('#amount'+row).text(); @@ -394,7 +387,7 @@ totalRecycleAmount += recycleAmount; $("#recyclingErrorTable").append(materialElement); - if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight && (recyclingStatus == '待回收' || recyclingStatus == '待接收')){ + if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ $(".weight").show() }else { $(".weight").hide() Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r38598 -r38671 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 38598) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 38671) @@ -3179,10 +3179,19 @@ canUpdatePrice = true; } } + var canUpdateWeight = false; + if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ + if(recyclingStatus == '待接收'){ + canUpdateWeight = true; + }else if(recyclingStatus == '部分接收' && recyclingItemId == ''){ + canUpdateWeight = true; + } + } + layerIndex = layer.open({ type: 2, title: [tousseName + ' 信息', true], - content: 'setForeignTousseDefinition.jsp?resolution=' + resolution + '&width=' + width + '&height=' + height + '&row=' + row + '&tousseDefinitionID=' + tousseDefinitionID + '&applicationId=' + params_appId + '&recyclingrecordId=' + params_id + '&canUpdatePrice=' + canUpdatePrice, + content: 'setForeignTousseDefinition.jsp?resolution=' + resolution + '&width=' + width + '&height=' + height + '&row=' + row + '&tousseDefinitionID=' + tousseDefinitionID + '&applicationId=' + params_appId + '&recyclingrecordId=' + params_id + '&canUpdatePrice=' + canUpdatePrice + '&canUpdateWeight=' + canUpdateWeight, area: [width + 'px', height + heightExtra + 'px'], border: [5, 0.3, '#fff', true], closeBtn: [2, true], Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp =================================================================== diff -u -r37927 -r38671 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp (.../updateAmount.jsp) (revision 37927) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/updateAmount.jsp (.../updateAmount.jsp) (revision 38671) @@ -26,6 +26,8 @@ var loadedAmount = parseInt('${param.loadedAmount}'); var customAmountSubmit = '${param.customAmountSubmit}'; var recyclingTimes = '${param.recyclingTimes}'; +var updateType = '${param.updateType}'; +var ftMaxWeight = '${param.ftMaxWeight}'; var parentrecycleAudioAmount = $(window.parent.document).find("#recycleAudioAmount"); var isOpenUpdateAmount = $(window.parent.document).find("#isOpenUpdateAmount").val(); var isDialogStatus = $(window.parent.document).find("#isDialogStatus").val(); @@ -71,6 +73,16 @@ function submitButton(inputObj,updateResult){ if(inputObj.value != null && inputObj.value != ""){ var value = inputObj.value; + if(updateType == '4'){ + if(parseFloat(value) == 0){ + alert("外来器械包的重量必须大于0"); + return + } + if(ftMaxWeight !== '' && parseFloat(value) > parseFloat(ftMaxWeight)){ + alert("外来器械包的重量不能超过最大重量"+ftMaxWeight); + return + } + } if(inputObj.value.indexOf('.') > -1 && inputObj.value.split('.')[1] == ''){ value = value + '00'; } Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r38670 -r38671 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38670) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38671) @@ -5987,8 +5987,8 @@ var weight = ''; if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ weight = Ext4.getCmp('weight').getValue(); - if(weight <= 0){ - showResult('重量必须大于0'); + if(weight <= 0 && params.tousseType == '外来器械包'){ + showResult('重量不能为空或小于等于0'); return false; } } @@ -7131,6 +7131,7 @@ checked = record.childNodes[0].get('checked'); } if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ + Ext4.getCmp('weight').show(); if(checked){ Ext4.getCmp('weight').enable(); Ext4.getCmp('weight').setValue(weight); @@ -7139,6 +7140,8 @@ Ext4.getCmp('weight').setValue(''); } } + }else { + Ext4.getCmp('weight').hide(); } if (record.childNodes.length == 1) { @@ -7529,12 +7532,17 @@ deselectCheckAll(); } if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ - if(node.data.tousseType == '外来器械包' && checked){ - Ext4.getCmp('weight').enable(); - Ext4.getCmp('weight').setValue(node.data.weight || ''); + if(node.data.tousseType == '外来器械包'){ + Ext4.getCmp('weight').show(); + if(checked){ + Ext4.getCmp('weight').enable(); + Ext4.getCmp('weight').setValue(node.data.weight || ''); + }else { + Ext4.getCmp('weight').disable(); + Ext4.getCmp('weight').setValue(''); + } }else { - Ext4.getCmp('weight').disable(); - Ext4.getCmp('weight').setValue(''); + Ext4.getCmp('weight').hide(); } } }, @@ -7588,17 +7596,19 @@ } }, 200); if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){ - if(rootNode.childNodes.length == 1 && rootNode.childNodes[0].childNodes.length == 1 && rootNode.childNodes[0].data.tousseType == '外来器械包'){ - Ext4.getCmp('weight').enable(); - Ext4.getCmp('weight').setValue(rootNode.childNodes[0].childNodes[0].data.weight || ''); + if(rootNode.childNodes[0].data.tousseType == '外来器械包'){ + Ext4.getCmp('weight').show(); + if(rootNode.childNodes.length == 1 && rootNode.childNodes[0].childNodes.length == 1){ + Ext4.getCmp('weight').enable(); + Ext4.getCmp('weight').setValue(rootNode.childNodes[0].childNodes[0].data.weight || ''); + }else { + Ext4.getCmp('weight').disable(); + Ext4.getCmp('weight').setValue(''); + } }else { - Ext4.getCmp('weight').disable(); - Ext4.getCmp('weight').setValue(''); + Ext4.getCmp('weight').hide(); } } - }else { - Ext4.getCmp('weight').disable(); - Ext4.getCmp('weight').setValue(''); } showOrHidePrintBtn(); resetScanIDCardBarcodeVisibility();