87,910
社区成员
发帖
与我相关
我的任务
分享
{ field: '', title: '委托', halign: 'center', align: 'center', valign: 'middle', width: 70, sortable: false, formatter: WWFormatter },
function WWFormatter(value, row, index) {
$.ajax({
type: "Get",
url: "/Business/GetWWCount",
data: { id: row.业务ID },
async: true,
success: function (data) {
if (data != '0') {
return '<i class="text-danger fa fa-check-circle fa-lg"></i>';
}
else
{
return '';
}
},
error: function () { return ''; }
});
}
public string GetWWCount(int id)
{
return "1"; //为方便调试,直接返回"1"
}
function WWFormatter(value, row, index) {
var info;
$.ajax({
type: "Get",
url: "/Business/GetWWCount",
data: { id: row.业务ID },
async: true,
success: function (data) {
if (data != '0') {
info= '<i class="text-danger fa fa-check-circle fa-lg"></i>';
}
else
{
return '';
}
},
error: function () { return ''; }
});
return info
}
$("#table").bootstrapTable('updateCell', {
index: 1,
field: 'name',
value: 'xyz'
});