Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r30678 -r30910 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 30678) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 30910) @@ -527,13 +527,13 @@ root : 'data' } }; - //物品选择下拉框的model var goodModel = [ {name : 'id',mapping : 'id'}, {name : 'spelling',mapping : 'spelling'}, {name : 'name',mapping : 'name'}, //物品名称 {name : 'tousseDefinitionID'}, + {name : 'storage',mapping : 'storage'}, {name : 'type',mapping : 'type'}, {name : 'tousseType',mapping : 'tousseType'}, {name : 'isApplyEntireTousse',mapping : 'isApplyEntireTousse'}, @@ -559,22 +559,23 @@ var comboGoodsStore = new Ext4.data.JsonStore({ pageSize: isIE6OrIE7 ? 30 : 100, proxy : goodProxy, - fields : goodModel, + fields : goodModel, listeners:{ beforeload : function(store, operation, eOpts){ //每次加载之前传“申请科室编码”、“结算科室编码”、“处理科室编码”三个参数 store.proxy.extraParams.appCode = top.Ext4.getCmp('departCoding').getValue(); store.proxy.extraParams.settleAccountsDepartCoding = top.Ext4.getCmp('settleAccountsDepartCoding').getValue(); - store.proxy.extraParams.cssdOrgUnitCode = top.Ext4.getCmp('handleDepartCoding').getValue(); - + store.proxy.extraParams.cssdOrgUnitCode = top.Ext4.getCmp('handleDepartCoding').getValue(); + store.proxy.extraParams.applicationType = top.Ext4.getCmp('type').getValue(); + if (!isIE6OrIE7){ createExt4Mask.call(objMask,'loadMask','数据处理中,请稍候......', applicationWindow); objMask.loadMask.show(); }else { loadMask.show(); } }, - load : function(){ + load: function(){ curSelectedGoods = null; if (!isIE6OrIE7){ if(objMask.loadMask){ @@ -1131,7 +1132,14 @@ var urgentLevelId = top.Ext4.getCmp('urgentLevel').getValue(); var transferScale = top.Ext4.getCmp('transferScale').getValue(); var middlePackageUnit = top.Ext4.getCmp('middlePackageUnit').getValue(); - + var storage = top.Ext4.getCmp('storage').getValue() || 0; + + if(type == "物品预约单"){ + if(parseInt(count) > parseInt(storage) && sstsConfig.notAllowReservationAmountGreaterThanStorageAmount){ + showResult(name+'的库存数量为'+storage+',预约数量不能大于库存数量!'); + return; + } + } var originalPrice = top.Ext4.getCmp('originalPrice').getValue(); var price = top.Ext4.getCmp('price').getValue(); var externalCode = isDiposableGoods == '是' ?top.Ext4.getCmp('externalCode').getValue() : ''; @@ -1181,6 +1189,9 @@ var storageAmount = sstsConfig.storageUseStorageSubtractWaitDeliver ? findStorageByDisposeIdAndHandleDepartCode(id) : parseInt(top.Ext4.getCmp('diposableGoodsAmount').getValue() || 0,10); var minApplyAmount = top.Ext4.getCmp('minApplyAmount').getValue(); var maxApplyAmount = top.Ext4.getCmp('maxApplyAmount').getValue(); + if(type == "物品预约单" && sstsConfig.notAllowReservationAmountGreaterThanStorageAmount){ + storageAmount = parseInt(storage); + } //如果是一次性物品 if(isDiposableGoods == '是'){ //如果配置了中包装单位,这个数量的校验要用中包装的数量来校验