|
@@ -31,6 +31,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
delivere_url: 'unishop/order/delivery',
|
|
|
product_url: 'unishop/order/product',
|
|
|
refund_url: 'unishop/order/refund',
|
|
|
+ cancelrefund_url: 'unishop/order/cancelrefund',
|
|
|
table: 'unishop_order',
|
|
|
}
|
|
|
});
|
|
@@ -72,6 +73,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
var url = options.extend.refund_url;
|
|
|
Fast.api.open(Table.api.replaceurl(url, row, table), __('Refund'), $(this).data() || {});
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 'click .btn-cancelrefund': function (e, value, row, index) {
|
|
|
+ e.stopPropagation();
|
|
|
+ e.preventDefault();
|
|
|
+ var table = $(this).closest('table');
|
|
|
+ var options = table.bootstrapTable('getOptions');
|
|
|
+ var ids = row[options.pk];
|
|
|
+ row = $.extend({}, row ? row : {}, {ids: ids});
|
|
|
+ var url = options.extend.cancelrefund_url;
|
|
|
+ Fast.api.open(Table.api.replaceurl(url, row, table), __('Refund'), $(this).data() || {});
|
|
|
+ }
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -279,6 +292,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
product: function(){
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
+ cancelrefund: function(){
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
refund: function(){
|
|
|
Controller.api.bindevent();
|
|
|
},
|