zoukankan      html  css  js  c++  java
  • easyUi 页面创建一个toolbar实例

    1.定义toolbar方法

    pagination : true,
    pageSize : 10,
    pageList : [ 5, 10, 15, 20, 50 ],
    toolbar : toolbarFtt()

    2.定义新增方法

    function toolbarFtt() {
        if (top.checkRole([ 'LOCK_FORFEITRUE' ])) {
            return [ {
                text : '缴纳保证金',
                iconCls : 'icon-add',
                handler : gridAdd
            } ]
        }
    }

    3.新增方法的具体实现

    function gridAdd() {
        var dlg = $('#mydialog').dialog({
            title : '缴纳保证金',
            left:"30%",
            top:"20%",
            buttons : [ {
                text : "确认支付",
                handler : function() {
                    confirmSubmit();
                }
            }, {
                text : "关闭",
                handler : function() {
                    dlg.dialog('close');
                }
            } ]
        });
        $('#myform').form('reset');
        getPayedWay();//支付方式处理
        getAgency();//查询所有的市场机构id和名称
        $('#mydialog').dialog('open'); // 打开窗口
    }

    4.

    function confirmSubmit() {
        if($('#bailClass').combobox('getValue')==1){
            //默认选中第一个
            $('#agencyId').combobox('setValue',0);
        }
        if ($('#myform').form('validate')) {
            $.ajax({
                type : "POST",
                url : top.baseUrl + 'customer/bail/charge',
                data : $('#myform').serialize(),
                dataType : 'json',
                success : function(result) {
                    $('#mydialog').dialog('close');
                    $('#gridTable').datagrid('reload');
                    $('#gridTable').datagrid('unselectAll');
                    $.messager.show({
                        title : '提示信息!',
                        msg : '操作成功!'
                    });
                },
                error : function(result) {
                    
                }
            });
    
        }
    }
  • 相关阅读:
    git基本报错处理
    上传本地文件到gitee
    Pycharm Process finished with exit code -1073741819 (0xC0000005)
    linux ubuntu 安装后的配置
    Anaconda 和 jupyter notebook入门
    LaTeX公式小结--持续更新中
    markdown基本语法
    Python数据类型的整理
    linux磁盘分区与挂载
    第一章linux系统概述
  • 原文地址:https://www.cnblogs.com/mr-wuxiansheng/p/6217019.html
Copyright © 2011-2022 走看看