edit.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <form id="form" action="{:url('store.card/edit')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <table class="formtable">
  4. {if empty($info)}
  5. <tr>
  6. <th>所属好店:</th>
  7. <td>
  8. <input datatype="n" readonly="readonly" id="store_id" class="readonly input" type="text" name="store_id" value="{$info.store_id}" />
  9. <button url="{:url('store.index/selectStore')}" data="store_id" type="button" class="selectid button"><i class="iconfont icon-store_icon"></i>选择好店</button>
  10. <button url="{:url('store.index/review')}" type="button" class="reviewStore button button-blue"><i class="iconfont icon-search_icon"></i>预览</button>
  11. </td>
  12. </tr>
  13. {/if}
  14. <tr><th>活动名称:</th><td><input class="input" datatype="*" type="text" name="name" value="{$info.name}" /></td></tr>
  15. <tr><th>结束日期:</th><td><input readonly class="input ui-date" datatype="date" type="text" name="locktime" value="{$info.locktime?date('Y-m-d',$info.locktime):''}" /></td></tr>
  16. <tr><th>付款金额:</th><td><input class="input" datatype="npot" type="text" name="price" value="{$info.price}" /> <span class="gray">元</span></td></tr>
  17. <tr><th>储值额度:</th><td><input class="input" datatype="n" type="text" name="amount" value="{$info.coupon.amount}" /> <span class="gray">元</span></td></tr>
  18. <tr><th>使用门槛:</th><td><input class="input" datatype="npot" type="text" name="howmuch" value="{$info.coupon.howmuch}" /> <span class="gray">元</span></td></tr>
  19. <tr><th>储值数量:</th><td><input class="input" datatype="n" type="text" name="num" value="{$info.coupon.num}" /></td></tr>
  20. <tr><th>规则描述:</th><td><input class="input w300" datatype="*" type="text" name="tips" value="{$info.coupon.tips}" /></td></tr>
  21. <tr><th>使用须知:</th><td><div class="w600"><textarea class="input w300 ui-mieditor" datatype="*" type="text" name="content" />{$info.tips|dehtml}</textarea></div></td></tr>
  22. <tr><th></th><td><input type="submit" value="确定" class="button button-blue submit" /><input type="reset" value="重置" class="button button-blank"/></td></tr>
  23. </table>
  24. </form>
  25. <script type="text/javascript">
  26. Do('base','layer','form','editor','date', function () {
  27. $('#form').isForm({'upload':'{:url("system/passport.common/upload")}'});
  28. $(".selectid").win();
  29. $(".reviewStore").click(function(){
  30. var id = $("#store_id").val();
  31. if(id== null || id=="" || id=='undefined'){
  32. parent.layer.alert('没有选择所属好店')
  33. }else{
  34. $(this).popup({'url':'{:url("store.index/review")}?id='+id})
  35. }
  36. });
  37. })
  38. function setState(store){
  39. $('#store_id').val(store.id);
  40. }
  41. </script>