var mmg; function initSaleGrid(){ var laydate = layui.laydate; laydate.render({ elem: '#startDate' }); laydate.render({ elem: '#endDate' }); var h = WST.pageHeight(); var cols = [ {title:' ', name:'goodsName', width: 30, renderer: function(val,item,rowIndex){ var thumb = item['goodsImg']; // thumb = thumb.replace('.','_thumb.'); thumb = thumb+'?x-oss-process=image/resize,w_60,h_60'; return ""; }}, {title:'商品名称', name:'goodsName', width: 150}, {title:'商品编号', name:'goodsSn', width: 80}, {title:'所属店铺', name:'shopName', width: 150}, {title:'订单总数', name:'orderNum', width: 80}, {title:'浏览总数', name:'pageNum', width: 80}, {title:'销量总数', name:'goodsNum' , width: 20}, {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){ var h = ""; h += "查看 "; return h; }} ]; mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true,indexColWidth:50, cols: cols,method:'POST', url: WST.U('admin/reports/topSaleGoodsByPage',WST.getParams('.ipt')), fullWidthRows: true, autoLoad: true, plugins: [ $('#pg').mmPaginator({}) ] }); } function loadGrid(){ var params = WST.getParams('.ipt'); params.goodsCatIdPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats').join('_'); params.page = 1; mmg.load(params); } function toolTip(){ WST.toolTip(); }