|
@@ -11,11 +11,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
del_url: 'coupon/del',
|
|
|
multi_url: 'coupon/multi',
|
|
|
import_url: 'coupon/import',
|
|
|
+ send_url: 'coupon/send',
|
|
|
table: 'coupon',
|
|
|
}
|
|
|
});
|
|
|
|
|
|
var table = $("#table");
|
|
|
+ var extend = $.fn.bootstrapTable.defaults.extend;
|
|
|
|
|
|
// 初始化表格
|
|
|
table.bootstrapTable({
|
|
@@ -26,7 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
[
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
- {field: 'type', title: __('Type'),searchList:types,formatter: Table.api.formatter.label},
|
|
|
+ {field: 'type', title: __('类型'),searchList:types,formatter: Table.api.formatter.label},
|
|
|
{field: 'amount', title: __('金额'), operate:'BETWEEN'},
|
|
|
{field: 'amount_full', title: __('满减金额'), operate:'BETWEEN'},
|
|
|
{field: 'num', title: __('Num')},
|
|
@@ -42,6 +44,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
$('.btn-add').data('area',["100%","100%"])
|
|
|
+
|
|
|
+ $('.btn-send').click(function (){
|
|
|
+ let id=[]
|
|
|
+ table.bootstrapTable('getSelections').forEach(item=>{
|
|
|
+ id.push(item.id)
|
|
|
+ })
|
|
|
+ Fast.api.open(extend.send_url+`/ids/${id.join(',')}`,$(this).text())
|
|
|
+ })
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|