$("#mostOffGoodsId").click(function(){
var goodsIdList="";
$.each($("input:checkbox:checked"),function(){
goodsIdList +=$(this).val()+",";
});
if(null ==goodsIdList || goodsIdList==undefined || '' ==goodsIdList){
alert("请选择下架商品!");
window.location.reload();
}else{
var url = 'mostGoodsUpload';
var par={"goodsId":goodsIdList,"upload":"02"};
$.post(url,par,function(data){
window.location.reload();
});
}
});
$("#mostGoodsId").click(function(){
var goodsIdList="";
$.each($("input:checkbox:checked"),function(){
goodsIdList +=$(this).val()+",";
});
if(null ==goodsIdList || goodsIdList==undefined || '' ==goodsIdList){
alert("请选择上架商品!");
window.location.reload();
}else{
var url = 'mostGoodsUpload';
var par={"goodsId":goodsIdList,"upload":"01"};
$.post(url,par,function(data){
window.location.reload();
});
}
});
var allGoodsId ="";
var confirm=false;
$('input[name="addAllGoods"]').click(function(){
confirm=true;
if($(this).is(':checked')){
$('input[name="checkedIdUnique"]').each(function(){
$(this).prop("checked",true);
});
}else{
$('input[name="checkedIdUnique"]').each(function(){
$(this).removeAttr("checked",false);
});
}
$("input[name='checkedIdUnique']:checked").each(function() {
allGoodsId +=$(this).val()+",";
});
});