您的位置:首页 > 产品设计 > UI/UE

easyui的自定义行工具栏

2016-06-21 10:32 537 查看
$("#tt").datagrid({
url : basePath +'companywebInfo/queryAllCompanyInfo.htm',
title : "企业渠道管理",
pageSize : 5,
pageList : [ 5, 10, 15, 20, 30 ],
pagination : true,
border : false,
loadMsg : '请稍后,正在加载.....',
idField : "id",
columns : [ [
{field : "name",
align : 'center',
title : "企业名称",
width : 250
},
{field : "phone",
align : 'center',
title : "联系方式",
width : 90
},
/* {field : "integrate",
align : 'center',
title : "企业积分",
width : 90
}, */
{field : "address",
align : 'center',
title : "公司地址",
width : 300
},
{field : "industry",
align : 'center',
title : "所属行业",
width : 150

},
{
field : "serverphone",
align : 'center',
title : "企业邮箱",
width : 200
},
{
field : "verificationStatus",
align : 'center',
title : "验证审核状态",
width : 90,
formatter : function(value, row, index) {
switch(value){
case "1":
return "未通过";
case "2":
return "已通过";
}

}
},
{field : "dd",
align : 'center',
title : "操作",
width : 150,
formatter : function(value, row, index) {
var btn = '<a name="'+row.id+'" class="editcls" onclick="setChanne(this);" style="color: #FF0000" href="javascript:void(0)">设置渠道</a>';
var btn2 = '<a name="'+row.id+'" class="editcls2"  onclick="cancelChanne(this);" style="color: #FF0000" href="javascript:void(0)">取消渠道</a>';
return btn+"/"+btn2;
}
}
]]

});
//设置渠道
    function setChanne (obj){
        //获取name值
        var id = $(obj).attr("name");
        sendAjax(id,"3");
        
    }
    //取消渠道
    function  cancelChanne(obj){
        //获取name值
        var id = $(obj).attr("name");
        sendAjax(id,"1");
    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: