`
limit_wolve
  • 浏览: 508 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

extjs tab选显卡嵌套怎么玩啊,求大神执教啊

UI 
阅读更多
var viewport = new Ext.Viewport({
        layout:'border',
        items:[
        new Ext.TabPanel({
                id:'main-tabs',
                activeTab:0,
                region:'center',
                margins:'0 5 5 0',
                resizeTabs:true,
enableTabScroll:true,
//headerCfg:{style:'display:none'},//隐藏表单头部
                tabWidth:600,
height:parent.height,
style:'text-align:center;',
                items:[{ title: '<div align="center">水泥客户区域维护</div>', 
     listeners:{                   // 添加监听器,点击此页面的tab时候要重新加载(刷新功能)
activate:function(){
  this.getUpdater().refresh();
   }
   },
                   items:[{
  layout:'column',
  items:[
new Ext.FormPanel({
  labelWidth: 80,
  labelAlign: 'right',
  frame: false,
  id:'custioms',
      region:'north',
  title: '',
  height:parent.height,
  //width:600,
  items: [{
xtype:'tbtext',
text : '查询条件',
style:'color:#009DD9;',
width:240
},{
layout:'column',
border:false,
bodyStyle:'padding:15px 0 0 40px;',
items:[{
columnWidth:.5,
border:false,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: '所属单位',
name: 'company',
emptyText: '所属单位',
width:240,
style:'margin-left:-375px;'
}, {
xtype:'textfield',
fieldLabel: '一级区域',
name: 'company',
emptyText: '一级区域',
width:240,
style:'margin-left:-375px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
bodyStyle:'padding-left:80px;',
items: [{
xtype:'textfield',
fieldLabel: '一级区域',
name: 'company',
emptyText: '一级区域',
width:240,
style:'margin-left:-295px;'
}, {
xtype:'textfield',
fieldLabel: '客商名称',
name: 'company',
emptyText: '客商名称',
width:240,
style:'margin-left:-295px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel : '负责人',
name : 'id',
emptyText: '负责人',
width:240,
style:'margin-left:-375px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
bodyStyle:'padding-left:80px;',
items: [{
xtype:'textfield',
fieldLabel: '业务人员',
name: 'company',
emptyText: '业务人员',
width:240,
style:'margin-left:-295px;'
}]
   }]
}],
  buttonAlign:'center',
  //bodyPadding :'0 0 0 30',
      buttons: [
  {
text: '查询',
handler: function(){            
search_btn();         
} 
  },{
text: '重置',
handler: function(){            
Ext.getCmp("custioms").form.reset();         
} 
  }]
}),new Ext.grid.GridPanel({
                            //region:'center',
                            id:'topic-grid',
                            store: ds,
                            cm: cm,
                            sm:sm,//指向定义好的单选按钮
                            trackMouseOver:false,
region:'north',
                            loadMask: {msg:'Loading Topics...'},
                             // 定制用户界面
                            viewConfig: {
                                forceFit:true,
                                enableRowBody:true,
                                showPreview:true
                            },
                          // 添加内陷的按钮 Businessline
       tbar : [
            {
            id : 'addUserForm',
            text : ' 新建  ',
            tooltip : '新建一个表单',
            iconCls : 'add',
            handler : function() {
                 add_btn();
            }
        }, '-', {
            id : 'editUserForm',
            text : '修改',
            tooltip : '修改',
            iconCls : 'edit',
            handler : function() {
                 edit_btn();
            }
        },'-', {
             text : '删除',
             tooltip : '删除被选择的内容',
             iconCls : 'remove',
             handler : function() {
                 handleDelete();
             }

        }
        ],
                            // 在底部的分页工具栏
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到{1}条记录,一共 {2} 条',
emptyMsg: "没有记录"
})
})
  ]
   }]
                }, 
                { title: '<div align="center">孰料客商区域维护</div>',
listeners:{                   // 添加监听器,点击此页面的tab时候要重新加载(刷新功能)
activate:function(){
this.getUpdater().refresh();
}
},  
                    items: [ 
                        { layout: 'column', 
                            //bodyStyle: "padding:5px 5px 5px 10px", 
                            border: false, 
                       items: [{
items:[
  new Ext.FormPanel({
  labelWidth: 80,
  labelAlign: 'right',
  frame: false,
  id:'custioms',
      region:'north',
  title: '',
  bodyStyle:'padding:20px 0px 0 40px;',
  height:250,
  //width:600,
  items: [{
xtype:'tbtext',
text : '查询条件',
style:'color:#009DD9;',
width:240
},{
layout:'column',
border:false,
bodyStyle:'padding:15px 0 0 40px;',
items:[{
columnWidth:.5,
border:false,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: '所属单位',
name: 'company',
emptyText: '所属单位',
width:240,
style:'margin-left:-375px;'
}, {
xtype:'textfield',
fieldLabel: '一级区域',
name: 'company',
emptyText: '一级区域',
width:240,
style:'margin-left:-375px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
bodyStyle:'padding-left:80px;',
items: [{
xtype:'textfield',
fieldLabel: '一级区域',
name: 'company',
emptyText: '一级区域',
width:240,
style:'margin-left:-295px;'
}, {
xtype:'textfield',
fieldLabel: '客商名称',
name: 'company',
emptyText: '客商名称',
width:240,
style:'margin-left:-295px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel : '负责人',
name : 'id',
emptyText: '负责人',
width:240,
style:'margin-left:-375px;'
}]
},{
columnWidth:.5,
border:false,
layout: 'form',
bodyStyle:'padding-left:80px;',
items: [{
xtype:'textfield',
fieldLabel: '业务人员',
name: 'company',
emptyText: '业务人员',
width:240,
style:'margin-left:-295px;'
}]
   }]
}],
  buttonAlign:'center',
  //bodyPadding :'0 0 0 30',
      buttons: [
  {
text: '查询',
handler: function(){            
search_btn();         
} 
  },{
text: '重置',
handler: function(){            
Ext.getCmp("custioms").form.reset();         
} 
  }]
}),
                        new Ext.grid.GridPanel({
                            //region:'center',
                            id:'topic-grid',
                            store: ds,
                            cm: cm,
                            sm:sm,//指向定义好的单选按钮
                            trackMouseOver:false,
region:'center',
                            loadMask: {msg:'Loading Topics...'},
                             // 定制用户界面
                            viewConfig: {
                                forceFit:true,
                                enableRowBody:true,
                                showPreview:true
                            },
                          // 添加内陷的按钮 Businessline
       tbar : [
            {
            id : 'addUserForm',
            text : ' 新建  ',
            tooltip : '新建一个表单',
            iconCls : 'add',
            handler : function() {
                 add_btn();
            }
        }, '-', {
            id : 'editUserForm',
            text : '修改',
            tooltip : '修改',
            iconCls : 'edit',
            handler : function() {
                 edit_btn();
            }
        },'-', {
             text : '删除',
             tooltip : '删除被选择的内容',
             iconCls : 'remove',
             handler : function() {
                 handleDelete();
             }

        }, '-', {
             text : '浏览',
             tooltip : '浏览被选择的内容',
             iconCls : 'browse',
             handler : function() {
                 brow_btn();
             }

        }
        ],
                            // 在底部的分页工具栏
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到{1}条记录,一共 {2} 条',
emptyMsg: "没有记录"
})
})
]
}]
                        } 
                    ] 
                }] //           
    })
]
    });
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics