@@ -66,8 +66,15 @@ class Certificate extends Backend
return $this->selectpage();
}
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
+ $input = input();
+ $filter = json_decode($input['filter'],true);
+ $where_get = [];
+ if(isset($filter['status']) && $filter['status'] == "2"){
+ $where_get['is_expire'] = 0;
+ };
$list = $this->model
->where($where)
+ ->where($where_get)
->with(['user','goods'])
->where('is_deleted',1)
->order($sort, $order)
@@ -34,7 +34,7 @@ class Certificate extends Model
public function getStatusList()
{
- return ['0' => __('未使用'), '1' => __('已使用')];
+ return ['1' => __('生效中'),'0' => __('已过期')];
public function getIsExpireList()
@@ -2,7 +2,7 @@
<div class="panel-heading">
{:build_heading(null,FALSE)}
- <ul class="nav nav-tabs" data-field="status">
+ <ul class="nav nav-tabs" data-field="is_expire">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>