Bbar和Tbar的使用

原创 2013年12月04日 10:30:13

tbar: [

            '<fontstyle="line-height:25px;color:blue;">任务类型:</font>',

           OrderType,

           '-',

            '<fontstyle="line-height:25px;color:blue;">当前批次号:</font>',

           new Ext.form.TextField({

                id: 'txtBatchNumber',

               width: 150,

                readOnly: true,

                style: 'top:1px;'

            }),

           new Ext.Button({

                id: 'btnGetBatchNumber',

               //text: '生成批次号',

               tooltip: '<fontstyle="color:Red;line-height:25px;">重新生成一个新的批次号</font>',

                //minWidth: 100,

                iconCls: 'SalaryStructure_BatchNum',

                handler: function () {

                   GetTheBatchNumber();

               }

            }),

            '-', '<fontstyle="line-height:25px;color:blue;">雇员操作:</font>',

            {

                id: 'btnAddEmployee',

               text: '手工添加雇员',

               tooltip: '<fontstyle="color:green;line-height:25px;">从每间公司的雇员列表中,<br />选中至少一名雇员,<br />添加到薪酬计算名单中!</font>',

                iconCls: 'SalaryStructure_Add',

                disabled: true,

                handler: function () {

                    var AddWin = new Ext.Window({

                        title: '添加工资/计税任务雇员',

                        id: 'AddWindow',

                       width: 750,

                       height: 300,

                        closable: true,

                        modal: true,

                        closeAction: 'close',

                        layout: 'fit',

                        html: "<iframe id='EmployeeAddiFrame'src='EmployeeAddTemplate' style='width:100%; height:100%;'frameborder='0'></iframe>",

                       buttons: [

                            {

                                text: '确定',

                                iconCls: 'SalaryStructure_Success',

                                handler: function () {

                                    //取数

                                    var emStore = window.document.getElementById("EmployeeAddiFrame").contentWindow.GetData();

                                    if (emStore.length > 0) {

                                       AddDataToGridStore(emStore);

                                       AddBatchNumberToGridStore();

 

                                       Ext.getCmp("btnBlongMonth").enable();

                                       Ext.getCmp("btnCalcuteDate").enable();

                                       Ext.getCmp("btnUploadFile").enable();

                                       Ext.getCmp("txtTemplateName").enable();

 

                                       Ext.getCmp("txtCount").setValue(emStore.length);

                                    }

                                    else {

                                       Ext.getCmp("btnBlongMonth").disable();

                                       Ext.getCmp("btnCalcuteDate").disable();

                                       Ext.getCmp("btnUploadFile").disable();

                                       Ext.getCmp("txtTemplateName").disable();

 

                                       Ext.getCmp("txtCount").setValue("0");

                                    }

                                   AddWin.close();

                                }

                            }

                       ]

                   });

                   AddWin.show();

                   AddWin.setSize(750, 300);

               }

            }, {

                id: 'btnImportExcel',

               text: '通过Excel导入雇员',

               tooltip: '<fontstyle="color:green;line-height:25px;">通过Excel导入大批量的雇员名单,<br />导入模版可以从右侧菜单的<br /><b>[薪酬服务部]->[工资模版管理]</b>中下载</font>',

                iconCls: 'SalaryStructure_Leading-in',

                handler: function () {

                    var BatchAddWin = new Ext.Window({

                        closeAction: 'close',

                        modal: true,

                        id: 'BatchAddWindow',

                       width: 650,

                       height: 300,

                        closable: true,

                        layout: 'fit',

                        html: '<iframeid=\'BatchEmployeeAddiFrame\' src=\'BatchEmployeeAddTemplate\'style=\'width:100%; height:100%;\' frameborder=\'0\'></iframe>'

                   });

                   BatchAddWin.show();

               }

            },

           '-',

           DeleteOneEmployee,

           '-',

           ClearAllData

            ]


bbar: [

               '<fontstyle="line-height:25px;color:red;">总共</font>',

                newExt.form.TextField({ cls: 'textwidth', id: 'txtCount',style: 'margin-left:5px;margin-right:5px; top:0px;',readOnly: true }),

               new Ext.form.Label({ text: '', cls: 'labelcolor' }),

                '-',

               '<fontstyle="line-height:25px;color:blue;">参数指定:</font>',

               '<fontstyle="line-height:25px;">所属月份:</font>',

               new Ext.form.CustomDateField({ id:'btnBlongMonth', width: 90, format: 'Y-m', emptyText: '请指定月份', disabled: true, selectOnFocus: true,

                    setValueFn: function (value) {

                       AddBelongMonthToGridStore(value);

                   }

               }),

               '<fontstyle="line-height:25px;margin-left:10px;">计算日期:</font>',

               new Ext.form.CustomDateField({ id:'btnCalcuteDate', width: 100, format: 'Y-m-d', emptyText: '请指定日期', disabled: true, selectOnFocus: true,

                    setValueFn: function (value) {

                       AddCalcuteDateToGridStore(value);

                   }

               }),

               {

                   text: '上传统一附件',

                    id: 'btnUploadFile',

                   tooltip: '<fontstyle="color:blue;line-height:25px;">上传当前批次下所有雇员计算薪酬与税费需要的附件,<br />请先在薪酬计算名单中钩选使用相同附件的雇员,<br />如雇员没有附件,可不指定!</font>',

                    iconCls: 'SalaryStructure_Upload',

                    style: 'margin-left:10px;margin-right:10px;',

                    disabled: true,

                    handler: function () {

                        var winUpload = new Ext.Window({

                            title: '上传统一附件',

                            id: 'winUpload', width: 500, height: 300, closable: true,

                            resizable: true, minimizable: true, maximizable: true,

                            closeAction: 'close',

                            layout: 'fit',

                            html: '<iframe src=\'UploadUniteFile\'style=\'width:100%; height:100%;\' frameborder=\'0\'></iframe>',

                            listeners: {

                                'beforeclose': function(p) {

                                   GetTheSelectedData();

                                }

                            }

                       });

                       winUpload.show();

                   }

               },

               '指定模版:',

               TemplateSearchBox,

                '-',

               '<fontstyle="line-height:25px;color:blue;">任务操作:</font>',

                newExt.Button({

                   text: '校验数据',

                    iconCls: 'SalaryStructure_Check',

                    handler: function () {

                        var Flag = 1;

                        var ErrText = "";

                        //1:有无数据

                        if(store.getCount() == 0) { Flag *= 0; ErrText += "还没有添加雇员到薪酬计算名单中;<br />"; }

                        //2:是否指定所属月份

                        if (Ext.getCmp("btnBlongMonth").getRawValue()== "") { Flag *= 0; ErrText += "还没有指定“所属月份”;<br />"; }

                        //3:是否指定计算日期

                        if (Ext.getCmp("btnCalcuteDate").getRawValue()== "") { Flag *= 0; ErrText += "还没有指定“计算日期”;<br />"; }

                        //4:是否指定了工资模板

                        if (Ext.get("txtTemplateID").dom.value == "") { Flag *= 0;ErrText += "还没有选择工资模板;<br />"; }

 

                        if (Flag == 1) {

                            //第一步校验OK

                           Ext.MessageBox.show({

                                title: '提示',

                                msg: '<fontstyle="color:red;line-height:25px;">你指定当前批次的用于计算薪酬的模板为:<b>[' + Ext.getCmp("txtTemplateName").getRawValue() + ']</b><br />如果正确,请点击[]<br />不正确,请点击[]</font>',

                                buttons:Ext.MessageBox.YESNO,

                                fn: function (result) {

                                    if (result == 'yes') {

                                       CheckDataForReady();

                                    }

                                }

                            });

                       }

                        else {

                           Ext.MessageBox.alert("注意", "<fontstyle='color:red;line-height:25px;'>" + ErrText + "</font>");

                       }

                   }

               }),

                newExt.Button({

                    id: 'btnStarMission',

                   text: '发起任务',

                    iconCls: 'SalaryStructure_Next',

                    disabled: true,

                    style: 'text:-align:right; float:right;',

                    handler:function(){

                       StarMission();

                   }

               })

            ]


Ext各组件属性配置(上) -- 中文注释

Ext.form.BasicForm对应一个dom中的form,默认是用ajax提交的,如果的确想回传,可以使用如下方式var myForm = new Ext.form.BasicForm("for...

Apache ActiveMQ实战(1)-基本安装配置与消息类型

ActiveMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的、可扩展的、稳定的和安全的企业级消息通信。ActiveMQ使用Apache提供的授权,任何人都可...

ExtJs 解决在GridPanel中使用bbar或者tbar的分页条的宽度自适应问题

在GridPanel中利用bbar或者tbar来完成分页功能,是个很常见的做法,但是这里发现一个问题,就是宽度不能够自适应。首先我们看下这样的源代码: var store =...
  • jjkliu
  • jjkliu
  • 2014年01月25日 09:23
  • 1168

ext扩展异步分页bbar

  • 2011年02月15日 16:05
  • 1KB
  • 下载

Ext4 Ext.grid.Panel调用reconfigure后如何同时更新bbar导航条

Ext4 Ext.grid.Panel调用reconfigure后如何同时更新bbar导航条     Ext.onReady(function () {         Ext.define(...

Ext中显示多行tbar方法

ExtJS var oneTbar=new Ext.Toolbar({ items:[ {text:'复制'}, {t...

Ext.Button的禁用 extjs 获取一个panel 如何禁用bbar中的按钮 或者将它隐藏掉??

Ext.Button的禁用 extjs 获取一个panel 如何禁用bbar中的按钮 或者将它隐藏掉?? 标签: extjsbuttonext 2012-03-11 03:51 1308人...

Ext4 Ext.grid.Panel调用reconfigure后如何同时更新bbar导航条

Ext4 Ext.grid.Panel调用reconfigure后如何同时更新bbar导航条   本示例通过展示Ext4的Ext.grid.Panel调用reconfigure后如何同时更新gr...

extjs两个tbar问题

接触过extjs的同志们都知道每个panel都有一个tbar(top bar 上面工具栏) ,bbar(bottom bar 底部工具栏)      大家做查询页面,一般都是啥样子的?   最基本的是...

extjs两行tbar的问题

知道每个panel都有一个tbar(top bar 上面工具栏) ,bbar(bottom bar 底部工具栏)下面为大家介绍下extjs的两个tbar问题,感兴趣的朋友可以参考下 版本:extjs...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Bbar和Tbar的使用
举报原因:
原因补充:

(最多只允许输入30个字)