| | |
| | | |
| | | form.render(); |
| | | |
| | | let currPageGoods = 1;//首先默认值为1,防止出错 |
| | | //获取当前页 |
| | | currPageGoods = $view.find(".layui-laypage-em").next().html(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | | var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); |
| | | tableIns.reload({where: params, page: {curr: 1}}); |
| | | tableIns.reload({where: params, page: {curr: currPageGoods}}); |
| | | }); |
| | | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | tableIns.reload({where: getQueryParams(), page: {curr: currPageGoods}, initSort: sortObject}); |
| | | }); |
| | | |
| | | $add.on('click', function () { |
| | |
| | | {field: 'status', title: '状态', |
| | | templet: function (d) { |
| | | if (d.status === 1) { |
| | | return '<span style="color:red;">待支付</span>' |
| | | return '<span style="color:blue;">待支付</span>' |
| | | } else if (d.status === 2) { |
| | | return '<span style="color:green;">待发货</span>' |
| | | return '<span style="color:red;">待发货</span>' |
| | | }else if (d.status === 3) { |
| | | return '<span style="color:green;">待收货</span>' |
| | | }else if (d.status === 4) { |