cmHeheActivityList.jsp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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}/hehe/cmHeheActivity/list">活动列表</a></li>
  25. </ul>
  26. <form:form id="searchForm" modelAttribute="cmHeheActivity" action="${ctx}/hehe/cmHeheActivity/" 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">
  34. <form:option value="" label="全部"/>
  35. <form:option value="1" label="启用"/>
  36. <form:option value="2" label="停用"/>
  37. </form:select>
  38. <label>活动状态:</label>
  39. <form:select path="activityStatus" class="input-medium">
  40. <form:option value="" label="全部"/>
  41. <form:option value="1" label="未开始"/>
  42. <form:option value="2" label="进行中"/>
  43. <form:option value="3" label="已结束"/>
  44. </form:select>
  45. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  46. &nbsp;&nbsp;<input class="btn btn-primary" style="width: 80px" onclick="window.location='${ctx}/hehe/cmHeheActivity/form'" value="添加活动"/>
  47. <div class="clearfix"></div>
  48. </div>
  49. </form:form>
  50. <sys:message content="${message}"/>
  51. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  52. <thead>
  53. <tr>
  54. <th>活动名称</th>
  55. <th>小程序状态</th>
  56. <th>活动状态</th>
  57. <th>开始时间</th>
  58. <th>结束时间</th>
  59. <th>创建时间</th>
  60. <th>操作</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <c:forEach items="${page.list}" var="cmHeheActivity">
  65. <tr>
  66. <td>
  67. ${cmHeheActivity.name}
  68. </td>
  69. <td>
  70. <c:if test="${cmHeheActivity.status eq 1 }">
  71. <font color="green">已启用</font>
  72. <a href="javascript:void(0);" onclick="updateStatus('2','${cmHeheActivity.id}');" >
  73. 停用
  74. </a>
  75. </c:if>
  76. <c:if test="${cmHeheActivity.status ne 1 }">
  77. <font color="red">已停用</font>
  78. <a href="javascript:void(0)" onclick="updateStatus('1','${cmHeheActivity.id}');">
  79. 启用
  80. </a>
  81. </c:if>
  82. </td>
  83. <td>${cmHeheActivity.activityStatus eq 1 ? "未开始":cmHeheActivity.activityStatus eq 2 ? "进行中":"已结束"}</td>
  84. <td>
  85. <fmt:formatDate value="${cmHeheActivity.beginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
  86. </td>
  87. <td>
  88. <fmt:formatDate value="${cmHeheActivity.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
  89. </td>
  90. <td>
  91. <fmt:formatDate value="${cmHeheActivity.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
  92. </td>
  93. <td>
  94. <a href="${ctx}/hehe/cmHeheActivityProduct/list?activityId=${cmHeheActivity.id}">商品列表</a>
  95. <a href="${ctx}/hehe/cmHeheActivity/form?id=${cmHeheActivity.id}">编辑</a>
  96. <a href="${ctx}/hehe/cmHeheActivity/delete?id=${cmHeheActivity.id}" onclick="return confirmx('确认要删除该呵呵商城活动吗?', this.href)">删除</a>
  97. </td>
  98. </tr>
  99. </c:forEach>
  100. </tbody>
  101. </table>
  102. <div class="pagination">${page}</div>
  103. <script>
  104. //状态修改
  105. function updateStatus(status,id){
  106. var msg='确定启用该活动吗?';
  107. if('2'==status){
  108. msg='确定停用该活动吗?';
  109. }
  110. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  111. if(v=='ok'){
  112. $.post("${ctx}/hehe/cmHeheActivity/updateStatus",{'status':status,'id':id}, function(data) {
  113. if(true==data.success){
  114. $.jBox.tip(data.msg, 'info');
  115. } else {
  116. $.jBox.tip(data.msg,'error');
  117. }
  118. $("#searchForm").submit();
  119. },"JSON");//这里返回的类型有:json,html,xml,text
  120. }
  121. return;
  122. },{buttonsFocus:1,persistent: true});
  123. }
  124. </script>
  125. </body>
  126. </html>