日期:2014-05-16 浏览次数:20419 次
//3.消费者对品牌分析,商品列表 var brandGrid = Ext.create('Ext.grid.Panel',{ region: 'center', columnLines: true, store: brandStore, multiSelect: true, selModel: { selType:'checkboxmodel' }, //selModel: selMod, columns: [ Ext.create('Ext.grid.RowNumberer', { text: '序号', width : 30 }), { header: '品牌', dataIndex: 'brandName', flex: 1 } ], listeners:{ added:function( Component ,container, pos, eOpts ){ } } } ); function type3Load(){ ids = new Array(); //var names = new Array(); var selections = brandGrid.getSelectionModel().getSelection(); for ( var i = 0; i ', { text: '确定', tooltip: '确定', //icon: basePath + 'css/icons/fam/add_16.png', iconCls: 'ok', handler: function(){ if(brandWindowFlag){ type3Load(); }else{ brandWindow.hide(); } } },{ text: '取消', tooltip: '取消', //iconCls: 'add', //icon: basePath + 'css/icons/fam/add_16.png', iconCls: 'cancel', handler: function(){ if(brandWindowFlag){ type3Load(); }else{ brandWindow.hide(); } } }] } );
//加载品牌数据集,并给品牌下拉框赋初始值 brandStore.load({ params: { date: Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.MONTH, -1),"Ym"),//默认参数 }, callback: function(records, operation, success){ //获取grid的复选框对象 var selMod = brandGrid.getSelectionModel(); //默认选中10个品牌 for (var i = 0; i <10; i++){ selMod.select(i,true,false); }; //打开品牌窗体 brandWindow.show(); } });
//加载品牌数据集,并给品牌下拉框赋初始值 brandStore.load({ params: { date: Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.MONTH, -1),"Ym"),//默认参数 }, callback: function(records, operation, success){ //打开品牌窗体 brandWindow.show(); //获取grid的复选框对象 var selMod = brandGrid.getSelectionModel(); //默认选中10个品牌 for (var i = 0; i <10; i++){ selMod.select(i,true,false); }; } });