60 lines
3.4 KiB
HTML
Executable File
60 lines
3.4 KiB
HTML
Executable File
{{include file="public/header" /}}
|
|
|
|
<!-- right content start -->
|
|
<div class="content-right">
|
|
<div class="content">
|
|
<!-- form start -->
|
|
<form class="am-form form-validation view-save" action="{{:url('Admin/Coupon/Save')}}" method="POST" request-type="ajax-url" request-value="{{:url('Admin/Coupon/Index')}}" enctype="multipart/form-data">
|
|
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
|
|
<legend>
|
|
<span class="fs-16)}}
|
|
{{if empty($data['id'])}}
|
|
优惠券添加
|
|
{{else /}}
|
|
优惠券编辑
|
|
{{/if}}
|
|
</span>
|
|
<a href="{{:url('Admin/Coupon/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
|
|
</legend>
|
|
<div class="am-form-group">
|
|
<label>优惠券名称</label>
|
|
<input type="text" name="name" placeholder="优惠券名称" minlength="2" maxlength="60" data-validation-message="优惠券名称格式 2~60 个字符" class="am-radius" <notempty name="data"> value="{{$data.name}}"{{/if}} required />
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>优惠券类型</label>
|
|
<select name="type" class="am-radius" placeholder="优惠券类型有误" {{if !empty($data)}}disabled{{/if}}>
|
|
<foreach name="common_coupon_type" item="v">
|
|
<option value="{{$v.id}}" {{if isset($data['type']) and $data['type'] eq $v['id']">selected{{else /}}{{if !isset($data['type']) and isset($v['checked']) and $v['checked'] eq true">selected{{/if}}{{/if}}>{{$v.name}}</option>
|
|
{{/foreach}}
|
|
</select>
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>金额(元)</label>
|
|
<input type="text" placeholder="金额(元)" name="price" pattern="{{:lang('common_regex_price')}}" data-validation-message="金额有误" class="am-radius" value="{{if isset($data['price']) and $data['price'] GT 0.0)}}{{$data.price}}{{/if}}" required />
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>使用条件金额(元)</label>
|
|
<input type="text" placeholder="使用条件金额(元)" name="use_where_price" pattern="{{:lang('common_regex_price')}}" data-validation-message="使用条件金额有误" class="am-radius" value="{{if isset($data['use_where_price']) and $data['use_where_price'] GT 0.0)}}{{$data.use_where_price}}{{/if}}" />
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>有效时间</label>
|
|
<div class="twain-date">
|
|
<input class="Wdate am-radius" type="text" placeholder="有效时间" name="valid_start_time" data-validation-message="有效开始时间有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <notempty name="data"> value="{{$data.valid_start_time}}"{{/if}} required />
|
|
<span>~</span>
|
|
<input class="Wdate am-radius" type="text" placeholder="有效时间" name="valid_end_time" data-validation-message="有效截止时间有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <notempty name="data"> value="{{$data.valid_end_time}}"{{/if}} required />
|
|
</div>
|
|
</div>
|
|
<include file="Lib/Enable" />
|
|
<div class="am-form-group">
|
|
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"{{/if}}" />
|
|
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
|
</div>
|
|
</form>
|
|
<!-- form end -->
|
|
</div>
|
|
</div>
|
|
<!-- right content end -->
|
|
|
|
<!-- footer start -->
|
|
{{include file="public/footer" /}}
|
|
<!-- footer end --> |