|
@@ -10,6 +10,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
// edit_url: 'prizelog/edit',
|
|
|
// del_url: 'prizelog/del',
|
|
|
// multi_url: 'prizelog/multi',
|
|
|
+ send_url: 'prizelog/send',
|
|
|
import_url: 'prizelog/import',
|
|
|
table: 'prize_log',
|
|
|
}
|
|
@@ -33,13 +34,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'p_id', title: __('P_id')},
|
|
|
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
|
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
|
|
- {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
|
|
+ {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2'),"3": __('Status 3')}, formatter: Table.api.formatter.status},
|
|
|
{field: 'user_name', title: __('User_name'), operate: 'LIKE'},
|
|
|
{field: 'phone', title: __('Phone'), operate: 'LIKE'},
|
|
|
{field: 'city', title: __('City'), operate: 'LIKE'},
|
|
|
{field: 'address', title: __('Address'), operate: 'LIKE'},
|
|
|
+ {field: 'express_name', title: __('Express_name'), },
|
|
|
+ {field: 'express_no', title: __('Express_no'), },
|
|
|
{field: 'createtime', title: __('Createtime'), 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'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
|
|
+ buttons:[
|
|
|
+ {
|
|
|
+ name:'send',
|
|
|
+ text: '立即发货',
|
|
|
+ classname: 'btn btn-xs btn-info btn-dialog',
|
|
|
+ icon: 'fa fa-rotate-left',
|
|
|
+ url: $.fn.bootstrapTable.defaults.extend.send_url,
|
|
|
+ visible:function(row){
|
|
|
+ if(row['status']==2 && row['type']==1){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
]
|
|
|
]
|
|
|
});
|
|
@@ -53,6 +73,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
edit: function () {
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
+ send: function () {
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
api: {
|
|
|
bindevent: function () {
|
|
|
Form.api.bindevent($("form[role=form]"));
|