123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- @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 class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="templateadd('新增')" href="javascript:;"><i class="Hui-iconfont"></i> 新增渠道</a></span> </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="25"><input type="checkbox" name="" value=""></th>--}}
- <th width="5%">渠道ID</th>
- <th width="10%">模板示例图</th>
- <th width="10%">销售名称</th>
- <th width="8%">渠道备注</th>
- <th width="8%">推广链接</th>
- <th width="8%">背景图</th>
- <th width="8%">生成时间</th>
- <th width="10%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c">
- {{--<td><input name="" type="checkbox" value=""></td>--}}
- <td class="text-c">{{$a['id']}}</td>
- <td class="text-c"><img style="width:100px;" src="{{$a['img']}}" /></td>
- <td class="text-c">
- @if($a['salers'])
- @foreach($a['salers'] as $k=>$saler)
- {{$saler['admin_name']}} @if( $k < $a['salers_k']-1), @endif
- @endforeach
- @endif
- </td>
- <td class="text-c">{{$a['note']}}</td>
- <td class="text-c">{{$a['url']}}</td>
- <td class="text-c"><img style="width:100px;" src="{{$a['back_img']}}" /></td>
- <td class="text-c">{{$a['create_time']}}</td>
-
- <td class="f-14 product-brand-manage">
- <a style="text-decoration:none" onClick='templateedit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
- <a style="text-decoration:none" onClick='assign("分配销售","{{$a['id']}}")' href="javascript:;" title="分配销售"><span class="btn btn-primary radius">分配销售</span></a>
- <!--a style="text-decoration:none" class="ml-5" onClick="templatedel(this, '{{$a["id"]}}')" href="javascript:;" title="删除"><span class="btn btn-danger 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 templateadd(title){
- location.href = '/admin/template/sourcecreate';
- }
- /*管理员-编辑*/
- function templateedit(title,id){
- location.href = "/admin/template/sourceedit/"+id;
- }
- function assign(title,id){
- layer.open({
- type: 2,
- shade: false,
- area: ['400px', '60%'], //宽高
- title: "分配销售", //不显示标题
- content: 'getAssigns?id='+id //捕获的元素,注意:最好该指定的元素要存放在body最外层
- });
- }
- /*管理员-删除*/
- function templatedel(obj,id){
- layer.confirm('确认要删除吗?',function(index){
- $.ajax({
- type: 'GET',
- url: '/admin/template/delete/'+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- $(obj).parents("tr").remove();
- layer.msg('已删除!',{icon:1,time:1000});
- }
- }
- });
- });
- }
- /*分页*/
-
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- location.href='sourceindex?page='+num;
- }
- })
- </script>
- </body>
- @endsection
|