This repository has been archived on 2020-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pingan/app/Merchant/Resources/views/census/index.blade.php
2020-08-06 16:37:53 +08:00

98 lines
3.9 KiB
PHP

@extends('Merchant::layouts.app')
@section('title', '核销统计')
@section('css')
<link rel="stylesheet" href="{{ asset('assets/merchant/css/plugins/datapicker/datepicker3.css') }}" />
@endsection
@push('script')
<script type="text/javascript" src="{{ asset('assets/merchant/js/plugins/datapicker/bootstrap-datepicker.js') }}"></script>
<script type="text/javascript">
$("#time-interval .input-daterange").datepicker({
autoclose: true, //自动关闭
beforeShowDay: $.noop, //在显示日期之前调用的函数
clearBtn: true, //显示清除按钮
forceParse: true, //是否强制转换不符合格式的字符串
format: 'yyyy-mm', //日期格式
language: 'cn', //语言
minViewMode: 1, // 最小精度选择
startView: 1, //开始显示
WeekHighlighted:true, // 本周高亮
endDate:new Date()
});
$("button").click(function(){
var $this = $(this);
var $form = $this.parents('form');
$("input[name='action']").val($this.data('action'));
$form.submit();
});
</script>
@endpush
@section('content')
<div class="ibox">
<div class="row">
<div class="col-sm-12 m-b">
<form action="{{ route('merchant.census')}}" class="form-inline pull-right" method="get" accept-charset="utf-8">
<div class="form-group" id="time-interval">
<div class="input-daterange input-group">
<input type="text" class="input-sm form-control" placeholder="核销月份" readonly name="month" value="{{ Request::input('month')??now()->format('Y-m') }}" />
</div>
</div>
<div class="input-group">
<span class="input-group-btn">
<input type="hidden" name="action" value="search">
<button type="button" class="btn btn-sm btn-primary" data-action="search" ><i class="fa fa-check"></i>&nbsp;刷新</button>
<button type="button" class="btn btn-sm btn-warning confirm" tip='确认要导出当前条件内容?' data-action="excel"><i class="fa fa-paste"></i>&nbsp;导出</button>
</span>
</div>
</form>
</div>
</div>
<div class="ibox-content">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>日期</th>
<th>100元减10元优惠券</th>
<th>100元减25元优惠券</th>
<th>100元减50元优惠券</th>
<th>200元减100元优惠券</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($coupons as $coupon)
<tr>
<td> {{ $coupon['day'] }} </td>
<td> {{ $coupon['ysd10'] ??''}} </td>
<td> {{ $coupon['ysd25'] ??''}} </td>
<td> {{ $coupon['ysd50'] ??''}} </td>
<td> {{ $coupon['ysd100']??'' }} </td>
<td>
<a href="{{ route('merchant.coupons',['start'=>$coupon['day'],'end'=>$coupon['day']]) }}">查看</a>
</td>
</tr>
@endforeach
<tr style="color: #f8ac59">
<td> 全部</td>
<td> {{ $all['ysd10'] ??''}} </td>
<td> {{ $all['ysd25'] ??''}} </td>
<td> {{ $all['ysd50'] ??''}} </td>
<td> {{ $all['ysd100']??'' }} </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@endsection