datagrid中给字段添加链接
作者:互联网
{title:'单价',field:'fPrice', width:60,align:'right',formatter: function(value,rowData){ if (rowData.quotationId!=''&&rowData.quotationId!=undefined){ var viewLink = '<a style=\"color:blue\" href="#" onclick="javascript:viewQuotationItem('+rowData.quotationId+')">'+ commafy(value) +'</a>'; return viewLink; } return commafy(value); } } function viewQuotationItem(iquotationId){ var link = '<%=request.getContextPath()%>/apps/quotation.do?method=edit&view=/apps/refquote/Quotation_view&iquotationId='+iquotationId; jQuery.layer({type: 2,shade: [0.5, '#000'],fix: false,title: '查看报价信息',iframe: {src : link},area: ['950px' , '400px']}); }
标签:commafy,title,apps,value,datagrid,添加,iquotationId,rowData,链接 来源: https://www.cnblogs.com/qiuhuiqiang/p/15213858.html