码迷,mamicode.com
首页 > Web开发 > 详细

jquery - easyui - 分页

时间:2016-08-02 16:50:42      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:

  1. datagrid 【表格分页】
  2. var orderDataGrid = $("#orderDataGrid").datagrid({
    width : "auto",
    height : "auto",
    idField : "memberid",                                                                                   //【主键】
    url : "${pageContext.request.contextPath}/orderweb/getOrderList",               //【获得数据接口】
    columns : [[                                                                                               //【列名】
    {field : "orderid", title : "订单编号", width:fixWidth(0.13)},
    {field : "uphonenumber", title : "下单人手机号码", width:fixWidth(0.1)},
    {field : "prodname", title : "商品名称", width:fixWidth(0.1)},
    {field : "price", title : "商品市场价", width:fixWidth(0.08), formatter:priceFormatter},
    {field : "pointsvalue", title : "商品保险币价值", width:fixWidth(0.1), formatter:pointsValueFormatter},
    {field : "protype", title : "商品类型", width:fixWidth(0.06), formatter:protypeFormatter},
    {field : "receiver", title : "收件人", width:fixWidth(0.1)},
    {field : "orderstatus", title : "订单状态", width:fixWidth(0.1), formatter:orderStatusFormatter},
    {field : "udphonenumber", title : "收件人手机号码", width:fixWidth(0.1)},
    {field : "ordertime", title : "下单时间", width:fixWidth(0.15), formatter : updateTimeFormatter},
    {
    field : "operation", title : "操作", width:fixWidth(0.15), formatter : operationFormatter
    }
    ]],
    fitColumns : true,
    rownumbers : true,
    pagination : true,
    pageSize : 10,
    pageList : [10, 20],
    striped : true,
    onBeforeLoad : function(param) {
    param.pageindex = param.page;
    param.pagesize = param.rows;

    var orderid = $("input[name=‘orderid‘]").val();
    if(orderid != "" && typeof(orderid) != "undefined" && orderid != null) {
    param.orderid = orderid;
    }

    var phonenumber = $("input[name=‘phonenumber‘]").val();
    if(phonenumber != "" && typeof(phonenumber) != "undefined" && phonenumber != null) {
    param.phonenumber = phonenumber;
    }

    var prodname = $("input[name=‘prodname‘]").val(); //【获得所有name = prodname的input标签】
    if(prodname != "" && typeof(prodname) != "undefined" && prodname != null) {
    param.prodname = prodname;
    }

    var orderstatus = $("select[name=‘ordetstatus‘] option:selected").val();
    if(orderstatus) {
    param.orderstatus = orderstatus;
    }

    delete param.page;
    delete param.rows;

    return true;
    },
    onClickRow: onClickRowFunction,
    onLoadError : onLoadErrorFunction

    });

  3. 技术分享

     

jquery - easyui - 分页

标签:

原文地址:http://www.cnblogs.com/caer/p/5729587.html

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