redemptionCodeCouponList.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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/codeCouponList">兑换码优惠券</a></li>
  25. </ul>
  26. <form:form id="searchForm" modelAttribute="cmCoupon" action="${ctx}/coupon/cmCoupon/codeCouponList" method="post" class="breadcrumb form-search">
  27. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  28. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  29. <div class="ul-form">
  30. <label>活动主题:</label>
  31. <form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
  32. <label>状态:</label>
  33. <form:select path="status" class="input-medium required">
  34. <form:option value="" label="所有"/>
  35. <form:option value="0" label="未生效"/>
  36. <form:option value="1" label="已生效"/>
  37. <form:option value="2" label="已关闭"/>
  38. <form:option value="3" label="已失效"/>
  39. </form:select>
  40. <label>优惠时间:</label>
  41. <input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
  42. value="<fmt:formatDate value="${cmCoupon.startDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
  43. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
  44. <input name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
  45. value="<fmt:formatDate value="${cmCoupon.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
  46. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
  47. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  48. <input class="btn btn-primary" style="width: 120px" onclick="window.location='${ctx}/coupon/cmCoupon/codeCouponForm'" value="添加兑换码优惠券"/>
  49. <div class="clearfix"></div>
  50. </div>
  51. </form:form>
  52. <sys:message content="${message}"/>
  53. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  54. <thead>
  55. <tr>
  56. <th>ID</th>
  57. <th>活动主题</th>
  58. <th>优惠券金额</th>
  59. <th>优惠条件</th>
  60. <th>已兑换数量</th>
  61. <th>上架时间</th>
  62. <th>下架时间</th>
  63. <th>使用期限</th>
  64. <th>状态</th>
  65. <th>添加时间</th>
  66. <th>操作</th>
  67. </tr>
  68. </thead>
  69. <tbody>
  70. <c:forEach items="${page.list}" var="cmCoupon">
  71. <tr>
  72. <td>
  73. ${cmCoupon.id}
  74. </td>
  75. <td>
  76. ${cmCoupon.name}
  77. </td>
  78. <td>
  79. ${cmCoupon.couponAmount}
  80. </td>
  81. <td>
  82. 满${cmCoupon.touchPrice}
  83. </td>
  84. <td>
  85. ${cmCoupon.codeNum}
  86. </td>
  87. <td>
  88. <fmt:formatDate value="${cmCoupon.startDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  89. </td>
  90. <td>
  91. <fmt:formatDate value="${cmCoupon.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  92. </td>
  93. <td>
  94. <c:if test="${cmCoupon.usePeriod > 0}">${cmCoupon.usePeriod}天</c:if>
  95. <c:if test="${empty cmCoupon.usePeriod || cmCoupon.usePeriod < 0}">--</c:if>
  96. </td>
  97. <td>
  98. <c:if test="${cmCoupon.status eq 0}">
  99. <font color="#800080">未生效</font>
  100. </c:if>
  101. <c:if test="${cmCoupon.status eq 1}">
  102. <font color="#00CC66">已生效</font>
  103. </c:if>
  104. <c:if test="${cmCoupon.status eq 2}">
  105. <font color="red">已关闭</font>
  106. </c:if>
  107. <c:if test="${cmCoupon.status eq 3}">
  108. <font color="#FF6600">已失效</font>
  109. </c:if>
  110. </td>
  111. <td>
  112. <fmt:formatDate value="${cmCoupon.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  113. </td>
  114. <td>
  115. <a href="${ctx}/coupon/cmCoupon/codeCouponForm?id=${cmCoupon.id}">编辑</a>
  116. <c:if test="${cmCoupon.status eq 2}">
  117. <a href="${ctx}/coupon/cmCoupon/open?id=${cmCoupon.id}" onclick="return confirmx('确定开启该活动吗?', this.href)">开启</a>
  118. </c:if>
  119. <c:if test="${cmCoupon.status ne 2}">
  120. <a href="${ctx}/coupon/cmCoupon/close?id=${cmCoupon.id}" onclick="return confirmx('确定关闭该活动吗?', this.href)">关闭</a>
  121. </c:if>
  122. <a href="${ctx}/coupon/cmCoupon/delete?id=${cmCoupon.id}" onclick="return confirmx('确定删除该活动吗?', this.href)">删除</a>
  123. <a href="javascript:void(0);" onclick="showSelect(${cmCoupon.id})">查看兑换码</a>
  124. </td>
  125. </tr>
  126. </c:forEach>
  127. </tbody>
  128. </table>
  129. <script>
  130. function showSelect(couponId) {
  131. var url = "${ctx}/coupon/cmCoupon/redemptionCode?couponId=" + couponId;
  132. var title = '';
  133. title = "查看兑换码";
  134. top.$.jBox("iframe:" + url, {
  135. iframeScrolling: 'yes',
  136. width: $(top.document).width() - 750,
  137. height: $(top.document).height() - 300,
  138. persistent: true,
  139. title: title,
  140. buttons: {"确定": '1'}
  141. });
  142. }
  143. </script>
  144. <div class="pagination">${page}</div>
  145. </body>
  146. </html>