columns: [
{
title: "全选",
field: "select",
checkbox: true,
align: "left",//水平
valign: "middle",//垂直
align: "center",//水平
},
{
title: "标志",
field: "a_flag",
sortable: true,//是否可排序
align: "center",//水平
visible:true,
formatter: function (value, row, index) {
switch (value){
case 1:
value="录入";
break;
case 2:
value="递送";
break;
case 3:
value="接收";
break;
case 4:
value="核收";
break;
case 5:
value="报告";
break;
case 6:
value="<span style='color:red;'>回退</span>";
break;
case 7:
value="已处理";
break;
case 8:
value="已解决";
break;
}
return value;
}
},
{
title: "打印",
field: "a_print_flag",
sortable: true,//是否可排序
align: "center",//水平
visible:true,
formatter: function (value, row, index) {
switch (value){
case 0:
value="未";
break;
case 1:
value="<span style='color:red;'>已</span>";
break;
}
return value;
}
},
]
//获取所有选中的行,循环
var array= $("#table").bootstrapTable('getSelections');
$(array).each(function(i,e){
if( e.a_flag != "1"){
num = 2;
}
});