admin/plugins/point-activity/views/activity/records.blade.php

141 lines
7.7 KiB
PHP

@extends('layouts.base')
@section('title', trans('Yunshop\PointActivity::activityRecords.title'))
@section('content')
<div class="right-titpos">
<ul class="add-snav">
<li class="active"><a href="#">{{ trans('Yunshop\PointActivity::activityRecords.subtitle') }}</a></li>
</ul>
</div>
<div class='panel panel-default'>
<form action="" method="get" class="form-horizontal" id="form1">
<input type="hidden" name="c" value="site"/>
<input type="hidden" name="a" value="entry"/>
<input type="hidden" name="m" value="yun_shop"/>
<input type="hidden" name="do" value="sign" id="form_do"/>
<input type="hidden" name="route" value="plugin.point-activity.Backend.Modules.Activity.Controllers.records.index" id="route"/>
<div class="panel panel-info">
<div class="panel-body">
<div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2 ">
<div class="">
<input type="text" placeholder="活动ID/活动名称" class="form-control" name="search[activity]" value="{{ $search['activity'] }}"/>
</div>
</div>
<div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2 ">
<div class="">
<input type="text" placeholder="会员ID/昵称/姓名/手机号" class="form-control" name="search[member]" value="{{ $search['member'] }}"/>
</div>
</div>
<div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2 ">
<div class="time">
<select name='search[search_time]' class='form-control'>
<option value='0' @if($search['search_time']=='0') selected @endif>不搜索时间</option>
<option value='1' @if($search['search_time']=='1') selected @endif>搜索时间</option>
</select>
</div>
</div>
<div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2 ">
<div class="search-select">
{!! app\common\helpers\DateRange::tplFormFieldDateRange('search[time]', [
'starttime'=>date('Y-m-d H:i', strtotime($search['time']['start']) ?: strtotime('-1 month')),
'endtime'=>date('Y-m-d H:i',strtotime($search['time']['end']) ?: time()),
'start'=>0,
'end'=>0
], true) !!}
</div>
</div>
<div class="form-group col-xs-12 col-sm-4">
<input type="submit" class="btn btn-success pull-right" value="搜索">
</div>
</div>
</div>
</form>
</div>
<div class="w1200 m0a">
<div class="rightlist">
<div class="clearfix">
<div class="panel panel-default">
<div class="panel-heading">总数:{{ $pageList->total() }}</div>
<div class="panel-body" style="margin-bottom:200px">
<table class="table table-hover" style="overflow:visible">
<thead class="navbar-inner">
<tr>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_one') }}</th>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_two') }}</th>
<th style='width:10%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_three') }}</th>
<th style='width:12%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_four') }}<br>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_five') }}</th>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_seven') }}<br />{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_six') }}</th>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_nine') }}<br />{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_eight') }}</th>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_ten') }}</th>
<th style='width:8%;text-align: center;'>{{ trans('Yunshop\PointActivity::activityRecords.menu.menu_eleven') }}</th>
</tr>
</thead>
<tbody>
@foreach($pageList as $key => $item)
<tr style="text-align: center;">
<td>
{{ $item->id }}
</td>
<td>
{{ $item->name }}
</td>
<td>
<a href="{{ yzWebUrl('member.member.detail',['id' => $item['member_id']]) }}">
<img src='{{ $item->member->avatar }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc'/>
<br/>
{{ $item->member->nickname ?? "未更新" }}
</a>
</td>
<td>
{{ $item->created_at }}
@if($item->validity_at && $item->status == 0)
<br><label class="label label-danger">有效期:{{ $item->validity_at }}</label>
@endif
</td>
<td>
{{ $item->stock }}<br><label class="label label-info">{{ $item->point }}</label>
</td>
<td>{{ $item->remain }}/{{ $item->total }}</td>
<td>
@if($item->status == 2)
<label class="label label-danger">{{ $item->status_name }}</label>
@elseif($item->status == 1)
<label class="label label-success">{{ $item->status_name }}</label>
@else
<label class="label label-info">{{ $item->status_name }}</label>
@endif
</td>
<td>
<a class='btn btn-default' href="{{ yzWebUrl('plugin.point-activity.Backend.Modules.Activity.Controllers.detail.index', array('activity_id' => $item->id)) }}" style="margin-bottom: 2px">活动详情</a>
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $page !!}
</div>
</div>
</div>
</div>
</div>
@endsection