|
@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
index_url: 'egg/gift/index' + location.search,
|
|
|
add_url: 'egg/gift/add',
|
|
|
// edit_url: 'egg/gift/edit',
|
|
|
- del_url: 'egg/gift/del',
|
|
|
+// del_url: 'egg/gift/del',
|
|
|
multi_url: 'egg/gift/multi',
|
|
|
import_url: 'egg/gift/import',
|
|
|
table: 'egg_gift',
|
|
@@ -38,16 +38,43 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'eggjackpot.name', title: __('Eggjackpot.name'), operate: 'LIKE'},
|
|
|
// {field: 'eggjackpot.type', title: __('Eggjackpot.type'), searchList: {"1":__('Eggjackpot.type 1'),"2":__('Eggjackpot.type 2'),"3":__('Eggjackpot.type 3')}, formatter: Table.api.formatter.normal},
|
|
|
{field: 'gift_id', title: __('Gift_id')},
|
|
|
+ {field: 'gift_name', title: __('Gift_name'), operate: 'LIKE'},
|
|
|
+ {field: 'gift_number', title: '数量', operate: false},
|
|
|
+
|
|
|
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
|
|
// {field: 'special', title: __('Special'), operate: 'LIKE'},
|
|
|
- {field: 'gift_name', title: __('Gift_name'), operate: 'LIKE'},
|
|
|
|
|
|
// {field: 'prize_no', title: __('Prize_no')},
|
|
|
{field: 'price', title: __('Price')},
|
|
|
- {field: 'is_use', title: __('Is_use'), searchList: {"1":__('Is_use 1'),"0":__('Is_use 0')}, formatter: Table.api.formatter.normal},
|
|
|
- {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+// {field: 'is_use', title: __('Is_use'), searchList: {"1":__('Is_use 1'),"0":__('Is_use 0')}, formatter: Table.api.formatter.normal},
|
|
|
+// {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
// {field: 'starttime', title: __('Starttime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
- {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
+ {field: 'operate', title: __('Operate'),
|
|
|
+ buttons:[
|
|
|
+ {
|
|
|
+ name:'newedit',
|
|
|
+ text:'编辑',
|
|
|
+ title:'编辑',
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
+ classname:'btn btn-xs btn-info btn-dialog',
|
|
|
+ url:function(row){
|
|
|
+ return 'egg/gift/newedit/jackpot_id/' + row.Jackpot_id + '/gift_id/' + row.gift_id + '?dialog=1';
|
|
|
+ },
|
|
|
+ target:'_self',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:'newdel',
|
|
|
+ text:'删除',
|
|
|
+ title:'删除',
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
+ classname:'btn btn-xs btn-info btn-ajax',
|
|
|
+ url:function(row){
|
|
|
+ return 'egg/gift/newdel/jackpot_id/' + row.Jackpot_id + '/gift_id/' + row.gift_id + '?dialog=1';
|
|
|
+ },
|
|
|
+ target:'_self',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
]
|
|
|
]
|
|
|
});
|
|
@@ -61,6 +88,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
edit: function () {
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
+ newedit: function () {
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
+ newdel: function () {
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
api: {
|
|
|
bindevent: function () {
|
|
|
Form.api.bindevent($("form[role=form]"));
|