Files
addons
app_download_files
extend
hyhproject
admin
behavior
common
conf
controller
model
validate
view
accreds
addons
adgoods
adpositions
ads
areas
articlecats
articles
attributes
banks
brands
carts
cashdraws
chargeitems
css
datas
ectday
ectdeal
ecttarget
express
friendlinks
goods
goodsappraises
goodscats
goodsclassify
goodsconsult
homemenus
hooks
images
img
informs
handle.html
informs.js
list.html
view.html
js
log_sys_data
logmoneys
logoperates
logsms
logstafflogins
member
menus
messages
mobilebtns
navs
ordercomplains
orderrefunds
orders
payments
platform
recommends
reports
roles
settlements
shops
shops_back
speccats
staffs
styles
sysconfigs
templatemsgs
trade_rule
userranks
users
userscores
wsysconfigs
wxmenus
wxpassivereplys
wxtemplatemsgs
wxusers
base.html
enter_license.html
index.html
login.html
main.html
app
common
home
home2
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
hyhproject.tar.gz
index.html
index.php
reg.lock
robots.txt
qlg.tsgz.moe/hyhproject/admin/view/informs/informs.js
2019-09-06 23:53:10 +08:00

93 lines
3.9 KiB
JavaScript
Executable File

var mmg;
function initGrid(){
var h = WST.pageHeight();
var cols = [
{title:' ', name:'goodsImg', width: 30, renderer: function(val,item,rowIndex){
var thumb = item['goodsImg'];
// thumb = thumb.replace('.','_thumb.');
return "<span class='weixin'><img id='img' onmouseout='toolTip()' onmouseover='toolTip()' style='height:60px;width:60px;' src='"+WST.conf.IMGURL+"/"+thumb
+"'><span class='imged' ><img style='height:180px;width:180px;' src='"+WST.conf.IMGURL+"/"+item['goodsImg']+"'></span></span>";
}},
{title:'举报商品',sortable: true, name:'goodsName',renderer: function(val,item,rowIndex){
return "<a style='color:blue' target='_blank' href='"+WST.U("home/goods/detail","id="+item['goodsId'])+"'><span><p class='wst-nowrap'>"+item['goodsName']+"</p></span></a>";
}},
{title:'举报店铺',sortable: true, name:'shopName'},
{title:'举报人', name:'userName', width: 30,sortable: true, renderer: function(val,item,rowIndex){
return WST.blank(item['userName'],item['loginName']);
}},
{title:'举报类型',sortable: true, name:'informType'},
{title:'举报时间',sortable: true, name:'informTime'},
{title:'状态', name:'informStatus', renderer: function(val,item,rowIndex){
if(val==0)
return "<span class='statu-wait'><i class='fa fa-clock-o'></i> 等待处理</span>";
else if(val==1)
return "<span class='statu-no'><i class='fa fa-ban'></i> 无效举报</span>";
else if(val==2)
return "<span class='statu-yes'><i class='fa fa-check-circle'></i> 有效举报</span>";
else if(val==3)
return "<span class='statu-no'><i class='fa fa-exclamation-triangle'></i> 恶意举报</span>";
}},
{title:'操作', name:'op' ,width:80, align:'center', renderer: function(val,item,rowIndex){
var h = "";
h += "<a class='btn btn-blue' href='javascript:toView(" + item['informId'] + ")'><i class='fa fa-search'></i>查看</a> ";
if(item['informStatus']==0)
h += "<a class='btn btn-blue' href='javascript:toHandle(" + item['informId'] + ")'><i class='fa fa-pencil'></i>处理</a> ";
return h;
}}
];
mmg = $('.mmg').mmGrid({height: (h-85),indexCol: true, indexColWidth:50, cols: cols,method:'POST',
url: WST.U('admin/Informs/pageQuery'), fullWidthRows: true, autoLoad: true,
remoteSort:true ,
sortName: 'informTime',
sortStatus: 'desc',
plugins: [
$('#pg').mmPaginator({})
]
});
}
function toView(id){
location.href=WST.U('admin/Informs/view','cid='+id);
}
function toHandle(id){
location.href=WST.U('admin/Informs/toHandle','cid='+id);
}
function loadGrid(){
var p = WST.getParams('.j-ipt');
p.page = 1;
mmg.load(p);
}
function finalHandle(id){
var params = {};
params.cid = id;
params.finalResult = $.trim($('#finalResult').val());
params.informStatus = $('input:radio:checked').val();
if(params.finalResult==''){
WST.msg('请输入处理信息!',{icon:2});
return;
}
if(typeof(params.informStatus)=='undefined'){
WST.msg('请选择处理结果',{icon:2});
return;
}
var c = WST.confirm({title:'信息提示',content:'您确定处理该举报商品吗?',yes:function(){
layer.close(c);
$.post(WST.U('Admin/Informs/finalHandle'),params,function(data,textStatus){
var json = WST.toAdminJson(data);
if(json.status=='1'){
WST.msg(json.msg,{icon:1});
location.reload();
}else if(json.status == '2'){
location.href=WST.U('admin/informs/index');
}else{
WST.msg(json.msg,{icon:2});
}
});
}});
}