码迷,mamicode.com
首页 > 其他好文 > 详细

easyUI创建dialog弹框

时间:2016-12-23 01:31:03      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:sort   查询   ati   title   .ajax   格式化   接收   grid   ...   

1.在当前页面必须有一个DIV

<!-- 保证金明细的详情列表显示 -->
    <div id="dialog-alarm-detail"></div>

 

 

2.DIV这个可以弹出对话框

 

 

//DIV对象
    var detailLog= $(‘#dialog-alarm-detail‘).dialog(
            {
                title: ‘保证金明细详情‘,
                width: ‘60%‘,
                height:‘60%‘,
                modal: true,
                closable:true,
                href: parent.parent.baseUrl+"customer/bail/bailInfo",

 

 

3.通过web端的跳转到html页面

    /**
     * 进入到保证金明细的详情查询的页面
     * 
     */
    @RequestMapping(value = "bailInfo")
    public String bailInfo(Model model) {
        return "user/bail/bailInfo";
    }

 

 

4.在用html页面里面的元素,接收返回的内容

onLoad: function () {
                     $.ajax({  
                         type: "POST",  
                         async: false,  
                         success: function (result) {
                             //新创建的格式化的表格
                             $(‘#detail‘).datagrid({
                                idField : ‘id‘, // 只要创建数据表格 就必须要加 ifField
//                                title : ‘保证金明细详情‘,
                                width: ‘100%‘,
                                height:‘100%‘,
                                url : parent.parent.baseUrl+‘customer/bail/bailDetailsInfo?customerId=‘+customerId+‘&&bailClass=‘+bailClass+‘&&agencyId=‘+agencyId,
                                method : ‘GET‘,
                                fitColumns : true,
                                striped : true, // 隔行变色特性
                                nowrap : false,
                                loadMsg : ‘数据正在加载,请耐心的等待...‘,
                                rownumbers : true,
                                sortName : ‘crtTime‘,
                                sortOrder : ‘desc‘,
                                rowStyler : function(index, record) {},
                                columns : [ [{
                                    field : ‘updTime‘,
                                    title : ‘冻结时间‘,
                                    width : 50,
                                    align : ‘center‘,
                                }, {
                                    field : ‘bailStatus‘,
                                    title : ‘保证金冻结状态‘,
                                    width : 50,
                                    align : ‘center‘,
                                    formatter : statusFot
                                }, {
                                    field : ‘lockBail‘,
                                    title : ‘保证金冻结金额‘,
                                    width : 80,
                                    align : ‘center‘
                                }, {
                                    field : ‘goodsName‘,
                                    title : ‘拍卖名称‘,
                                    width : 80,
                                    align : ‘center‘
                                }]],
                                pagination : false,
                                pageSize : 10,
                                pageList : [ 5, 10, 15, 20, 50 ],
                            });
                             
                         }
                     });
                 },
            buttons : [ {
                text : "关闭",
                handler : function() {
                    detailLog.dialog(‘close‘);
                }
            } ]
   });

 

 

 

5.通过width和hight调整样式

 

easyUI创建dialog弹框

标签:sort   查询   ati   title   .ajax   格式化   接收   grid   ...   

原文地址:http://www.cnblogs.com/mr-wuxiansheng/p/6212457.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!