| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- @extends('base.base')
- @section('base')
- <!-- 内容区域 -->
- <style type="text/css">
- .table th{
- padding: 0.8375rem;
- vertical-align: top;
- border-top: 1px solid #ebedf2;
- }
-
- </style>
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-settings"></i>
- </span>
- {{ __('auto.幸运兑换管理') }}
- </h3>
- <nav aria-label="breadcrumb">
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="#">{{ __('auto.兑换管理') }}</a></li>
- <li class="breadcrumb-item active" aria-current="page">{{ __('auto.幸运兑换管理') }}</li>
- </ol>
- </nav>
- </div>
- <div class="row">
- <div class="col-lg-12 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">{{ __('auto.幸运兑换管理') }}</h4>
- <form class="well form-inline margin-top-20" method="get" action='/admin/exchange/treasure_goods'>
- <span style="padding-left: 5px" >{{ __('auto.种类:') }}</span >
- <select class="form-control" name="type" value="{{$type}}" style="color: black">
- <option value="">{{ __('auto.请选择种类') }}</option>
- @foreach($goods_type as $k=>$v)
- <option value="{{$k}}" @if($k===$type) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>
- <a href="/admin/exchange/treasure_goods" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
- {{ __('auto.新增') }}
- </button>
- </p>
- </form>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th width="6%">{{ __('auto.商品名称') }}</th>
- <th width="4%">{{ __('auto.种类') }}</th>
- <th width="6%">{{ __('auto.结束时间') }}</th>
- <th width="6%">{{ __('auto.总份数') }}</th>
- <th width="6%">{{ __('auto.兑换比例') }}</th>
- <th width="6%">{{ __('auto.兑换限额') }}</th>
- <th width="6%">{{ __('auto.状态') }}</th>
- <th width="6%">{{ __('auto.开奖次数') }}</th>
- <th width="6%">{{ __('auto.操作') }}</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $k=>$v)
- <tr>
- <td>{{ $v->BonusName }}</td>
- <td>{{ $v->Type }}</td>
- <td>{{ $v->EndTime }}</td>
- <td>{{ $v->TotalAmount }}</td>
- <td>{{ $v->Ratio}}</td>
- <td>{{ $v->LimitCount}}</td>
- <td>{{ $v->overdue}}</td>
- <td>{{ $v->UsedAmount}}</td>
- <td>
- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="update({{ $v->ID }})">
- {{ __('auto.修改') }}
- </button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div class="box-footer clearfix">
- {{ __('auto.总共') }} <b>{{ $list->appends(['type'=>$type])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
- {!! $list->links() !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- function add(){
- var page = layer.open({
- type: 2,
- title: '{{ __('auto.添加商品') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['70%', '90%'],
- content: '/admin/treasure_goods/add'
- });
- }
- function update(id){
- var page = layer.open({
- type: 2,
- title: '{{ __('auto.修改商品') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['70%', '90%'],
- content: '/admin/treasure_goods/update/'+id
- });
- }
- $('.menu-switch').click(function(){
- id = $(this).attr('id');
- state = $(this).attr('state');
- console.log(id)
- console.log(state)
- if(state == "on"){
- $('.pid-'+id).hide();
- $(this).attr("state","off")
- $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right');
- }else{
- $('.pid-'+id).show();
- $(this).attr("state","on")
- $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down');
- }
- })
- </script>
- @endsection
|