cmCouponList.jsp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>优惠券管理列表</title>
  6. <meta name="decorator" content="default"/>
  7. <style type="text/css">
  8. .table th{text-align: center;}
  9. .table td{text-align: center;}
  10. </style>
  11. <script type="text/javascript">
  12. $(document).ready(function() {
  13. });
  14. function page(n,s){
  15. $("#pageNo").val(n);
  16. $("#pageSize").val(s);
  17. $("#searchForm").submit();
  18. return false;
  19. }
  20. </script>
  21. </head>
  22. <body>
  23. <ul class="nav nav-tabs">
  24. <li class="active"><a href="${ctx}/coupon/cmCoupon/list?couponType=0">活动券</a></li>
  25. <li><a href="${ctx}/coupon/cmCoupon/list?couponType=1">品类券</a></li>
  26. <li><a href="${ctx}/coupon/cmCoupon/list?couponType=2">用户专享券</a></li>
  27. <li><a href="${ctx}/coupon/cmCoupon/list?couponType=3">店铺券</a></li>
  28. <li><a href="${ctx}/coupon/cmCoupon/list?couponType=4">新用户券</a></li>
  29. </ul>
  30. <form:form id="searchForm" modelAttribute="cmCoupon" action="${ctx}/coupon/cmCoupon/" method="post" class="breadcrumb form-search">
  31. <input type="hidden" name="couponType" value="0"/>
  32. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  33. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  34. <div class="ul-form">
  35. <label>活动主题:</label>
  36. <form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
  37. <label>优惠状态:</label>
  38. <form:select path="status" class="input-medium required">
  39. <form:option value="" label="所有"/>
  40. <form:option value="0" label="待上架"/>
  41. <form:option value="1" label="已上架"/>
  42. <form:option value="3" label="已下架"/>
  43. <form:option value="2" label="已关闭"/>
  44. </form:select>
  45. <label>优惠时间:</label>
  46. <input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
  47. value="<fmt:formatDate value="${cmCoupon.startDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
  48. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
  49. <input name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
  50. value="<fmt:formatDate value="${cmCoupon.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
  51. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
  52. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  53. <input class="btn btn-primary" style="width: 80px" onclick="window.location='${ctx}/coupon/cmCoupon/form?couponType=0'" value="添加活动券"/>
  54. <div class="clearfix"></div>
  55. </div>
  56. </form:form>
  57. <sys:message content="${message}"/>
  58. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  59. <thead>
  60. <tr>
  61. <th>ID</th>
  62. <th>活动主题</th>
  63. <th>优惠券金额</th>
  64. <th>优惠条件</th>
  65. <th>上架时间</th>
  66. <th>下架时间</th>
  67. <th>领取期限</th>
  68. <th>使用期限</th>
  69. <th>状态</th>
  70. <th>添加时间</th>
  71. <th>操作</th>
  72. </tr>
  73. </thead>
  74. <tbody>
  75. <c:forEach items="${page.list}" var="cmCoupon">
  76. <tr>
  77. <td>
  78. ${cmCoupon.id}
  79. </td>
  80. <td>
  81. ${cmCoupon.name}
  82. </td>
  83. <td>
  84. ${cmCoupon.couponAmount}
  85. </td>
  86. <td>
  87. 满${cmCoupon.touchPrice}
  88. </td>
  89. <td>
  90. <fmt:formatDate value="${cmCoupon.startDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  91. </td>
  92. <td>
  93. <fmt:formatDate value="${cmCoupon.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  94. </td>
  95. <td>
  96. <c:if test="${cmCoupon.receivePeriod > 0}">${cmCoupon.receivePeriod}天</c:if>
  97. <c:if test="${empty cmCoupon.receivePeriod || cmCoupon.receivePeriod < 0}">--</c:if>
  98. </td>
  99. <td>
  100. <c:if test="${cmCoupon.usePeriod > 0}">${cmCoupon.usePeriod}天</c:if>
  101. <c:if test="${empty cmCoupon.usePeriod || cmCoupon.usePeriod < 0}">--</c:if>
  102. </td>
  103. <td>
  104. <c:if test="${cmCoupon.status eq 0}">
  105. <font color="#800080">待上架</font>
  106. </c:if>
  107. <c:if test="${cmCoupon.status eq 1}">
  108. <font color="#00CC66">已上架</font>
  109. </c:if>
  110. <c:if test="${cmCoupon.status eq 2}">
  111. <font color="red">已关闭</font>
  112. </c:if>
  113. <c:if test="${cmCoupon.status eq 3}">
  114. <font color="#FF6600">已下架</font>
  115. </c:if>
  116. </td>
  117. <td>
  118. <fmt:formatDate value="${cmCoupon.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  119. </td>
  120. <td>
  121. <a href="${ctx}/coupon/cmCoupon/form?id=${cmCoupon.id}">编辑</a>
  122. <c:if test="${cmCoupon.status eq 2}">
  123. <a href="${ctx}/coupon/cmCoupon/open?id=${cmCoupon.id}" onclick="return confirmx('确定开启该活动吗?', this.href)">开启</a>
  124. </c:if>
  125. <c:if test="${cmCoupon.status ne 2}">
  126. <a href="${ctx}/coupon/cmCoupon/close?id=${cmCoupon.id}" onclick="return confirmx('确定关闭该活动吗?', this.href)">关闭</a>
  127. </c:if>
  128. <a href="${ctx}/coupon/cmCoupon/delete?id=${cmCoupon.id}" onclick="return confirmx('确定删除该活动吗?', this.href)">删除</a>
  129. <a href="${ctx}/coupon/cmCouponClub/list?couponId=${cmCoupon.id}&couponType=0">领取用户</a>
  130. </td>
  131. </tr>
  132. </c:forEach>
  133. </tbody>
  134. </table>
  135. <div class="pagination">${page}</div>
  136. </body>
  137. </html>