@extends('finance.layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-10">
                <div class="panel panel-default">
                    <div class="panel-heading">财务列表</div>

                    <div class="panel-body">
                        @if (session('message'))
                            <div class="alert alert-success" role="alert">{{session('message')}}</div>
                        @endif

                        @if(($errors->has('message')))
                            <div class="alert alert-danger" role="alert">{{$errors->first('message')}}</div>
                        @endif
                        {{--<form class="form-inline">
                            <div class="form-group">
                                <label class="sr-only" for="trade_no">订单号</label>
                                <input type="text" class="form-control" id="trade_no" name="trade_no" placeholder="订单号"
                                       value="{{isset($param['trade_no']) ? $param['trade_no']:''}}">
                            </div>
                            <div class="form-group">
                                <label class="sr-only" for="start_time">开始时间</label>
                                <input type="date" class="form-control" id="start_time" name="start_time" placeholder="开始时间"
                                       value="{{isset($param['start_time']) ? $param['start_time']:''}}">
                            </div>
                            --
                            <div class="form-group">
                                <label class="sr-only" for="end_time">结束时间</label>
                                <input type="date" class="form-control" id="end_time" name="end_time" placeholder="结束时间"
                                       value="{{isset($param['end_time']) ? $param['end_time']:''}}">
                            </div>

                            <select class="form-control" name="status">
                                <option value="">订单状态</option>
                                <option value="0" {{  isset($param['status']) && $param['status'] == 0 ? 'selected':'' }}>未支付</option>
                                <option value="1" {{  isset($param['status']) && $param['status'] == 1 ? 'selected':'' }}>支付成功</option>
                                <option value="2" {{  isset($param['status']) && $param['status'] == 2 ? 'selected':'' }}>支付失败</option>
                                <option value="3" {{  isset($param['status']) && $param['status'] == 3 ? 'selected':'' }}>退款</option>
                            </select>

                            <div class="form-group">
                                <label class="sr-only" for="u">u参数</label>
                                <input type="text" class="form-control" id="u" name="u" placeholder="u参数"
                                       value="{{isset($param['u']) ? $param['u']:''}}">
                            </div>

                            <div class="form-group">
                                <button type="submit" class="btn btn-primary">查询</button>
                            </div>


                        </form>--}}
                    </div>
                    <div class="panel-body">
                        <table class="table table-striped table-hover">
                            <thead>
                            <tr>
                                <th>appid</th>
                                <th>公众号名称</th>
                                <th>充值币</th>
                                <th>奖励币</th>
                                <th>总书币</th>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $value)
                                <tr>
                                    <td> {{$value->appid}}</td>
                                    <td> {{$value->official_account_name}}</td>
                                    <td> {{$value->charge_balance}}</td>
                                    <td> {{$value->reward_balance}}</td>
                                    <td> {{$value->fee}}</td>
                                    <td> {{$value->month}}</td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                        <nav aria-label="Page navigation " id="js-order-page">
                            <input type="hidden" id="hidden-total" value="{{$data->total()}}">
                            {{ $data->links() }}
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection

