Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManagerImpl.java =================================================================== diff -u -r14174 -r14210 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManagerImpl.java (.../DiposableGoodsManagerImpl.java) (revision 14174) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManagerImpl.java (.../DiposableGoodsManagerImpl.java) (revision 14210) @@ -807,6 +807,7 @@ temp.put("packageSpec", disposableGoods.getPackageSpec()); temp.put("amount", 0); temp.put("price", 0.00); + temp.put("maxApplyAmount",disposableGoods.getMaxApplyAmount()); String displayName = goodsName; temp.put("displayName", displayName + "(库存:0)"); if(goodsStocks != null && goodsStocks.size() > 0){ Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java =================================================================== diff -u -r13584 -r14210 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java (.../DisposableGoods.java) (revision 13584) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java (.../DisposableGoods.java) (revision 14210) @@ -82,7 +82,9 @@ private String unit; //单位 private Integer minApplyAmount; //最小申请数量 - + + private Integer maxApplyAmount; //最大申请数量 + private String certification;// 注册证号 /** @@ -106,7 +108,7 @@ gradeList.add(GRADE_SECOND); gradeList.add(GRADE_THIRD); } - + private String inventorySerialNumber; // 物资系统的物资编码,用于与物资系统交互 private String goodsType = TYPE_DIPOSABLEGOODS; @@ -277,6 +279,14 @@ this.minApplyAmount = minApplyAmount; } + public Integer getMaxApplyAmount() { + return maxApplyAmount; + } + + public void setMaxApplyAmount(Integer maxApplyAmount) { + this.maxApplyAmount = maxApplyAmount; + } + public String getCertification() { return certification; } Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r14154 -r14210 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14154) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14210) @@ -274,7 +274,8 @@ {name : 'unit',mapping : 'unit'}, {name : 'amount',mapping : 'amount'}, {name : 'materials',mapping : 'materials'}, - {name : 'minApplyAmount',mapping : 'minApplyAmount'} + {name : 'minApplyAmount',mapping : 'minApplyAmount'}, + {name : 'maxApplyAmount',mapping : 'maxApplyAmount'} ],listeners:{ beforeload : function(){ if(loadMask){ @@ -323,7 +324,8 @@ {name : 'externalCode',mapping : 'externalCode'}, {name : 'displayName',mapping : 'displayName'}, {name : 'minApplyAmount',mapping : 'minApplyAmount'}, - {name : 'unit',mapping : 'unit'}, + {name : 'maxApplyAmount',mapping : 'maxApplyAmount'}, + {name : 'unit',mapping : 'unit'}, {name : 'price',mapping : 'price'}, {name : 'amount',mapping : 'amount'}] ) @@ -336,6 +338,7 @@ {name : 'name'}, {name : 'count'}, {name : 'minApplyAmount'}, + {name : 'maxApplyAmount'}, {name : 'diposable'}, {name : 'tousseType'}, {name : 'externalCode'}, @@ -407,6 +410,7 @@ {name : 'count'}, {name : 'countBackup'}, {name : 'minApplyAmount'}, + {name : 'maxApplyAmount'}, {name : 'diposable'}, {name : 'tousseType'}, {name : 'groupNum'}, @@ -710,6 +714,11 @@ // } } +function clearCount() { + top.Ext4.getCmp('count1').setValue(""); + top.Ext4.getCmp('count1').focus(); +} + function addRecyclingApplicationItem(){ var id = curSelectedGoods.id; var name = top.Ext4.getCmp('package1').getValue(); @@ -737,12 +746,12 @@ var storageAmount = parseInt(top.Ext4.getCmp('diposableGoodsAmount').getValue(),10); var isDiposableGoods = top.Ext4.getCmp('isDiposableGoods').getValue(); var minApplyAmount = top.Ext4.getCmp('minApplyAmount').getValue(); + var maxApplyAmount = top.Ext4.getCmp('maxApplyAmount').getValue(); //如果是一次性物品 if(isDiposableGoods == '是'){ if(!isValidDiposableAmount(minApplyAmount,count)){ showResult("该一次性物品最小申请数量为"+minApplyAmount+",所填数量必须是"+minApplyAmount+"的倍数。"); - top.Ext4.getCmp('count1').setValue(""); - top.Ext4.getCmp('count1').focus(); + clearCount(); return false; }else if(parseInt(count,10) > storageAmount ){ if(!allowApplyDisposableGoodsWhenUnderstock){ @@ -751,22 +760,29 @@ } top.Ext4.Msg.confirm("请确认", "申请数量大于库存数量,发货可能会延迟,是否继续申请该物品?",function(btn) { if (btn != 'yes') { - top.Ext4.getCmp('count1').setValue(""); - top.Ext4.getCmp('count1').focus(); + clearCount(); return false; }else{ addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); } }); - }else{ + } + 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); } + else{ + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); + } }else{ addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount); } top.Ext4.getCmp('diposableGoodsAmount').setValue(''); top.Ext4.getCmp('minApplyAmount').setValue(''); + top.Ext4.getCmp('maxApplyAmount').setValue(''); top.Ext4.getCmp('isDiposableGoods').setValue(""); top.Ext4.getCmp('package1').clearValue(); top.Ext4.getCmp('count1').setValue(""); @@ -1502,7 +1518,8 @@ var isDiposableGoods = record.get("diposable"); var minApplyAmount = record.get("minApplyAmount"); - + var maxApplyAmount = record.get("maxApplyAmount"); + if (isDiposableGoods == '是' && context.value != null && context.value != ''){ var storage = record.get("storage"); if(parseInt(context.value,10) > storage && !allowApplyDisposableGoodsWhenUnderstock){ @@ -1631,6 +1648,10 @@ id : 'minApplyAmount' }, { xtype : 'hidden', + name : 'maxApplyAmount', + id : 'maxApplyAmount' + }, { + xtype : 'hidden', name : 'returnedItemInfo', id : 'returnedItemInfo' }, @@ -1945,6 +1966,7 @@ top.Ext4.getCmp('tousseType').setValue("一次性物品"); top.Ext4.getCmp('diposableGoodsAmount').setValue(record.data.amount); top.Ext4.getCmp('minApplyAmount').setValue(record.data.minApplyAmount); + top.Ext4.getCmp('maxApplyAmount').setValue(record.data.maxApplyAmount); var unit = record.data.unit; var packageSpec = record.data.packageSpec; top.Ext4.getCmp('unit').setValue(unit); Index: ssts-web/src/main/webapp/disinfectsystem/goodsapplicationcffirm/goodsApplicationCffirmView.js =================================================================== diff -u -r12331 -r14210 --- ssts-web/src/main/webapp/disinfectsystem/goodsapplicationcffirm/goodsApplicationCffirmView.js (.../goodsApplicationCffirmView.js) (revision 12331) +++ ssts-web/src/main/webapp/disinfectsystem/goodsapplicationcffirm/goodsApplicationCffirmView.js (.../goodsApplicationCffirmView.js) (revision 14210) @@ -26,7 +26,7 @@ var supplierStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/supplierAction!getSupplierData.do?supplierType='+encodeURI(supplier)', + url : WWWROOT + '/disinfectSystem/baseData/supplierAction!getSupplierData.do?supplierType='+encodeURI(supplier), method : 'POST' }), reader : new Ext.data.JsonReader({