2018-12-15 05:31:42 +00:00
{{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'])}}
2018-12-18 03:10:53 +00:00
优惠券添加
2018-12-15 05:31:42 +00:00
{{else /}}
2018-12-18 03:10:53 +00:00
优惠券编辑
2018-12-15 05:31:42 +00:00
{{/if}}
< / span >
2018-12-17 10:50:26 +00:00
< a href = "{{:url('Admin/Coupon/Index')}}" class = "fr fs-14 m-t-5 am-icon-mail-reply" > 返回< / a >
2018-12-15 05:31:42 +00:00
< / legend >
< div class = "am-form-group" >
2018-12-18 03:10:53 +00:00
< 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 />
2018-12-15 05:31:42 +00:00
< / div >
< div class = "am-form-group" >
2018-12-18 03:10:53 +00:00
< label > 优惠券类型< / label >
< select name = "type" class = "am-radius" placeholder = "优惠券类型有误" { { if ! empty ( $ data ) } } disabled { { / if } } >
2018-12-15 05:31:42 +00:00
< 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" >
2018-12-18 03:10:53 +00:00
< 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 / >
2018-12-15 05:31:42 +00:00
< / div >
< div class = "am-form-group" >
2018-12-18 03:10:53 +00:00
< 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}}" / >
2018-12-15 05:31:42 +00:00
< / div >
< div class = "am-form-group" >
2018-12-18 03:10:53 +00:00
< label > 有效时间< / label >
2018-12-15 05:31:42 +00:00
< div class = "twain-date" >
2018-12-18 03:10:53 +00:00
< 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 />
2018-12-15 05:31:42 +00:00
< span > ~< / span >
2018-12-18 03:10:53 +00:00
< 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 />
2018-12-15 05:31:42 +00:00
< / div >
< / div >
< include file = "Lib/Enable" / >
< div class = "am-form-group" >
< input type = "hidden" name = "id" < notempty name = "data" > value="{{$data.id}}"{{/if}}" />
2018-12-17 10:50:26 +00:00
< button type = "submit" class = "am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading = "{loadingText:'处理中...'}" > 保存< / button >
2018-12-15 05:31:42 +00:00
< / div >
< / form >
<!-- form end -->
< / div >
< / div >
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->