博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jquery - easyui - 分页
阅读量:4565 次
发布时间:2019-06-08

本文共 2156 字,大约阅读时间需要 7 分钟。

  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) {   //【说到ajax请求,难免需要在请求的时候传入一些查询条件,我通常是在onBeforeLoad事件中添加查询条件的】
    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.  

转载于:https://www.cnblogs.com/caer/p/5729587.html

你可能感兴趣的文章
链表的回文结构
查看>>
slqmap简单使用
查看>>
如何禁用或重新启用计算机的休眠功能
查看>>
window函数 resetAccumulator
查看>>
AKKA好文
查看>>
hdu - 1728逃离迷宫 && hdu - 1175 连连看 (普通bfs)
查看>>
python环境下xgboost的安装与使用
查看>>
C#的数据类型转换
查看>>
VC++视频会议系统源码 文档齐全
查看>>
非CI执行Allure2 trends空白问题
查看>>
【剑指offer】面试题 64. 求 1+2+3+...+n
查看>>
【Sorting】UVa400 Unix ls
查看>>
51Nod 1120 - 机器人走方格 V3(Lucas定理+Catalan数)
查看>>
pytest五:fixture_autouse=True
查看>>
bsearch函数二分法
查看>>
iptables应用
查看>>
手动上传文件到数据表
查看>>
Hadoop学习笔记—22.Hadoop2.x环境搭建与配置
查看>>
Linux 创建与删除(5)
查看>>
“耐撕”团队 2016.3.25 站立会议
查看>>