var CardPanel=Ext.extend(EasyJF.Ext.CrudPanel,{
	id:"cardPanel",
	title:"卡号管理",
	baseUrl:"card.php",
	entityIdName:"id",
	createForm:function(){
	var formPanel=new Ext.form.FormPanel({
		frame:true,
		labelWidth:70,
		labelAlign:'right',
		defaultType:'textfield',
                        defaults:{anchor:"-20"},
                        items:[{xtype:"hidden",name:this.entityIdName},
                            new Ext.form.ComboBox({
                        hiddenName:'gameclassid',
                        value:'请选择游戏分类',
                        store:new Ext.data.JsonStore({
                                autoLoad:true,
                                root:'result',
                                url: 'gameClass.php?cmd=list',
                                //url:'test.php',
                                fields : [{name : 'id'}, {name : 'name'}]
                            }),
                        fieldLabel:'游戏分类',
                        valueField:"id",
                        displayField:"name",
                        editable:false,
                        triggerAction:"all",
                        typeAhead:true,
                        mode : 'local'
                    }),
{fieldLabel:'卡号',name:'number'},
{xtype:"hidden",fieldLabel:'addTime',name:'addTime'},
{fieldLabel:'领取时间',name:'getTime'},
{xtype:"hidden",fieldLabel:'userId',name:'userId'},
{fieldLabel:'领取用户',name:'username'}
	]
	});

		return formPanel;
    },
    createWin:function(){
    	return this.initWin(438,300,"卡号管理");
    },
    storeMapping:["id","number","addTime","getTime","userId","username","gameclass","gameclassid"    	],
	initComponent : function(){
    this.cm=new Ext.grid.ColumnModel([
    new Ext.grid.RowNumberer(),
    {header: "卡号", sortable:true,width: 300, dataIndex:"number"},
    {header: "游戏分类", sortable:true,width: 300, dataIndex:"gameclass"},
    {header: "领取时间", sortable:true,width: 300, dataIndex:"getTime"},
    {header: "领取用户", sortable:true,width: 300, dataIndex:"username"}
        ]);
	CardPanel.superclass.initComponent.call(this);
}

});
