首页 > 代码库 > ext4.0 二级联动
ext4.0 二级联动
var departTypeStore = Ext.create(‘Ext.data.Store‘,{
autoLoad : true,
fields:[‘ID‘,‘DEPART_NAME‘],
proxy : {
type : ‘ajax‘,
url : ‘getCardDepartList.ajax‘,//MECHAN_ID
reader : {
type : ‘json‘,
root : ‘list‘
},
/* extraParams: {
mechanId:rt
}
*/ },
});
var yyStore = Ext.create(‘Ext.data.Store‘,{
autoLoad : true,
fields:[‘MECHAN_IDE‘,‘MECHAN_NAME‘],
proxy : {
type : ‘ajax‘,
url : ‘getMechForJtCardList.ajax‘,
reader : {
type : ‘json‘,
root : ‘mechList‘
},extraParams: {
mechanId:rt
}
},
});
{
xtype : ‘combobox‘,
name : ‘f.UMI.MECHAN_ID:eq‘,
fieldLabel:‘运营商‘,
id : ‘type‘,
labelWidth:40,
emptyText:‘请选择‘,
store : yyStore,
displayField : ‘MECHAN_NAME‘,
valueField : ‘MECHAN_IDE‘,
flex : 3,
editable:false,
listeners: {// select监听函数
select : function(combobox){
// Ext.Msg.alert("提示",combobox.getValue());
departTypeStore.reset,
departTypeStore.load({
url: "getCardDepartList.ajax",
params: {
mechanId: combobox.getValue()
}
})}
}
},
{
xtype : ‘combobox‘,
name : ‘f.UDEP.ID:eq‘,
fieldLabel:‘充电客户‘,
id : ‘type1‘,
labelWidth:50,
emptyText:‘请选择‘,
store : departTypeStore,
displayField : ‘DEPART_NAME‘,
valueField : ‘ID‘,
flex : 3,
editable:false
}
ext4.0 二级联动