Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r14210 -r14221 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14210) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14221) @@ -554,7 +554,7 @@ } //TODO 5 取消科室申请模板 -function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount){ +function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount){ var foundNode = null; if('是' == diposable){ foundNode = getExsistNode(rightTemplateStore, name); @@ -592,6 +592,7 @@ leaf : true, children : materials, minApplyAmount : minApplyAmount, + maxApplyAmount : maxApplyAmount, totalPrice:roundValue(price*count), packageSpec:packageSpec }); @@ -664,7 +665,7 @@ top.Ext4.getCmp('count1').setValue(""); top.Ext4.getCmp('count1').focus(); }else{//都不为空,我就让你加进来 - addItems(id,name,count,top.Ext4.getCmp('isDiposableGoods').getValue(),top.Ext4.getCmp('isApplyEntireTousse').getValue(),top.Ext4.getCmp('price').getValue(),'','','',''); + addItems(id,name,count,top.Ext4.getCmp('isDiposableGoods').getValue(),top.Ext4.getCmp('isApplyEntireTousse').getValue(),top.Ext4.getCmp('price').getValue(),'','','','',''); } } @@ -763,21 +764,21 @@ clearCount(); return false; }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount); } }); } else if(count > maxApplyAmount && maxApplyAmount != ""){ top.Ext4.Msg.alert("提示消息","申请数量大于最大可申请数量"); //showResult("申请数量大于最大可申请数量"); clearCount(); - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount); } else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount); } }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount); } top.Ext4.getCmp('diposableGoodsAmount').setValue(''); @@ -1530,6 +1531,9 @@ showResult("该一次性物品最小申请数量为"+minApplyAmount+",所填数量必须是"+minApplyAmount+"的倍数。"); record.set("count", ""); } + if (maxApplyAmount < context.value){ + top.Ext4.Msg.alert("提示消息","申请数量大于最大可申请数量"); + } } record.set("totalPrice", roundValue(context.value * record.get("price"))); Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java =================================================================== diff -u -r14182 -r14221 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java (.../DepartmentAppTemplateManagerImpl.java) (revision 14182) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java (.../DepartmentAppTemplateManagerImpl.java) (revision 14221) @@ -396,6 +396,7 @@ json.put("storage", disposableGoods.getAmount()); json.put("unit", unit); json.put("minApplyAmount", disposableGoods.getMinApplyAmount()); + json.put("maxApplyAmount", disposableGoods.getMaxApplyAmount()); json.put("diposable", "是"); json.put("price", price); json.put("leaf", true);