<div>
<table id="client_patrolPlan_list_dg"></table>
</div>
<script>
$(function(){
$("#client_patrolPlan_list_dg").datagrid({
url:"${pageContext.request.contextPath}/patrolPlan/listJson",
fit:true,
columns:[
[
{field:"id", hidden:true},
{title:"文字编号", field:"name", width:150, resizable:true,editor:'text'},
{title:"数字编号", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"记录名称", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"创建时间", field:"createDate", width:240, resizable:true, formatter:function(value,row,index) {
return cTime(value);
}},
{title:"创建人", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"被执法经营者", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"经营者法定代表人", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"回传状态", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"回访状态", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"检查类别", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"检查人", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"领导", field:"deptName", width:150, resizable:true,editor:'text'},
{title:"录单人", field:"deptName", width:150, resizable:true,editor:'text'},
// {title:"审查", field:"reviewStatus", width:100, resizable:true, formatter:function(value,row,index) {
// var ret = "";
// if (value == "0") {
// ret = "等待审查";
// } else if (value == "1") {
// ret = "审查通过";
// }
// return ret;
// }},
{title:"是否启用", field:"enable", width:150, resizable:true, formatter:function(value,row,index) {
var ret = "";
if (value == "0") {
ret = "启用";
} else if (value == "1") {
ret = "禁用";
}
return "<a style='color:#0080ff;text-align:center;' href='javascript:client_patrolPlan_enable(" + value + ",\"" + row.id + "\")' >" + ret + "</a>";
}}
]
],
pagination:true,
rownumbers:true,
singleSelect:true,
autoRowHeight:false,
rowStyler:function(index, row){
return "height:28px; ";
},
onRowContextMenu:function(e, rowIndex, rowData){
e.preventDefault();
$("#client_patrolPlan_list_dg").datagrid("selectRow", rowIndex);
$("#client_patrolPlan_list_mm").menu("show",{
left:e.pageX,
top:e.pageY
});
},
onDblClickRow:function(rowIndex, rowData){
$("#client_patrolPlan_list_dg").datagrid("selectRow", rowIndex);
client_patrolPlan_search();
},
toolbar:[{
text:"新增",
iconCls:"icon-add",
handler:function(){
client_patrolPlan_add();
}
},{
text:"回执",
iconCls:"icon-edit",
handler:function(){
client_patrolPlan_edit();
}
},{
text:"回访",
iconCls:"icon-search",
handler:function(){
client_patrolPlan_search();
}
}]
});
</script>
转载于:https://blog.51cto.com/yipaixiaoyayin/1438994