|
@@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
showExport: false,
|
|
|
columns: [
|
|
|
[
|
|
|
- {checkbox: true},
|
|
|
+ {field: 'state', checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
{field: 'username', title: __('Username'), operate: 'LIKE'},
|
|
|
{field: 'nickname', title: __('Nickname'), operate: 'LIKE'},
|
|
@@ -95,6 +95,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
+
|
|
|
+ // 获取选中项
|
|
|
+ $(document).on("click", ".btn-selected", function () {
|
|
|
+ var that = this;
|
|
|
+ var ids = Table.api.selectedids(table);
|
|
|
+ Layer.confirm('确认发放?', function (index) {
|
|
|
+ // Layer.alert(JSON.stringify(Table.api.selectedids(table)));
|
|
|
+ Table.api.multi('couponuser/giveout/coupon_id/' + Config.coupon_id, ids.join(","), table, that);
|
|
|
+ Layer.close(index);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|
|
@@ -102,6 +113,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
edit: function () {
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
+ selected: function () {
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
api: {
|
|
|
bindevent: function () {
|
|
|
Form.api.bindevent($("form[role=form]"));
|