easyui的自定义行工具栏

  $("#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" οnclick="setChanne(this);" style="color: #FF0000" href="javascript:void(0)">设置渠道</a>'; 
						 var btn2 = '<a name="'+row.id+'" class="editcls2"  οnclick="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");
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值