123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(session('info'))
- <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
- {{session('info')}}
- </div>
- @endif
- <div class="page-container">
- <div>
- <input class="input-text" style="width:5%;text-align:center" type="text" value="赠礼类型"/>
- <select style="width:6%;text-align:center" id='type' name="type" class="select-box">
- <option value="-1" @if($type=='-1') selected @endif>-- 请选择--</option>
- <option value="1" @if($type==1) selected @endif>生日赠礼</option>
- <option value="0" @if($type==0) selected @endif>12月赠礼</option>
- </select>
- <a class="btn btn-primary radius" onclick="gift_search()" href="javascript:;">搜索</a>
- <a class="btn btn-primary radius" onclick="gift_add('新增')" href="javascript:;"><i class="Hui-iconfont"></i> 添加礼品</a>
- </div>
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th width="10%">ID</th>
- <th width="10%">商品名称</th>
- <th width="10%">商品图片</th>
- <th width="10%">商品规格</th>
- <th width="10%">商品数量</th>
- <th width="10%">类型</th>
- <th width="10%">日期</th>
- <th width="10%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c">
- <td class="text-c">{{$a['id']}}</td>
- <td class="text-c">{{$a['goods']['name']}}</td>
- <td class="text-c"><img style="width:100px;" src="{{$a['goods']['picUrl']}}"/></td>
- <td class="text-c">{{$a['sku']['propsName']}}</td>
- <td class="text-c">{{$a['num']}}</td>
- <td class="text-c">{{$a['type'] == 0 ? '12月赠礼' : '生日赠礼'}}</td>
- <td class="text-c">{{$a['mtime']}}</td>
- <td class="f-14 product-brand-manage">
- <a style="text-decoration:none" onClick='gift_edit("{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <div id="page" class="page_div"></div>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#info').hide()",3000);
- });
- /*管理员-添加*/
- function gift_add(){
- location.href = '/admin/customer/giftAdd';
- }
- /*管理员-编辑*/
- function gift_edit(id){
- location.href = "/admin/customer/giftEdit?id="+id;
- }
- function gift_search(){
- var type = $('#type').val();
- location.href='giftList?page='+num+'&type='+type;
- }
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var type = $('#type').val();
- location.href='giftList?page='+num + '&type='+type;
- }
- })
- </script>
- </body>
- @endsection
|