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

152 lines
7.4 KiB
PHP

@extends('layouts.base')
@section('content')
<style>
tr td {
text-align: center;
}
tr th {
text-align: center;
}
</style>
<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="col-sm-3">
<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>
<div class="form-group col-xs-12 col-sm-6">
{!! 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-3" style="text-align: right">
<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">
统计:红包总额累计:{{$amount}}&nbsp;&nbsp;&nbsp;&nbsp;
红包数量总计:{{$number_sum}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
已领取数量总计{{$receive}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
已领取金额总计:{{$receive_amount}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
未领取数量总计:{{$number_sum-$receive}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
未领取金额总计:{{$not_claimed}}
</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:11%;'>时间</th>
<th style='width:8%;'>业绩基数</th>
<th style='width:166px;'>红包比例</th>
<th style='width:8%;'>红包额度</th>
<th style='width:5%;'>红包数量</th>
<th style='width:6%;'>已领取数量</th>
<th style='width:6%;'>已领取金额</th>
<th style='width:8%;'>未领取数量</th>
<th style='width:8%;'>未领取金额</th>
<th style='width:130px;'>操作</th>
</tr>
</thead>
<tbody>
@foreach($list['data'] as $row)
<tr>
<td>{{$row['id']}}</td>
<td>{{$row['created_at']}}</td>
<td>{{$row['results_amount']}}</td>
<td style="text-align: left">
<a href="{{yzWebUrl('plugin.red-packet.admin.red-packet-logs.red-detail',['created_at'=>$row['created_at']])}}"
class="btn btn-sm btn-default" title="详细比例" style="font-size: 13px;width: 94px;"><i
class="fa fa-article"></i>商城</a>
@if (app('plugins')->isEnabled('store-cashier'))
<a href="{{yzWebUrl('plugin.red-packet.admin.red-packet-logs.store-detail',['created_at'=>$row['created_at']])}}"
class="btn btn-sm btn-default" title="详细比例" style="font-size: 13px;width: 94px;"><i
class="fa fa-article"></i>门店</a>
<br/>
<a href="{{yzWebUrl('plugin.red-packet.admin.red-packet-logs.cashier-detail',['created_at'=>$row['created_at']])}}"
class="btn btn-sm btn-default" title="详细比例" style="font-size: 13px;width: 94px;margin-top: 4px;"><i
class="fa fa-article"></i>收银台</a>
@endif
@if (app('plugins')->isEnabled('aggregation-cps'))
<a href="{{yzWebUrl('plugin.red-packet.admin.red-packet-logs.cps-detail',['created_at'=>$row['created_at']])}}"
class="btn btn-sm btn-default" title="详细比例" style="font-size: 13px;display: inline-block;margin-top: 4px;width: 94px;"><i
class="fa fa-article"></i>聚合cps</a>
@endif
</td>
<td>{{$row['amount']}}</td>
<td>{{$row['number_sum']}}</td>
@if($row['number_sum']-$row['receive'] <= 0)
<td>{{$row['number_sum']}}</td>
@else
<td>{{$row['receive']}}</td>
@endif
<td>{{$row['receive_amount']}}</td>
@if($row['number_sum']-$row['receive'] <= 0)
<td>0</td>
@else
<td>{{$row['number_sum']-$row['receive']}}</td>
@endif
@if($row['amount']-$row['receive_amount'] <= 0)
<td>0</td>
@else
<td>{{round(($row['amount']-$row['receive_amount']),2)}}</td>
@endif
<td>
<a href="{{yzWebUrl('plugin.red-packet.admin.receive-logs.index',['quota_id' => $row['id']])}}"
class="btn btn-sm btn-default" title="查看领取记录" style="font-size: 13px;"><i
class="fa fa-article"></i>查看领取记录</a>
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $pager !!}
</div>
</div>
<script language='javascript'>
$(function () {
$('#export').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.red-packet.admin.red-packet-logs.export') !!}');
$('#form1').submit();
});
$('#search').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.red-packet.admin.red-packet-logs.index') !!}');
$('#form1').submit();
});
});
</script>
@endsection