http://www.xueh188.top/index.php/archives/42/

{
                        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
                    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值