123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>呵呵商城活动管理</title>
- <meta name="decorator" content="default"/>
- <style type="text/css">
- .table th{text-align: center;}
- .table td{text-align: center;}
- </style>
- <script type="text/javascript">
- $(document).ready(function() {
-
- });
- function page(n,s){
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- </script>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/hehe/cmHeheActivity/list">活动列表</a></li>
- </ul>
- <form:form id="searchForm" modelAttribute="cmHeheActivity" action="${ctx}/hehe/cmHeheActivity/" method="post" class="breadcrumb form-search">
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
- <div class="ul-form">
- <label>活动名称:</label>
- <form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
- <label>小程序状态:</label>
- <form:select path="status" class="input-medium">
- <form:option value="" label="全部"/>
- <form:option value="1" label="启用"/>
- <form:option value="2" label="停用"/>
- </form:select>
- <label>活动状态:</label>
- <form:select path="activityStatus" class="input-medium">
- <form:option value="" label="全部"/>
- <form:option value="1" label="未开始"/>
- <form:option value="2" label="进行中"/>
- <form:option value="3" label="已结束"/>
- </form:select>
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
- <input class="btn btn-primary" style="width: 80px" onclick="window.location='${ctx}/hehe/cmHeheActivity/form'" value="添加活动"/>
- <div class="clearfix"></div>
- </div>
- </form:form>
- <sys:message content="${message}"/>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>活动名称</th>
- <th>小程序状态</th>
- <th>活动状态</th>
- <th>开始时间</th>
- <th>结束时间</th>
- <th>创建时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="cmHeheActivity">
- <tr>
- <td>
- ${cmHeheActivity.name}
- </td>
- <td>
- <c:if test="${cmHeheActivity.status eq 1 }">
- <font color="green">已启用</font>
- <a href="javascript:void(0);" onclick="updateStatus('2','${cmHeheActivity.id}');" >
- 停用
- </a>
- </c:if>
- <c:if test="${cmHeheActivity.status ne 1 }">
- <font color="red">已停用</font>
- <a href="javascript:void(0)" onclick="updateStatus('1','${cmHeheActivity.id}');">
- 启用
- </a>
- </c:if>
- </td>
- <td>${cmHeheActivity.activityStatus eq 1 ? "未开始":cmHeheActivity.activityStatus eq 2 ? "进行中":"已结束"}</td>
- <td>
- <fmt:formatDate value="${cmHeheActivity.beginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
- </td>
- <td>
- <fmt:formatDate value="${cmHeheActivity.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
- </td>
- <td>
- <fmt:formatDate value="${cmHeheActivity.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
- </td>
- <td>
- <a href="${ctx}/hehe/cmHeheActivityProduct/list?activityId=${cmHeheActivity.id}">商品列表</a>
- <a href="${ctx}/hehe/cmHeheActivity/form?id=${cmHeheActivity.id}">编辑</a>
- <a href="${ctx}/hehe/cmHeheActivity/delete?id=${cmHeheActivity.id}" onclick="return confirmx('确认要删除该呵呵商城活动吗?', this.href)">删除</a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- <script>
- //状态修改
- function updateStatus(status,id){
- var msg='确定启用该活动吗?';
- if('2'==status){
- msg='确定停用该活动吗?';
- }
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
- if(v=='ok'){
- $.post("${ctx}/hehe/cmHeheActivity/updateStatus",{'status':status,'id':id}, function(data) {
- if(true==data.success){
- $.jBox.tip(data.msg, 'info');
- } else {
- $.jBox.tip(data.msg,'error');
- }
- $("#searchForm").submit();
- },"JSON");//这里返回的类型有:json,html,xml,text
- }
- return;
- },{buttonsFocus:1,persistent: true});
- }
- </script>
- </body>
- </html>
|