bztang-admin/plugins/red-packet/views/admin/receive_logs.blade.php

112 lines
4.9 KiB
PHP

@extends('layouts.base')
@section('content')
<div class="right-titpos">
<ul class="add-snav">
<a style="margin-bottom:5px;">领取记录</a>
</ul>
</div>
<div class='panel panel-default'>
<form action="" method="post" class="form-horizontal" id="form1">
<div class="panel panel-info">
<div class="panel-body">
<div class="form-group col-xs-12 col-sm-2">
<input class="form-control" name="search[red_packet_id]" type="text"
value="{{$search['red_packet_id']}}" placeholder="每日红包ID">
</div>
<div class="form-group col-xs-12 col-sm-2">
<input class="form-control" name="search[member_id]" type="text"
value="{{$search['member_id']}}" placeholder="会员ID">
</div>
<div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
<div class="">
<input type="text" class="form-control"name="search[member]"value="{{$search['member']?$search['member']:''}}" placeholder="昵称/姓名/手机号"/>
</div>
</div>
<div class="form-group col-xs-12 col-sm-7">
<div class="col-sm-4">
<label class='radio-inline'>
<input type='radio' value='0' name='search[is_time]'
@if(!$search['is_time']) checked @endif>不按时间
</label>
<label class='radio-inline'>
<input type='radio' value='1' name='search[is_time]'
@if($search['is_time']) checked @endif>创建时间
</label>
</div>
{!! app\common\helpers\DateRange::tplFormFieldDateRange('search[time_range]', [
'starttime'=>$search['time_range']['start'] ?: 0,
'endtime'=>$search['time_range']['end'] ?: 0,
'start'=>0,
'end'=>0
], true)!!}
</div>
<div class="form-group col-xs-12 col-sm-4">
<input type="hidden" name="id" value="{{$activity_id}}">
<input type="submit" class="btn btn-success" id="search" value="搜索">
<input type="button" class="btn btn-success " id="export" value="导出">
</div>
</div>
</div>
</form>
</div>
<div class='panel panel-default'>
<div class="panel-heading">
统计:已领取金额 {{$receive_amount}}
</div>
<div class='panel-body' >
<table id="table">
</table>
<table id="basis-data" class="table table-hover" style="overflow:visible;">
<thead>
<tr>
<th style='width:5%;'>领取红包ID</th>
<th style='width:10%;'>时间</th>
<th style='width:10%;'>会员</th>
<th style='width:8%;'>领取金额</th>
<th style='width:8%;'>红包总额度</th>
<th style='width:8%;'>剩余额度</th>
</tr>
</thead>
<tbody>
@foreach($list['data'] as $row)
<tr>
<td>{{$row['red_packet_id']}}</td>
<td>{{$row['created_at']}}</td>
<td>
<img src='{{yz_tomedia($row['belongs_to_member']['avatar'])}}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' />
<br/>{{$row['belongs_to_member']['username']}}
</td>
<td>{{$row['receive_amount']}}</td>
<td>{{$row['amount']}}</td>
<td>{{$row['balance']}}</td>
</tr>
@endforeach
</tbody>
</table>
{!! $pager !!}
</div>
</div>
<script language='javascript'>
$(function () {
$('#export').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.red-packet.admin.receive-logs.export') !!}');
$('#form1').submit();
});
$('#search').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.red-packet.admin.receive-logs.index') !!}');
$('#form1').submit();
});
});
</script>
@endsection