{
field: 'buttons',
width: "120px",
title: __('操作'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'send',
text: __('审核'),
title: __('审核'),
classname: 'btn btn-xs btn-primary btn-dialog btn-check',
icon: 'fa fa fa-send',
url: 'refund/refundreturn/check',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
//console.log(row);
if(row.status==0 ){
return true;
}else {
return false;
}
},
},
{
name: '退款',
text: __('退款'),
title: __('退款'),
classname: 'btn btn-xs btn-primary btn-dialog btn-check',
icon: 'fa fa fa-send',
url: 'refund/refundreturn/refundMoney',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
//在仅退款并已同意 或者在退货退款且已收到买家寄回的物品后
if ((row.type == 0 && row.status == 1) || (row.type == 1 && row.status == 3)) {
return true;
}else {
return false;
}
},
},
{
name: '收货确认',
text: __('收货确认'),
title: __('收货确认'),
classname: 'btn btn-xs btn-primary btn-dialog btn-check',
icon: 'fa fa fa-send',
url: 'refund/refundreturn/confirmRefund',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
//console.log(row);
if((row.type !=0 && row.status == 2) ){
return true;
}else {
return false;
}
},
},
{
name: '发货',
text: __('发货'),
title: __('发货'),
classname: 'btn btn-xs btn-primary btn-dialog btn-check',
icon: 'fa fa fa-send',
url: 'refund/refundreturn/delive',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
//console.log(row);
if((row.type ==2 && row.status == 3) ){
return true;
}else {
return false;
}
},
},
{
name: 'detail',
text: __('查看'),
title: __('查看详情'),
classname: 'btn btn-xs btn-info btn-dialog btn-check',
icon: 'fa fa-file-text-o',
url: 'refund/refundreturn/detail',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
],
formatter: Table.api.formatter.buttons,operate:false
}