123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <form id="form" action="{:url('coupon/edit')}">
- <input type="hidden" name="id" value="{$info.id}"/>
- <div class="titlebar"><i class="iconfont icon-text_icon"></i>优惠券信息</div>
- <table class="formtable">
- {if empty($info)}
- <th>商家:</th>
- <td>
- <input id="store_id" class="readonly input w100" type="text" name="store_id" value="0" />
- <button url="{:url('smartbc/store/selectStore',['input' => 'uid'])}" type="button" class="selectid button"><i class="iconfont icon-my_icon"></i>选择店铺</button>
- </td>
- {/if}
- <tr><th>优惠券类型:</th><td>
- <select id="types" class="select w200" datatype="*" name="types" class="select">
- <option value="0" {if $info.types == 0}selected{/if}>代金券</option>
- <option value="1" {if $info.types == 1}selected{/if}>折扣券</option>
- </select>
- </td></tr>
- <tr><th>优惠券名称:</th><td><input class="input w400" datatype="*" type="text" name="name" value="{$info.name}" /></td></tr>
- <tr><th>规则描述:</th><td><input class="input w300" datatype="*" type="text" name="tips" value="{$info.tips}" /></td></tr>
- <tr class="discount{$info.types == 0 ?' fn-hide':''}"><th>单次折扣:</th><td><input class="input" datatype="npot" type="text" name="discount" value="{$info.discount}" /> 折</td></tr>
- <tr class="price{$info.types == 1 ?' fn-hide':''}"><th>单次减免(¥):</th><td><input class="input" datatype="npot" type="text" name="price" value="{$info.price}" /> 元</td></tr>
- <tr><th>满多少可用(¥):</th><td><input class="input" datatype="npot" type="text" name="howmuch" value="{$info.howmuch}" /></td></tr>
- <tr>
- <th></th>
- <td>
- <input type="submit" value="确定" class="button button-blue submit" />
- <input type="reset" value="重置" class="button"/>
- </td>
- </tr>
- </table>
- </div>
- </form>
- <script type="text/javascript">
- Do('base','layer','form','date', function () {
- $('#form').isForm();
- $(".selectid").win();
- $("#types").change(function(){
- var type = $(this).val();
- if(type == 0){
- $('.discount').hide();
- $('.price').show();
- }else{
- $('.discount').show();
- $('.price').hide();
- }
- });
- })
- function setState(store){
- $('#store_id').val(store.id);
- }
- </script>
|