index.html 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <div class="titlebar button-group">
  2. <div class="fn-left">优惠券</div>
  3. <div class="fn-right">
  4. <form id="form" action="{:url('coupon.index/index')}" class="input-group">
  5. <input type="hidden" id="store_id" name="store_id" value="{$store_id}"/>
  6. <input type="hidden" name="types" value="{$types}"/>
  7. <input placeholder="开始时间" class="input w100 ui-date" type="text" name="starttime" readonly autocomplete="false" value="{$starttime}"/>
  8. <input placeholder="结束时间" class="input w100 ui-date" type="text" name="endtime" readonly autocomplete="false" value="{$endtime}"/>
  9. <input url="{:url('store.index/selectStore')}" id="selectStore" readonly="true" placeholder="好店名称" class="input readonly chickWin" type="text" name="store_name" value="{$store_name}" readonly/>
  10. <input placeholder="请输入优惠券名称" class="input" type="text" name="keyword" value="{$keyword}"/>
  11. <input type="submit" value="搜索" class="button button-blue" />
  12. </form>
  13. </div>
  14. <div class="fn-right">
  15. <a href="{:url('coupon.index/index',['time' => 1,'types'=>0])}" class="button {$time==1?'button-violet':''}">今日</a>
  16. <a href="{:url('coupon.index/index',['time' => 2,'types'=>0])}" class="button {$time==2?'button-violet':''}">昨日</a>
  17. <a href="{:url('coupon.index/index',['time' => 30,'types'=>0])}" class="button {$time==30?'button-violet':''}"">本月</a>
  18. <a href="{:url('coupon.index/index',['time' => 60,'types'=>0])}" class="button {$time==60?'button-violet':''}"">上月</a>
  19. </div>
  20. </div>
  21. <div class="titlebar">
  22. <div class="fn-left">
  23. <sapan class="button button-blue chickWin" url="{:url('coupon.index/edit')}"> <i class="iconfont icon-add_icon"></i>增加优惠券</sapan>
  24. </div>
  25. <div class="fn-right button-group">
  26. <a href="{:url('coupon.index/index',['types'=>1,'time' => $time,'starttime' => $starttime,'endtime' => $endtime])}" class="button{if $types == 1} button-green{/if}">禁领取</a>
  27. <a href="{:url('coupon.index/index',['types'=>2,'time' => $time,'starttime' => $starttime,'endtime' => $endtime])}" class="button{if $types == 2} button-yellow{/if}">回收站</a>
  28. </div>
  29. </div>
  30. <table class="table table-border">
  31. <thead>
  32. <tr>
  33. <th class="w60 fn-tac">排序</th>
  34. <th>优惠券信息</th>
  35. <th class="w100 fn-tar">发现数量</th>
  36. <th class="w100 fn-tar">满用(¥)</th>
  37. <th class="w100 fn-tac">类型</th>
  38. <th class="w100 fn-tar">优惠</th>
  39. <th class="w120 fn-tac">更新日期</th>
  40. <th class="w120 fn-tac">状态</th>
  41. <th class="w150 fn-tac">操作</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. {foreach $lists as $vo}
  46. <tr>
  47. <td class="fn-tac"><input name="sort" class="fn-tac w40 input input-mini sort" type="text" value="{$vo['sort']}" id="{$vo.id}" /></td>
  48. <td>
  49. <p class="chickWin fn-cp" url="{:url('coupon.index/review',['id'=>$vo.id])}">
  50. <i class="iconfont icon-discount"></i><span class="fn-fb">{$vo.name}</span><br />
  51. <span class="gray"><i class="iconfont icon-wodedingdan2"></i>{$vo.tips}</span>
  52. </p>
  53. </td>
  54. <td class="fn-tar">{$vo.num}</td>
  55. <td class="fn-tar">¥{$vo.howmuch|money}</td>
  56. <td class="fn-tac"><span class="badge {switch $vo.types}{case 1}bg-green{/case}{case 2}{/case}{case 3}bg-red{/case}{default /}bg-blue{/switch}">{$vo.typesname}</span></td>
  57. <td class="fn-tar">{$vo.degree}</td>
  58. <td class="fn-tac">{$vo.update_time|date="Y-m-d"}</td>
  59. <td class="fn-tac">
  60. {if $vo.is_end}
  61. <span class="fn-cp badge" title="过期/领完">失效</span>
  62. {else}
  63. <span class="fn-cp istop badge {$vo.is_lock?'bg-red':''}" url="{:url('coupon.index/islock',['id'=>$vo.id])}">{$vo.is_lock?'禁领取':'禁领取'}</span>
  64. <span class="fn-cp istop badge {$vo.is_top?'bg-green':''}" url="{:url('coupon.index/istop',['id'=>$vo.id])}">{$vo.is_top?'推荐':'推荐'}</span>
  65. {/if}
  66. </td>
  67. <td class="button-group">
  68. {if $vo.types == 3}
  69. <a class="button button-mini button-disabled" href="javascript:;"><i class="iconfont icon-edit"></i>编辑</a>
  70. <a class="button button-mini button-disabled" href="javascript:;"><i class="iconfont icon-lajixiang"></i>删除</a>
  71. {else}
  72. <a class="button button-mini chickWin" url="{:url('coupon.index/edit',['id'=>$vo.id])}" href="javascript:;"><i class="iconfont icon-edit"></i>编辑</a>
  73. <a class="button button-mini isDel" url="{:url('coupon.index/delete',['id'=>$vo.id])}" href="javascript:;" title="删除"><i class="iconfont icon-lajixiang"></i>删除</a>
  74. {/if}
  75. </td>
  76. </tr>
  77. {/foreach}
  78. </tbody>
  79. </table>
  80. {$lists|raw}
  81. <script type="text/javascript">
  82. Do('base','form','layer','date', function () {
  83. $('#form').isForm({types:1});
  84. $('.isDel').isDel();
  85. $('.sort').changeUrl({
  86. url:"{:url('coupon.index/sort')}"
  87. });
  88. $('.istop').actUrl();
  89. $(".chickWin").win({reload:1});
  90. })
  91. function setState(store){
  92. $("#store_id").val(store.id);
  93. $("#selectStore").val(store.store_name);
  94. }
  95. </script>