incoupons.html
6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_cjdianc/template/public/ygcsslist.css">
<style type="text/css">
.yg5_key>div{float: left;line-height: 34px;}
.store_td1{height: 45px;}
.store_list_img{width: 60px;height: 60px;}
.yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
.yg5_tr2>td{padding: 10px 15px;border: 1px solid #e5e5e5;text-align: center;}
.yg5_tr1>th{
border: 1px solid #e5e5e5;
padding-left: 15px;
background-color: #FAFAFA;
font-weight: bold;
text-align: center;
}
.yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
.navback{width: 0}
.main{margin: 16px 0px 30px 45px;}
.nav_box{
left: 150px;
top: 48px;
bottom: 0;
color: #333;
border-right: 1px solid #efefef;
text-align: center;
position: fixed;
background: #fff;
z-index: 99;
padding:0;
}
.left_nav{
padding-top: 20px
}
.left_nav li{
line-height: 45px;
}
.left_nav li.active{
color: #00aeff;
background: #edf6ff
}
.left_nav li:hover{
background: #edf6ff;
}
.left_nav li:hover a{
color: #00aeff;
}
</style>
<div class="nav_box col-md-1">
<ul class="left_nav">
<!-- <span class="ygxian"></span>
<div class="ygdangq">当前位置:</div> -->
<li class="active"><a href="{php echo $this->createWebUrl('incoupons')}">优惠券列表</a></li>
<li><a href="{php echo $this->createWebUrl('inaddcoupons')}">添加/编辑优惠券</a></li>
</ul>
</div>
<!-- <ul class="nav nav-tabs">
<span class="ygxian"></span>
<div class="ygdangq">当前位置:</div>
<li class="active"><a href="{php echo $this->createWebUrl('incoupons')}">优惠券管理</a></li>
<li><a href="{php echo $this->createWebUrl('inaddcoupons')}">添加/编辑优惠券</a></li>
</ul> -->
<div class="main">
<div class="panel panel-default">
<div class="panel-heading">
优惠券列表
</div>
<div class="panel-body" style="padding: 0px 15px;">
<div class="row">
<table class="yg5_tabel col-md-12">
<tr class="yg5_tr1">
<th class="store_td1 col-md-2">优惠券名称</th>
<th class="col-md-1">优惠条件</th>
<th class="col-md-1">优惠金额</th>
<th class="col-md-1">数量</th>
<th class="col-md-1">剩余数量</th>
<th class="col-md-1">开始时间</th>
<th class="col-md-1">结束时间</th>
<th class="col-md-1">使用范围</th>
<th class="col-md-2">操作</th>
</tr>
{loop $list $key $item}
<tr class="yg5_tr2">
<td>{$item['name']}</td>
<td>{$item['full']}</td>
<td>{$item['reduce']}</td>
<td>{$item['number']}</td>
<td>{$item['stock']}</td>
<td>{$item['start_time']}</td>
<td>{$item['end_time']}</td>
{if $item['type']==1}
<td>
<span class="label label-warning"> 仅限外卖使用</span>
</td>
{elseif $item['type']==2}
<td>
<span class="label label-info"> 仅限店内使用</span>
</td>
{elseif $item['type']==3}
<td>
<span class="label label-default">两者都可使用</span>
</td>
{/if}
<td>
<a href="{php echo $this->createWebUrl('inaddcoupons', array('id' => $item['id']))}" class="storespan btn btn-xs">
<span class="fa fa-pencil"></span>
<span class="bianji">编辑
<span class="arrowdown"></span>
</span>
</a>
<a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$item['id']}">
<span class="fa fa-trash-o"></span>
<span class="bianji">删除
<span class="arrowdown"></span>
</span>
</a>
<!-- <a class="btn btn-warning btn-sm" href="{php echo $this->createWebUrl('addcoupons', array('id' => $item['id']))}" title="编辑">改</a>
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#myModal{$item['id']}">删</button> -->
</td>
</tr>
<div class="modal fade" id="myModal{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
</div>
<div class="modal-body" style="font-size: 20px">
确定删除么?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<a href="{php echo $this->createWebUrl('incoupons', array('op' => 'delete', 'id' => $item['id']))}" type="button" class="btn btn-info" >确定</a>
</div>
</div>
</div>
</div>
{/loop}
{if empty($list)}
<tr class="yg5_tr2">
<td colspan="7">
暂无优惠活动
</td>
</tr>
{/if}
</table>
</div>
</form>
</div>
{$pager}
</div>
<script type="text/javascript">
$(function(){
$("#frame-4").show();
$("#yframe-4").addClass("wyactive");
})
</script>
{template 'common/footer'}