|
@@ -0,0 +1,116 @@
|
|
1
|
+@extends('admin/master')
|
|
2
|
+@section('content')
|
|
3
|
+ <body>
|
|
4
|
+ @if(session('info'))
|
|
5
|
+ <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
|
|
6
|
+ {{session('info')}}
|
|
7
|
+ </div>
|
|
8
|
+ @endif
|
|
9
|
+ <div class="page-container">
|
|
10
|
+ <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>
|
|
11
|
+ <div class="mt-20">
|
|
12
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
13
|
+ <thead>
|
|
14
|
+ <tr class="text-c">
|
|
15
|
+ {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
|
|
16
|
+ <th width="5%">模板ID</th>
|
|
17
|
+ <th width="10%">模板链接</th>
|
|
18
|
+ <th width="10%">模板描述</th>
|
|
19
|
+ <th width="8%">模板样式图</th>
|
|
20
|
+ <th width="8%">正在使用的销售</th>
|
|
21
|
+ <th width="10%">操作</th>
|
|
22
|
+ </tr>
|
|
23
|
+ </thead>
|
|
24
|
+ <tbody>
|
|
25
|
+ @if($result)
|
|
26
|
+ @foreach($result as $a)
|
|
27
|
+ <tr class="text-c">
|
|
28
|
+ {{--<td><input name="" type="checkbox" value=""></td>--}}
|
|
29
|
+ <td class="text-c">{{$a['id']}}</td>
|
|
30
|
+ <td class="text-c">{{$a['url']}}</td>
|
|
31
|
+ <td class="text-c">{{$a['note']}}</td>
|
|
32
|
+ <td class="text-c"><img style="width:100px;" src="{{$a['img']}}" /></td>
|
|
33
|
+ <td class="text-c">
|
|
34
|
+ @if($a['salers'])
|
|
35
|
+ @foreach($a['salers'] as $k=>$saler)
|
|
36
|
+ {{$saler['admin_name']}} @if( $k < $a['salers_k']-1), @endif
|
|
37
|
+ @endforeach
|
|
38
|
+ @endif
|
|
39
|
+ </td>
|
|
40
|
+ <td class="f-14 product-brand-manage">
|
|
41
|
+ <a style="text-decoration:none" onClick='templateedit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑模板</span></a>
|
|
42
|
+ <a style="text-decoration:none" onClick='assign("分配销售","{{$a['id']}}")' href="javascript:;" title="分配销售"><span class="btn btn-primary radius">分配销售</span></a>
|
|
43
|
+ <!--a style="text-decoration:none" class="ml-5" onClick="templatedel(this, '{{$a["id"]}}')" href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a-->
|
|
44
|
+ </td>
|
|
45
|
+ </tr>
|
|
46
|
+ @endforeach
|
|
47
|
+ @endif
|
|
48
|
+ </tbody>
|
|
49
|
+ </table>
|
|
50
|
+ </div>
|
|
51
|
+ <div id="page" class="page_div"></div>
|
|
52
|
+ </div>
|
|
53
|
+
|
|
54
|
+ <!--_footer 作为公共模版分离出去-->
|
|
55
|
+ <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
|
|
56
|
+ <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
|
|
57
|
+ <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
|
|
58
|
+ <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
|
|
59
|
+ <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
|
|
60
|
+ <!--/_footer 作为公共模版分离出去-->
|
|
61
|
+ <!--/_footer 作为公共模版分离出去-->
|
|
62
|
+
|
|
63
|
+ <script type="text/javascript">
|
|
64
|
+ $(function(){
|
|
65
|
+ setTimeout("$('#info').hide()",3000);
|
|
66
|
+ });
|
|
67
|
+ /*管理员-添加*/
|
|
68
|
+ function templateadd(title){
|
|
69
|
+ location.href = '/admin/template/create';
|
|
70
|
+ }
|
|
71
|
+ /*管理员-编辑*/
|
|
72
|
+ function templateedit(title,id){
|
|
73
|
+ location.href = "/admin/template/edit/"+id;
|
|
74
|
+ }
|
|
75
|
+ function assign(title,id){
|
|
76
|
+
|
|
77
|
+ layer.open({
|
|
78
|
+ type: 2,
|
|
79
|
+ shade: false,
|
|
80
|
+ area: ['400px', '60%'], //宽高
|
|
81
|
+ title: "分配销售", //不显示标题
|
|
82
|
+ content: 'getAssigns?id='+id //捕获的元素,注意:最好该指定的元素要存放在body最外层
|
|
83
|
+ });
|
|
84
|
+ }
|
|
85
|
+ /*管理员-删除*/
|
|
86
|
+ function templatedel(obj,id){
|
|
87
|
+ layer.confirm('确认要删除吗?',function(index){
|
|
88
|
+ $.ajax({
|
|
89
|
+ type: 'GET',
|
|
90
|
+ url: '/admin/template/delete/'+id,
|
|
91
|
+ dataType: 'json',
|
|
92
|
+ success: function(data){
|
|
93
|
+ if(data == 1){
|
|
94
|
+ $(obj).parents("tr").remove();
|
|
95
|
+ layer.msg('已删除!',{icon:1,time:1000});
|
|
96
|
+ }
|
|
97
|
+ }
|
|
98
|
+ });
|
|
99
|
+ });
|
|
100
|
+ }
|
|
101
|
+
|
|
102
|
+ /*分页*/
|
|
103
|
+
|
|
104
|
+ $("#page").paging({
|
|
105
|
+ pageNo:{{$page}},
|
|
106
|
+ totalPage: {{$pages}},
|
|
107
|
+ totalSize: {{$count}},
|
|
108
|
+ callback: function(num) {
|
|
109
|
+ location.href='index?page='+num;
|
|
110
|
+ }
|
|
111
|
+ })
|
|
112
|
+
|
|
113
|
+ </script>
|
|
114
|
+ </body>
|
|
115
|
+
|
|
116
|
+@endsection
|