jquery - easyui - 分頁

來源:互聯網
上載者:User

標籤:

  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 - 分頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.