| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- @extends('layouts.base')
- @section('content')
- <div class="w1200 m0a">
- <div class="rightlist">
- <div class="right-titpos">
- <ul class="add-snav">
- <li class="active"><a href="#">优惠券二维码</a></li>
- <a class="btn btn-primary" href="{!! yzWebUrl('plugin.coupon-qr.admin.coupon.edit') !!}"><i
- class="fa fa-plus"></i>生成二维码</a>
- </ul>
- </div>
- <div class="panel panel-info">
- <div class="panel-body">
- <form action="" method="post" class="form-horizontal" role="form" id="form">
- <div class="form-group col-xs-12 col-sm-3">
- <div>
- <input class="form-control" name="search[name]" id="" type="text"
- value="{{ $search['name'] }}" placeholder="优惠券名称">
- </div>
- </div>
- <div class="form-group col-xs-12 col-sm-6">
- <div class="col-sm-4">
- <select name='search[is_time]' class='form-control'>
- <option value='0'
- @if($search['is_time'] ==0 || empty($search['is_time'])) selected @endif>
- 不搜索时间
- </option>
- <option value='1' @if($search['is_time'] ==1) selected @endif>搜索时间</option>
- </select>
- </div>
- {!! 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 class="form-group col-xs-12 col-sm-6">
- <button type="button" name="export" value="1" id="export"
- class="btn btn-default excel back ">导出 Excel
- </button>
- <input type="hidden" name="token" value="{{$var['token']}}"/>
- <button class="btn btn-success" onclick="$('#form').onsubmit();"><i
- class="fa fa-search"></i> 搜索
- </button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">总数: {{$list['total']}}</div>
- <div class="panel-body">
- <table class="table" style="">
- <thead>
- <tr>
- <th style="width:5%; text-align:center;">ID</th>
- <th style="width:15%; text-align: center;">时间</th>
- <th style="width:7%; text-align: center;">会员</th>
- <th style="width:10%; text-align: center;">优惠券名称</th>
- <th style="width:20%; text-align: center;">商品名称</th>
- <th style="width:12%; text-align: center;">生成数量/已领取/已使用</th>
- <th style="width:10%; text-align: center;">领取记录</th>
- <th style="width:7%; text-align: center;">H5二维码</th>
- <th style="width:7%; text-align: center;">小程序二维码</th>
- <th style="width:10%; text-align: center;">操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($list as $row)
- <tr style="text-align:center;">
- <td>{{ $row->id }}</td>
- <td>{{ $row->created_at }}</td>
- <td>
- <a href="{{ yzWebUrl('member.member.detail', ['id' => $row->hasOneMember->uid]) }}">
- @if($row->hasOneMember->avatar || $shopSet['headimg'])
- <img src='{{ $row->hasOneMember->avatar ? tomedia($row->hasOneMember->avatar) : tomedia($shopSet['headimg']) }}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc'/>
- <br/>
- @endif
- {{ $row->hasOneMember->nickname ?: '未更新'}}
- </a>
- </td>
- <td>{{ $row->hasOneCoupon->name }}</td>
- <td>
- <img src="{{ yz_tomedia($row->hasOneGoods->thumb) }}"
- style="width: 30px; height: 30px;border:1px solid #ccc;padding:1px;">
- 【{{ $row->goods_id }}】{{ $row->hasOneGoods->title }}
- </td>
- <td>{{ $row->grant_num }}/{{ $row->received }}/{{ $row->used }}</td>
- <td>
- <a class="btn btn-default"
- href="{!! yzWebUrl('plugin.coupon-qr.admin.record.index', ['search[id]'=>$row['coupon_type_id']]) !!}">领取记录</a>
- </td>
- <td>
- <a class='btn btn-default'
- href="{!!yzWebUrl('plugin.coupon-qr.admin.coupon.code', ['id'=>$row['id']])!!}"
- title='H5二维码'><i class='fa fa-qrcode'></i></a>
- </td>
- <td>
- <a class='btn btn-default'
- href="{!!yzWebUrl('plugin.coupon-qr.admin.coupon.small', ['id'=>$row['id']])!!}"
- title='小程序二维码'><i class='fa fa-qrcode'></i></a>
- </td>
- <td>
- {{--<a class="btn btn-default" href="{!! yzWebUrl('plugin.coupon-qr.admin.coupon.edit', ['id'=>$row['id']]) !!}" >编辑</a>--}}
- <a class="btn btn-default"
- href="{!! yzWebUrl('plugin.coupon-qr.admin.coupon.deleted', ['id'=>$row['id']]) !!}"
- onclick="return confirm('确定要删除吗');return false;">删除</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- {!! $page !!}
- </div>
- </div>
- </div>
- <script language='javascript'>
- $(function () {
- $('#export').click(function () {
- $('#form').get(0).action = "{!! yzWebUrl('plugin.coupon-qr.admin.coupon.export') !!}";
- $('#form').submit();
- $('#form').get(0).action = "{!! yzWebUrl('plugin.coupon-qr.admin.coupon.index') !!}";
- });
- });
- </script>
- @endsection
|