150 lines
6.8 KiB
HTML
150 lines
6.8 KiB
HTML
{template '_header'}
|
|
<div class="page-heading">
|
|
<span class='pull-right'>
|
|
|
|
</span>
|
|
|
|
<h2>活动设置</h2>
|
|
</div>
|
|
|
|
|
|
<form {ife 'sale.sendticket' $item}action="" method="post"{/if} class="form-horizontal form-validate" enctype="multipart/form-data">
|
|
|
|
<div class="alert alert-info">
|
|
<p>注意:</p>
|
|
<p>领取条件:没有消费记录的用户可以领取。</p>
|
|
<p>优惠券选择:最多可选择三张优惠券并且优惠券必须是在有效期内,此处发放的优惠券数量不影响库存!</p>
|
|
<p>活动期限:不设置活动期限默认是活动长期有效,选择后在期限时间内有效。</p>
|
|
</div>
|
|
|
|
<input type="hidden" name="id" value="{$item['id']}" />
|
|
<div class="tab-content ">
|
|
<div class="tab-pane active">
|
|
<div class="panel-body">
|
|
|
|
<div class="form-group">
|
|
<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">开启活动</label>
|
|
<div class="col-xs-12 col-sm-8">
|
|
<div class="input-group">
|
|
{ife 'sale.package' $item}
|
|
<label class="radio radio-inline">
|
|
<input type="radio" name="status" value="0" {if intval($item['status']) ==0}checked="checked"{/if}> 否
|
|
</label>
|
|
<label class="radio radio-inline">
|
|
<input type="radio" name="status" value="1" {if intval($item['status']) ==1 }checked="checked"{/if}> 是
|
|
</label>
|
|
{else}
|
|
<div class='form-control-static'>{if intval($item['status']) ==1 }开启{else}关闭{/if}</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="new_content" {if intval($item['status']) == 0}style="display:none"{/if}>
|
|
<div class="form-group">
|
|
{ife 'sale.sendticket' $item}
|
|
<label class="col-sm-2 control-label">选择优惠券</label>
|
|
<div class="col-sm-9 col-xs-12">
|
|
{php echo tpl_selector('couponid',array('required'=>false,'multi'=>1,'type'=>'coupon_cp','autosearch'=>1, 'preview'=>true,'url'=>webUrl('sale/coupon/querycplist'),'text'=>'couponname','items'=>$coupons,'readonly'=>true,'buttontext'=>'选择优惠券','placeholder'=>'请选择优惠券'))}
|
|
</div>
|
|
{else}
|
|
{if !empty($item)}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style='width:100px;'>优惠券名称</th>
|
|
<th style='width:200px;'></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="param-items" class="ui-sortable">
|
|
{loop $coupon $row}
|
|
<tr class='multi-product-item' data-id="{$row['id']}">
|
|
<input type='hidden' class='form-control img-textname' readonly='' value="{$row['couponname']}">
|
|
<input type='hidden' value="{$row['id']}" name="couponid[]">
|
|
<td style='width:80px;'>
|
|
<img src="{php echo tomedia($row['thumb'])}" style='width:70px;border:1px solid #ccc;padding:1px'>
|
|
</td>
|
|
<td style='width:220px;'>{$row['couponname']}</td>
|
|
<td>
|
|
<input class='form-control valid' type='text' disabled value="{$item['coupontotal']}" name="coupontotal{$row['id']}">
|
|
</td>
|
|
<td>
|
|
<input class='form-control valid' type='text' disabled value="{$item['couponlimit']}" name="couponlimit{$row['id']}">
|
|
</td>
|
|
</tr>
|
|
{/loop}
|
|
</tbody>
|
|
</table>
|
|
{else}
|
|
暂无优惠券
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">设置活动期限</label>
|
|
<div class="col-xs-12 col-sm-8">
|
|
<div class="input-group">
|
|
{ife 'sale.package' $item}
|
|
<label class="radio radio-inline">
|
|
<input type="radio" name="expiration" value="0" {if intval($item['expiration']) ==0}checked="checked"{/if}> 否
|
|
</label>
|
|
<label class="radio radio-inline">
|
|
<input type="radio" name="expiration" value="1" {if intval($item['expiration']) ==1 }checked="checked"{/if}> 是
|
|
</label>
|
|
{else}
|
|
<div class='form-control-static'>{if intval($item['expiration']) ==1 }开启{else}关闭{/if}</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" id="exptime" {if intval($item['expiration']) == 0}style="display:none"{/if}>
|
|
<label class="col-sm-2 control-label">活动有效期限</label>
|
|
<div class="col-sm-5">
|
|
<div class='input-group'>
|
|
{php echo tpl_form_field_eweishop_daterange('time', array('starttime'=>date('Y-m-d', $starttime),'endtime'=>date('Y-m-d', $endtime)));}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<input type="hidden" name="id" value="{$item['id']}">
|
|
<input type="hidden" name="cpids" value="{$item['cpid']}">
|
|
{ife 'sale.sendticket' $item}
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label"></label>
|
|
<div class="col-sm-9 col-xs-12">
|
|
<input type="submit" value="提交" class="btn btn-primary" />
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
</form>
|
|
<script>
|
|
$(function(){
|
|
$("input[name='expiration']").change(function(){
|
|
if($(this).val() == '1'){
|
|
$('#exptime').css('display','block');
|
|
}else if($(this).val() == '0'){
|
|
$('#exptime').css('display','none');
|
|
}
|
|
});
|
|
|
|
$("input[name='status']").change(function(){
|
|
if($(this).val() == '1'){
|
|
$('.new_content').css('display','block');
|
|
}else if($(this).val() == '0'){
|
|
$('.new_content').css('display','none');
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{template '_footer'}
|