infoAdList.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. #soft{
  11. width: 80px;
  12. }
  13. </style>
  14. <script type="text/javascript">
  15. //失焦修改排序值
  16. function upSoft(infoAd,softs){
  17. var soft=softs.value;
  18. $.post("${ctx}/info/infoAd/update/soft",{'soft':soft,'InfoId':infoAd}, function(data) {
  19. if(true==data.success){
  20. setTimeout(function () {
  21. $("#searchForm").submit();
  22. },200)
  23. } else {
  24. $.jBox.tip(data.msg,'error');
  25. }
  26. },"JSON");//这里返回的类型有:json,html,xml,text
  27. }
  28. $(document).ready(function() {
  29. });
  30. function page(n,s){
  31. $("#pageNo").val(n);
  32. $("#pageSize").val(s);
  33. $("#searchForm").submit();
  34. return false;
  35. }
  36. //状态修改
  37. function updateEnabledStatus(status,ids){
  38. var msg='确定启用?';
  39. if('0'==status){
  40. msg='确定停用?';
  41. }
  42. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  43. if(v=='ok'){
  44. $.post("${ctx}/info/infoAd/updateEnabledStatus",{'status':status,'ids':ids}, function(data) {
  45. if(true==data.success){
  46. $.jBox.tip(data.msg, 'info');
  47. } else {
  48. $.jBox.tip(data.msg,'error');
  49. }
  50. $("#searchForm").submit();
  51. },"JSON");//这里返回的类型有:json,html,xml,text
  52. }
  53. return;
  54. },{buttonsFocus:1,persistent: true});
  55. }
  56. </script>
  57. </head>
  58. <body>
  59. <ul class="nav nav-tabs">
  60. <li class="active"><a href="${ctx}/info/infoAd/">文章广告列表(PC)</a></li>
  61. <shiro:hasPermission name="info:infoAd:edit"><li><a href="${ctx}/info/infoAd/form">文章广告添加(PC)</a></li></shiro:hasPermission>
  62. <label style="display: inline-block;height:35px;line-height:35px" >(采美大讲坛右侧广告)</label>
  63. </ul>
  64. <form:form id="searchForm" modelAttribute="infoAd" action="${ctx}/info/infoAd/" method="post" class="breadcrumb form-search">
  65. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  66. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  67. <div class="ul-form">
  68. <label>ID:</label>
  69. <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
  70. <label>业务方:</label>
  71. <form:input path="serviceObject" htmlEscape="false" maxlength="100" class="input-medium"/>
  72. <label>链接:</label>
  73. <form:input path="link" htmlEscape="false" class="input-medium"/>
  74. <label>广告位置:</label>
  75. <form:select path="location" class="input-medium">
  76. <form:option value="" label=" "/>
  77. <form:options items="${fns:getDictList('location_ad')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  78. </form:select>
  79. <label>状态:</label>
  80. <form:select path="enabledStatus" class="input-medium">
  81. <form:option value="" label=" "/>
  82. <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
  83. </form:select>
  84. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  85. <div class="clearfix"></div>
  86. </div>
  87. </form:form>
  88. <sys:message content="${message}"/>
  89. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  90. <thead>
  91. <tr>
  92. <th>ID</th>
  93. <th>业务方</th>
  94. <th>广告位置</th>
  95. <th>引导图</th>
  96. <th>链接</th>
  97. <th>排序</th>
  98. <th>点击量</th>
  99. <th>添加时间</th>
  100. <th>状态</th>
  101. <shiro:hasPermission name="info:infoAd:edit"><th>操作</th></shiro:hasPermission>
  102. </tr>
  103. </thead>
  104. <tbody>
  105. <c:forEach items="${page.list}" var="infoAd">
  106. <tr>
  107. <td>
  108. ${infoAd.id}
  109. </td>
  110. <td>
  111. ${infoAd.serviceObject}
  112. </td>
  113. <td>
  114. ${fns:getDictLabel(infoAd.location, 'location_ad', '')}
  115. </td>
  116. <td><img src="${infoAd.guidanceImage}" width="100px;" height="100px;"></td>
  117. <td>
  118. ${infoAd.link}
  119. </td>
  120. <td>
  121. <input id="soft" type="number" value="${infoAd.soft}" maxlength="11" onblur="upSoft(${infoAd.id},this)">
  122. <%-- <input value="${infoAd.soft}"> --%>
  123. </td>
  124. <td>
  125. ${empty infoAd.clickRate?0:(infoAd.clickRate)}
  126. </td>
  127. <td><fmt:formatDate value="${infoAd.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
  128. <td>
  129. <c:if test="${infoAd.enabledStatus eq 1 }">
  130. <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${infoAd.id}');" >
  131. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  132. </a>
  133. </c:if>
  134. <c:if test="${infoAd.enabledStatus ne 1 }">
  135. <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${infoAd.id}');">
  136. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  137. </a>
  138. </c:if>
  139. </td>
  140. <shiro:hasPermission name="info:infoAd:edit"><td>
  141. <a href="${ctx}/info/infoAd/form?id=${infoAd.id}">编辑</a>
  142. <shiro:hasPermission name="info:infoAd:delete">
  143. <a href="${ctx}/info/infoAd/delete?id=${infoAd.id}" onclick="return confirmx('确认要删除该文章广告吗?', this.href)">删除</a>
  144. </shiro:hasPermission>
  145. </td></shiro:hasPermission>
  146. </tr>
  147. </c:forEach>
  148. </tbody>
  149. </table>
  150. <div class="pagination">${page}</div>
  151. </body>
  152. </html>