?
{
field: 'buttons',
width: "120px",
title: __('操作'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'ajax',
text: __('退款'),
title: __('退款'),
classname: 'btn btn-xs btn-warning btn-magic btn-ajax',
// icon: 'fa fa-magic',
url: 'goods_order/refund',
confirm: '确认执行退款操作吗',
visible: function (row) {
if((row.status == 1) || (row.status == 5)){
return true;
}else{
return false;
}
//返回true时按钮显示,返回false隐藏
},
success: function (data,ret) {
Layer.alert(ret.msg);
table.bootstrapTable('refresh', {});
return false;
},
error: function (data,ret) {
Layer.alert(ret.msg);
table.bootstrapTable('refresh', {});
return false;
}
}
],
formatter: Table.api.formatter.operate
}
?
|