layui table 前端分页

           var tableIns = table.render({
                elem: '#test',
                skin: 'true',
                url: BseUrl + 'api/Orders/GetConfirmedOrderInfo_HT',
                toolbar: '#serchMeu',
                height: 'full-60',//高度最大化减去差值
                where: { sysId:"",resUrl: window.localStorage.getItem('url'), procut: "", projectItem: "", ispost:'1', isTransfer: '0' },
                parseData: function (res) { //res 即为原始返回的数据
                    var data = "";
                    var result = "";
                    if (res.Data != "") {
                        data = JSON.parse(res.Data);
                       result = data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
                    }
                    debugger
                    return {
                        "code": '0', //解析接口状态
                        "msg": res.Info, //解析提示文本
                        "count": data.length, //解析数据长度
                        "data": result //解析数据列表
                    };
                },
                headers: { "token": tokens },
                cellMinWidth: 100,
                title: '用户数据表',
                cols: [[
                    { type: 'checkbox', fixed: 'left', width: '5%', class:"dddd"},//data.IsTransfer
                    { field: 'Asin', title: '产品信息', width: '20%', templet: '#trToolbar', event: 'procutReport' },
                    { field: 'web', title: '下单时间/订单号', width: '15%', templet: '#trDate' },
                    { field: 'name', title: '单价/其他', width: '10%', templet: '#trdj' },
                    { field: 'sum', title: '客户名称/付款金额', width: '15%', templet: '#trkh' },
                    { field: 'sign', title: '状态/详情', width: '12%', templet: '#trdd', align: 'left', event: 'viewReport' },
                    { field: 'sum', title: '转包信息', width: '13%', templet: '#zhuanbao', align: 'left', style: 'text-align: center;line-height:100px;', event: 'zhuanbaoReport' },
                    { fixed: 'right', title: '操作', toolbar: '#optionMenu', width: '10%', align: 'center',style: 'text-align: center;line-height:100px;', }
                ]],
                id: 'searchReload',
                page: { limit: 5, layout: ['prev', 'page', 'next', 'count'], },
                done: function (res, curr, count) {}
            });

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黑色咖啡 Ken

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值