...
|
...
|
@@ -31,8 +31,60 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
{field: 'address', title: __('Address')},
|
|
|
{field: 'pre_date', title: __('Pre_date'), operate:'RANGE', addclass:'datetimerange'},
|
|
|
{field: 'pre_time', title: __('Pre_time')},
|
|
|
{field: 'status', title: __('status'), formatter: Table.api.formatter.flag,searchList: {0: __('in_audit'), 1: __('adopt'),2: __('reject')}},
|
|
|
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', 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: 'ajax',
|
|
|
text: __('通过'),
|
|
|
title: __('通过'),
|
|
|
classname: 'btn btn-xs btn-success btn-magic btn-ajax',
|
|
|
icon: 'fa',
|
|
|
url: 'sell/adopt',
|
|
|
confirm: '确认通过',
|
|
|
success: function (data, ret) {
|
|
|
Layer.alert(ret.msg);
|
|
|
$(".btn-refresh").trigger("click");
|
|
|
//如果需要阻止成功提示,则必须使用return false;
|
|
|
//return false;
|
|
|
},
|
|
|
error: function (data, ret) {
|
|
|
Layer.alert(ret.msg);
|
|
|
return false;
|
|
|
},visible: function (row) {
|
|
|
if(row.status == 1){
|
|
|
return false;//隐藏
|
|
|
}else{
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
name: 'ajax',
|
|
|
text: __('驳回'),
|
|
|
title: __('驳回'),
|
|
|
classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
|
|
|
icon: 'fa',
|
|
|
url: 'sell/reject',
|
|
|
confirm: '确认驳回',
|
|
|
success: function (data, ret) {
|
|
|
Layer.alert(ret.msg);
|
|
|
$(".btn-refresh").trigger("click");
|
|
|
//如果需要阻止成功提示,则必须使用return false;
|
|
|
//return false;
|
|
|
},
|
|
|
error: function (data, ret) {
|
|
|
Layer.alert(ret.msg);
|
|
|
return false;
|
|
|
},visible: function (row) {
|
|
|
if(row.status == 2){
|
|
|
return false;//隐藏
|
|
|
}else{
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
]}
|
|
|
]
|
|
|
]
|
|
|
});
|
...
|
...
|
|