Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutToSupplyRoomView.js =================================================================== diff -u -r13528 -r14272 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutToSupplyRoomView.js (.../godownOutToSupplyRoomView.js) (revision 13528) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutToSupplyRoomView.js (.../godownOutToSupplyRoomView.js) (revision 14272) @@ -53,23 +53,22 @@ } for(var i = 0;i 0){ - setCmpValue('batchNumber1',batches[0].batchNumber); var combo = top.Ext.getCmp("batchNumber1"); + combo.setValue(batches[0].batchNumber); //(陈家儒改) + // 触发选中事件 combo.fireEvent('select', combo,diposableGoodsBatchNumStore.getAt(0),0); } } } //设置价格 function setPrices(prices,selectFirst) { - clearPrice() + clearPrice(); if(typeof(prices) == 'undefined' || prices == null){ return; } @@ -141,7 +140,7 @@ {name : 'disposableGoodsBatchStockId'}, {name : 'storage'}, {name : 'batchNumber'}, - {name : 'displayName'}, + {name : 'displayBatchNumber'}, //添加一个属性用于显示【批次+有效日期】给用户看(陈家儒改) {name : 'cost'}, {name : 'expDate'}, {name : 'supplierName'} @@ -683,6 +682,7 @@ typeAhead : false, allowBlank : true, width : 180, + listWidth : 400, //下拉列表的宽度(陈家儒改) //listConfig: {width : 500},//Ext4才支持 listeners : { select : function(combo, record, index) { @@ -698,6 +698,7 @@ var batches = JSON.parse(batchesStr); for(var i = 0;i(失效日期:" + batches[i].expDate + ")"; //添加一个属性用于显示【批次+有效日期】给用户看(陈家儒改) } setBatchNumbers(batches, true); }); @@ -714,9 +715,8 @@ xtype : 'combo', id : 'batchNumber1', name : 'batchNumber1', - valueField : 'batchNumber', -// displayField : 'displayName', - displayField : 'batchNumber', + valueField : 'displayBatchNumber', //(陈家儒改) + displayField : 'displayBatchNumber', //(陈家儒改) store : diposableGoodsBatchNumStore, editable : false, forceSelection : true, @@ -726,7 +726,7 @@ typeAhead : false, allowBlank : true, width : 100, - //listWidth:300, + listWidth:240, //(陈家儒改) anchor : '95%', listeners : { select : function(combo, record, index) { @@ -736,13 +736,19 @@ top.Ext.getCmp('diposableGoodsCost').setValue(record.data.price); top.Ext.getCmp('diposableGoodsExpDate').setValue(dateObj2String(record.data.expDate)); top.Ext.getCmp('diposableGoodsSupplierName').setValue(record.data.supplierName); + combo.setValue(record.data.batchNumber); //(陈家儒改) // 清空价格 clearPrice(); // 填充价格 var batch = getSelectedBatch(); GodownEntryTableManager.getDiposableGoodsPriceAmountInfoCanOutEntryByBatchID(batch.id,function(priceAmounts){ - setPrices(priceAmounts,true); + //如果所选批次号的库存为0,给予"不能领用"的提示 + if(priceAmounts.length == 0){ + showResult("批次号为" + record.data.batchNumber + "的一次性物品库存为0,不能领用!"); + }else{ + setPrices(priceAmounts,true); + } }); }, specialkey : function(field, e) {