cmPageCentreList.jsp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. //PC端状态修改
  21. function updateEnabledStatus(status,ids){
  22. var msg='确定开启?';
  23. if('0'==status){
  24. msg='确定停用?';
  25. }
  26. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  27. if(v=='ok'){
  28. $.post("${ctx}/cmpage/cmPageCentre/updateEnabledStatus",{'enabledStatus':status,'ids':ids}, function(data) {
  29. if(true==data.success){
  30. $.jBox.tip(data.msg, 'info');
  31. } else {
  32. $.jBox.tip(data.msg,'error');
  33. }
  34. $("#searchForm").submit();
  35. },"JSON");//这里返回的类型有:json,html,xml,text
  36. }
  37. return;
  38. },{buttonsFocus:1,persistent: true});
  39. }
  40. //移动端状态修改
  41. function updateCrmEnabledStatusByIds(status,ids){
  42. var msg='确定开启?';
  43. if('0'==status){
  44. msg='确定停用?';
  45. }
  46. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  47. if(v=='ok'){
  48. $.post("${ctx}/cmpage/cmPageCentre/updateCrmEnabledStatusByIds",{'crmEnabledStatus':status,'ids':ids}, function(data) {
  49. if(true==data.success){
  50. $.jBox.tip(data.msg, 'info');
  51. } else {
  52. $.jBox.tip(data.msg,'error');
  53. }
  54. $("#searchForm").submit();
  55. },"JSON");//这里返回的类型有:json,html,xml,text
  56. }
  57. return;
  58. },{buttonsFocus:1,persistent: true});
  59. }
  60. </script>
  61. </head>
  62. <body>
  63. <ul class="nav nav-tabs">
  64. <li class="active"><a href="${ctx}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}">商品楼层列表</a></li>
  65. <shiro:hasPermission name="cmpage:cmPageCentre:edit"><li><a href="${ctx}/cmpage/cmPageCentre/form?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}">添加商品楼层</a></li></shiro:hasPermission>
  66. <li><a href="${ctx}/cmpage/cmPage/?flag=2">返回页面列表</a></li>
  67. </ul>
  68. <form:form id="searchForm" modelAttribute="cmPageCentre" action="${ctx}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}" method="post" class="breadcrumb form-search">
  69. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  70. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  71. <div class="ul-form">
  72. <label>ID:</label>
  73. <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
  74. <label>标题:</label>
  75. <form:input path="title" htmlEscape="false" maxlength="50" class="input-medium"/>
  76. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  77. <div class="clearfix"></div>
  78. </div>
  79. </form:form>
  80. <sys:message content="${message}"/>
  81. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  82. <thead>
  83. <tr>
  84. <th>ID</th>
  85. <th>标题</th>
  86. <th>商品数量</th>
  87. <th>排序</th>
  88. <th>移动端状态</th>
  89. <th>PC端状态</th>
  90. <th>创建时间</th>
  91. <shiro:hasPermission name="cmpage:cmPageCentre:edit"><th>操作</th></shiro:hasPermission>
  92. </tr>
  93. </thead>
  94. <tbody>
  95. <c:forEach items="${page.list}" var="cpCentre">
  96. <tr>
  97. <td>
  98. ${cpCentre.id}
  99. </td>
  100. <td>
  101. ${cpCentre.title}
  102. </td>
  103. <td>
  104. ${cpCentre.imageNum}
  105. </td>
  106. <td>
  107. ${cpCentre.sort}
  108. </td>
  109. <td>
  110. <shiro:hasPermission name="cmpage:cmPageCentre:edit">
  111. <c:if test="${cpCentre.crmEnabledStatus eq 1 }">
  112. <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${cpCentre.id}');" >
  113. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  114. </a>
  115. </c:if>
  116. <c:if test="${cpCentre.crmEnabledStatus ne 1 }">
  117. <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${cpCentre.id}');">
  118. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  119. </a>
  120. </c:if>
  121. </shiro:hasPermission>
  122. </td>
  123. <td>
  124. <shiro:hasPermission name="cmpage:cmPageCentre:edit">
  125. <c:if test="${cpCentre.enabledStatus eq 1 }">
  126. <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${cpCentre.id}');" >
  127. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  128. </a>
  129. </c:if>
  130. <c:if test="${cpCentre.enabledStatus ne 1 }">
  131. <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${cpCentre.id}');">
  132. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  133. </a>
  134. </c:if>
  135. </shiro:hasPermission>
  136. </td>
  137. <td>
  138. <fmt:formatDate value="${cpCentre.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  139. </td>
  140. <shiro:hasPermission name="cmpage:cmPageCentre:edit"><td>
  141. <c:if test="${cpCentre.type eq 1}">
  142. <a href="${ctx}/cmpage/cmPageCentre/form?id=${cpCentre.id}&centreId=${cpCentre.id}&type=1">编辑</a>
  143. </c:if>
  144. <a href="${ctx}/cmpage/cmPageCentre/form?id=${cpCentre.id}&centreId=${cpCentre.id}&type=${cmPageCentre.type}">编辑</a>
  145. <shiro:hasPermission name="cmpage:cmPageCentre:delete">
  146. <a href="${ctx}/cmpage/cmPageCentre/delete?id=${cpCentre.id}" onclick="return confirmx('确认要删除该商品楼层吗?', this.href)">删除</a>
  147. </shiro:hasPermission>
  148. </td></shiro:hasPermission>
  149. </tr>
  150. </c:forEach>
  151. </tbody>
  152. </table>
  153. <div class="pagination">${page}</div>
  154. </body>
  155. </html>