|
@@ -5,13 +5,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
// 初始化表格参数配置
|
|
|
Table.api.init({
|
|
|
extend: {
|
|
|
- index_url: 'lottery/ticket/index' + location.search,
|
|
|
- add_url: 'lottery/ticket/add',
|
|
|
- edit_url: 'lottery/ticket/edit',
|
|
|
- del_url: 'lottery/ticket/del',
|
|
|
- multi_url: 'lottery/ticket/multi',
|
|
|
- import_url: 'lottery/ticket/import',
|
|
|
- table: 'ticket',
|
|
|
+ index_url: 'lottery/tickets/index' + location.search,
|
|
|
+ add_url: 'lottery/tickets/add',
|
|
|
+ edit_url: 'lottery/tickets/edit',
|
|
|
+ del_url: 'lottery/tickets/del',
|
|
|
+ multi_url: 'lottery/tickets/multi',
|
|
|
+ import_url: 'lottery/tickets/import',
|
|
|
+ table: 'tickets',
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -26,7 +26,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
[
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
- {field: 'code', title: __('Code'), operate: 'LIKE'},
|
|
|
+ {field: 't1', title: __('T1')},
|
|
|
+ {field: 't2', title: __('T2')},
|
|
|
+ {field: 't3', title: __('T3')},
|
|
|
+ {field: 't4', title: __('T4')},
|
|
|
+ {field: 't5', title: __('T5')},
|
|
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
]
|
|
|
]
|
|
@@ -34,6 +38,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
+ // 还原奖池 点击处理
|
|
|
+ $(document).on("click", "._js_recycle_tickets", function () {
|
|
|
+
|
|
|
+ Layer.confirm('确认还原?,还原和重新过滤都需要很长时间?', {
|
|
|
+ icon: 3,
|
|
|
+ title: '确认还原?'
|
|
|
+ }, function (index) {
|
|
|
+ Backend.api.ajax({
|
|
|
+ url: "lottery/tickets/reset"
|
|
|
+ }, function () {
|
|
|
+ //$(that).closest("tr").remove();
|
|
|
+ Layer.close(index);
|
|
|
+ table.bootstrapTable('refresh');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
recyclebin: function () {
|
|
|
// 初始化表格参数配置
|
|
@@ -47,13 +67,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
|
|
|
// 初始化表格
|
|
|
table.bootstrapTable({
|
|
|
- url: 'lottery/ticket/recyclebin' + location.search,
|
|
|
+ url: 'lottery/tickets/recyclebin' + location.search,
|
|
|
pk: 'id',
|
|
|
sortName: 'id',
|
|
|
columns: [
|
|
|
[
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
+ {field: 't1', title: __('T1')},
|
|
|
+ {field: 't2', title: __('T2')},
|
|
|
+ {field: 't3', title: __('T3')},
|
|
|
+ {field: 't4', title: __('T4')},
|
|
|
+ {field: 't5', title: __('T5')},
|
|
|
{
|
|
|
field: 'deletetime',
|
|
|
title: __('Deletetime'),
|
|
@@ -73,7 +98,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
text: __('Restore'),
|
|
|
classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
|
|
|
icon: 'fa fa-rotate-left',
|
|
|
- url: 'lottery/ticket/restore',
|
|
|
+ url: 'lottery/tickets/restore',
|
|
|
refresh: true
|
|
|
},
|
|
|
{
|
|
@@ -81,7 +106,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
text: __('Destroy'),
|
|
|
classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
|
|
|
icon: 'fa fa-times',
|
|
|
- url: 'lottery/ticket/destroy',
|
|
|
+ url: 'lottery/tickets/destroy',
|
|
|
refresh: true
|
|
|
}
|
|
|
],
|