|
@@ -35,7 +35,49 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
{field: 'saletime', title: __('Saletime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
{field: 'saletime', title: __('Saletime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
// {field: 'type_id', title: __('Type_id')},
|
|
// {field: 'type_id', title: __('Type_id')},
|
|
{field: 'uidsaletype.type', title: __('Uidsaletype.type'), operate: 'LIKE'},
|
|
{field: 'uidsaletype.type', title: __('Uidsaletype.type'), operate: 'LIKE'},
|
|
-// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
|
|
|
+ {field: 'operate', title: __('Operate'), table: table,
|
|
|
|
+ buttons:[
|
|
|
|
+ {
|
|
|
|
+ name:'shangjia',
|
|
|
|
+ text:'上架',
|
|
|
|
+ title:'上架',
|
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
|
+ classname:'btn btn-xs btn-success btn-ajax',
|
|
|
|
+ url:'uidsale/shangjia/ids/{ids}?dialog=1',
|
|
|
|
+ target:'_self',
|
|
|
|
+ refresh:true,
|
|
|
|
+ hidden:function(row){
|
|
|
|
+ return (row.status==0 && row.is_show == 0) ? false : true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'xiajia',
|
|
|
|
+ text:'下架',
|
|
|
|
+ title:'下架',
|
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
|
+ classname:'btn btn-xs btn-danger btn-ajax',
|
|
|
|
+ url:'uidsale/xiajia/ids/{ids}?dialog=1',
|
|
|
|
+ target:'_self',
|
|
|
|
+ refresh:true,
|
|
|
|
+ hidden:function(row){
|
|
|
|
+ return (row.status==0 && row.is_show == 1) ? false : true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'edit',
|
|
|
|
+ text:'编辑',
|
|
|
|
+ title:'编辑',
|
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
|
+ classname:'btn btn-xs btn-info btn-dialog',
|
|
|
|
+ url:'uidsale/edit/ids/{ids}?dialog=1',
|
|
|
|
+ target:'_self',
|
|
|
|
+ refresh:true,
|
|
|
|
+ hidden:function(row){
|
|
|
|
+ return (row.status==0 && row.is_show == 0) ? false : true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
]
|
|
]
|
|
]
|
|
]
|
|
});
|
|
});
|
|
@@ -49,6 +91,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
edit: function () {
|
|
edit: function () {
|
|
Controller.api.bindevent();
|
|
Controller.api.bindevent();
|
|
},
|
|
},
|
|
|
|
+ shangjia: function () {
|
|
|
|
+ Controller.api.bindevent();
|
|
|
|
+ },
|
|
|
|
+ xiajia: function () {
|
|
|
|
+ Controller.api.bindevent();
|
|
|
|
+ },
|
|
api: {
|
|
api: {
|
|
bindevent: function () {
|
|
bindevent: function () {
|
|
Form.api.bindevent($("form[role=form]"));
|
|
Form.api.bindevent($("form[role=form]"));
|