123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- {template '_header'}
- <div class='page-heading'><h2>充值优惠设置</h2></div>
-
- <form id="dataform" {ifp 'sale.recharge'}action="" method="post"{/if} class="form-horizontal form-validate">
-
-
- <div class="form-group">
-
- <div class="col-sm-12">
- <div class='recharge-items'>
-
- {loop $recharges $item}
-
- <div class="input-group recharge-item" style="margin-top:5px">
- <span class="input-group-addon">满</span>
- <input type="text" class="form-control" name='enough[]' value='{$item['enough']}' />
- <span class="input-group-addon">赠送</span>
- <input type="text" class="form-control" name='give[]' value='{$item['give']}' />
- <span class="input-group-addon">元</span>
- <div class='input-group-btn'>
- <button class='btn btn-danger' type='button' onclick="removeRechargeItem(this)"><i class='fa fa-remove'></i></button>
- </div>
-
- </div>
- {/loop}
- </div>
-
- <div style="margin-top:5px">
- <button type='button' class="btn btn-default" onclick='addRechargeItem()' style="margin-bottom:5px"><i class='fa fa-plus'></i> 增加优惠项</button>
- </div>
- <span class="help-block">两项都填写才能生效,赠送的余额可以固定数或比例(带%)号</span>
- <span class="help-block">例如:充值满100,赠送10</span>
- <span class="help-block">例如:充值满200,赠送15%,实际赠送30(200*15%)</span>
-
-
-
-
- </div>
- </div>
-
-
- {ifp 'sale.recharge'}
- <div class="form-group"></div>
- <div class="form-group">
-
- <div class="col-sm-9 col-xs-12">
-
- <input type="submit" value="保存设置" class="btn btn-primary"/>
-
- </div>
- </div>
- {/if}
- </div>
-
- </form>
-
- <script language='javascript'>
-
- function addRechargeItem(){
- var html= '<div class="input-group recharge-item" style="margin-top:5px">';
- html+='<span class="input-group-addon">满</span>';
- html+='<input type="text" class="form-control" name="enough[]" />';
- html+='<span class="input-group-addon">赠送</span>';
- html+='<input type="text" class="form-control" name="give[]" />';
- html+='<span class="input-group-addon">元</span>';
- html+='<div class="input-group-btn"><button type="button" class="btn btn-danger" onclick="removeRechargeItem(this)"><i class="fa fa-remove"></i></button></div>';
- html+='</div>';
- $('.recharge-items').append(html);
- }
- function removeRechargeItem(obj){
- $(obj).closest('.recharge-item').remove();
- }
-
-
- </script>
- {template '_footer'}
-
|