"+item['goodsName']+"
"; }}, {title:'商品编号', name:'goodsSn' ,width:60,sortable:true}, {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){ return '¥'+item['shopPrice']; }}, {title:'优惠率', name:'discountRate' ,width:20,sortable:true, renderer: function(val,item,rowIndex){ return item['discountRate']+'%'; }}, {title:'所属店铺', name:'shopName' ,width:60,sortable:true}, {title:'店铺电话', name:'phone' ,width:60,sortable:true}, {title:'申请上架时间', name:'saleTime' ,width:60,sortable:true}, {title:'审核通过时间', name:'createTime' ,width:60,sortable:true}, {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){ return ""+item['goodsCatName']+"
"; }}, {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'}, {title:'状态', name:'isSale' ,width:30,renderer: function (val,item,rowIndex){ if(item['isSale']==1){ return " 已上架"; }else{ return "已下架"; } }}, {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){ var h = ""; // h += "查看 "; // h += "添加ECT支付 "; if(WST.GRANT.SJSP_04)h += "违规下架 "; if(WST.GRANT.SJSP_03)h += "删除 "; return h; }} ]; mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST', url: WST.U('admin/goods/saleByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc', plugins: [ $('#pg').mmPaginator({}) ] }); } function loadGrid(){ var params = WST.getParams('.j-ipt'); params.areaIdPath = WST.ITGetAllAreaVals('areaId1','j-areas').join('_'); params.goodsCatIdPath = WST.ITGetAllGoodsCatVals('cat_0','pgoodsCats').join('_'); params.page = 1; mmg.load(params); } function toPay(id,type){ var box = WST.confirm({content:"您确定要添加ECT支付吗?",yes:function(){ var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000}); $.post(WST.U('admin/goods/goodsEct'),{id:id},function(data,textStatus){ layer.close(loading); var json = WST.toAdminJson(data); if(json.status=='1'){ WST.msg(json.msg,{icon:1}); layer.close(box); loadGrid(); }else{ WST.msg(json.msg,{icon:2}); } }); }}); } function toExportSale(){ var params = {}; params = WST.getParams('.j-ipt'); var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){ layer.close(box); location.href=WST.U('admin/goods/toExportSale',params); }}); } function del(id,type){ var box = WST.confirm({content:"您确定要删除该商品吗?",yes:function(){ var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000}); $.post(WST.U('admin/goods/del'),{id:id},function(data,textStatus){ layer.close(loading); var json = WST.toAdminJson(data); if(json.status=='1'){ WST.msg(json.msg,{icon:1}); layer.close(box); loadGrid(); }else{ WST.msg(json.msg,{icon:2}); } }); }}); } function illegal(id,type){ var w = WST.open({type: 1,title:((type==1)?"商品违规原因":"商品不通过原因"),shade: [0.6, '#000'],border: [0], content: '', area: ['500px', '260px'],btn: ['确定', '关闭窗口'], yes: function(index, layero){ var illegalRemarks = $.trim($('#illegalRemarks').val()); if(illegalRemarks==''){ WST.msg(((type==1)?'请输入违规原因 !':'请输入不通过原因!'), {icon: 5}); return; } var ll = WST.msg('数据处理中,请稍候...'); $.post(WST.U('admin/goods/illegal'),{id:id,illegalRemarks:illegalRemarks},function(data){ layer.close(w); layer.close(ll); var json = WST.toAdminJson(data); if(json.status>0){ WST.msg(json.msg, {icon: 1}); loadGrid(); }else{ WST.msg(json.msg, {icon: 2}); } }); } }); } function initAuditGrid(){ var h = WST.pageHeight(); var cols = [ {title:'商品ID', name:'goodsId' ,width:30,sortable:true}, {title:' ', name:'goodsName', width: 30, renderer: function(val,item,rowIndex){ return ""+item['goodsName']+"
"; }}, {title:'商品编号', name:'goodsSn' ,width:60,sortable:true}, {title:'价格', name:'shopPrice' ,width:20,sortable:true, renderer: function(val,item,rowIndex){ return '¥'+item['shopPrice']; }}, {title:'优惠率', name:'discountRate' ,width:20,sortable:true, renderer: function(val,item,rowIndex){ return item['discountRate']+'%'; }}, {title:'所属店铺', name:'shopName' ,width:60,sortable:true}, {title:'店铺电话', name:'phone' ,width:60,sortable:true}, {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){ return ""+item['goodsCatName']+"
"; }}, {title:'销量', name:'saleNum' ,width:20,sortable:true,align:'center'}, {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){ var h = ""; // h += "查看 "; if(WST.GRANT.DSHSP_04)h += "审核通过 "; if(WST.GRANT.DSHSP_04)h += "审核不通过 "; if(WST.GRANT.DSHSP_03)h += "删除"; return h; }} ]; mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:40, cols: cols,method:'POST',checkCol:true,multiSelect:true, url: WST.U('admin/goods/auditByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc', plugins: [ $('#pg').mmPaginator({}) ] }); } // 批量审核通过 function toBatchAllow(){ var rows = mmg.selectedRows(); if(rows.length==0){ WST.msg('请选择商品',{icon:2}); return; } var ids = []; for(var i=0;i"+item['goodsName']+"
"; }}, {title:'商品编号', name:'goodsSn' ,width:60,sortable:true}, {title:'所属店铺', name:'shopName' ,width:60,sortable:true}, {title:'所属分类', name:'goodsCatName' ,width:60,renderer: function(val,item,rowIndex){ return ""+item['goodsName']+"
"; }}, {title:'违规原因', name:'illegalRemarks' ,width:160}, {title:'操作', name:'' ,width:150, align:'center', renderer: function(val,item,rowIndex){ var h = ""; h += "查看 "; if(WST.GRANT.WGSP_04)h += "审核通过 "; if(WST.GRANT.WGSP_03)h += "删除 "; return h; }} ]; mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST', url: WST.U('admin/goods/illegalByPage'), fullWidthRows: true, autoLoad: true,remoteSort: true,sortName:'goodsSn',sortStatus:'desc', plugins: [ $('#pg').mmPaginator({}) ] }); } function toolTip(){ WST.toolTip(); }