credit_award.html
5.03 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
{template 'common/header'}
<ul class="nav nav-tabs">
<li {if $operation == 'post'}class="active"{/if}><a href="{php echo create_url('site/entry/award', array('m' => 'wwx_fxxt', 'op' => 'post'));}">添加积分商品</a></li>
<li {if $operation == 'display'&&$modules!='credit'}class="active"{/if}><a href="{php echo create_url('site/entry/award', array('m' => 'wwx_fxxt', 'op' => 'display'));}">管理积分商品</a></li>
<li {if $operation == 'display'&&$modules=='credit'}class="active"{/if}><a href="{php echo create_url('site/entry/credit', array('m' => 'wwx_fxxt', 'op' => 'display'));}">兑换申请管理</a></li>
</ul>
{if $operation == 'post'}
<div class="main">
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
<input type="hidden" name="c" value="site" />
<input type="hidden" name="a" value="entry" />
<input type="hidden" name="m" value="wwx_fxxt" />
<input type="hidden" name="id" value="{$item['id']}" />
<div class="panel panel-info">
<div class="panel-heading">编辑奖品</div>
<div class="panel-body">
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>奖品名称:</label>
<div class="col-sm-9 col-xs-12">
<input type="text" name="title" class="form-control" value="{$item['title']}" />
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">宣传图:</label>
<div class="col-sm-6 col-xs-6">{php echo tpl_form_field_image('logo', $item['logo'] =='' ? $setting['thumb'] : $item['logo']);}</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">剩余可兑换奖品数</label>
<div class="col-sm-9 col-xs-12">
<input type="text" name="amount" class="form-control" value="{$item['amount']}" />
<span class="help-block">此设置项设置该奖品剩余奖品数。为0时不对外显示,不接受兑换。</span>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖截止日期</label>
<div class="col-sm-9 col-xs-12">
{php echo tpl_form_field_date('deadline',$item['deadline'], true)}
<span class="help-block">超过该日期后不可兑奖!</span>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品实际价格</label>
<div class="col-sm-9 col-xs-12">
<input type="text" name="price" class="form-control" value="{$item['price']}" />
<span class="help-block">此设置项设置奖品价格。</span>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑换消耗积分数</label>
<div class="col-sm-9 col-xs-12">
<input type="text" name="credit_cost" class="form-control" value="{$item['credit_cost']}" />
<span class="help-block">此设置项设置该奖品剩余奖品数。为0时不对外显示,不接受兑换。</span>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">内容</label>
<div class="col-sm-9 col-xs-12">
<textarea style="height:400px; width:100%;" id="content" name="content" class="form-control" cols="60">{$item['content']}</textarea>
</div>
</div>
<div class="form-group col-sm-12">
<input name="submit" type="submit" value="提交" class="btn btn-primary span3">
<input type="hidden" name="token" value="{$_W['token']}" />
</div>
</div>
</div>
</form>
</div>
{elseif $operation == 'display'}
<div class="main">
<div class="panel panel-default">
<div class="panel-heading">奖品列表</div>
<div class="panel-body table-responsive">
<table class="table table-hover">
<thead class="navbar-inner">
<tr>
<th style="width:150px;">奖品名称</th>
<th style="width:80px;">剩余数量</th>
<th style="width:60px;">价格</th>
<th style="width:80px;">消耗积分</th>
<th style="width:300px;">描述</th>
<th style="text-align: center;width:80px;">操作</th>
</tr>
</thead>
<tbody>
{loop $list $item}
<tr>
<td>{$item['title']}</td>
<td>{$item['amount']}</td>
<td>{$item['price']}</td>
<td>{$item['credit_cost']}</td>
<td>{php echo htmlspecialchars_decode($item['content'])}</td>
<td style="text-align:center;">
<a href="{php echo create_url('site/entry/award', array('m' => 'wwx_fxxt', 'award_id' => $item['award_id'], 'op' => 'post'))}" title="编辑" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{php echo create_url('site/entry/award', array('m' => 'wwx_fxxt', 'award_id' => $item['award_id'], 'op' => 'delete'))}" onclick="return confirm('此操作不可恢复,确认删除?');return false;" title="删除" class="btn btn-default btn-sm"><i class="fa fa-remove"></i></a>
</td>
</tr>
{/loop}
</tbody>
</table>
{$pager}
</div>
</div>
</div>
{/if}
{template 'common/footer'}