columns: [[
{ field: 'KeyContent', title: '关键词' },
{
field: 'ProductType', title: "用品/配件",
formatter: function (value, rec) {
if (value == 0)
return "配件"
else if (value == 1)
return "用品";
else
return "";
}
},
{
field: 'ID', title: "操作",
formatter: function (value, rec) {
return "<a href='javascript:;' onclick='edit(\"" + value + "\")'>编辑</a>|<a v='"+value+"' href='javascript:;' onclick='del(this)'>删除</a>"
}
}
]]
function del(obj) {
var id = $(obj).attr('v'); $.post("/ProductLucene/DelConditions",{ id: id },function (r) {
if (r == false) {
alert('删除失败'); return false;
}else
$('#divList').datagrid('reload'); });
}