123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <%@ 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;}
- #soft{
- width: 80px;
- }
- </style>
- <script type="text/javascript">
- //失焦修改排序值
- function upSoft(infoAd,softs){
- var soft=softs.value;
- $.post("${ctx}/info/infoAd/update/soft",{'soft':soft,'InfoId':infoAd}, function(data) {
- if(true==data.success){
- setTimeout(function () {
- $("#searchForm").submit();
- },200)
- } else {
- $.jBox.tip(data.msg,'error');
- }
- },"JSON");//这里返回的类型有:json,html,xml,text
- }
- $(document).ready(function() {
-
- });
- function page(n,s){
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- //状态修改
- function updateEnabledStatus(status,ids){
- var msg='确定启用?';
- if('0'==status){
- msg='确定停用?';
- }
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
- if(v=='ok'){
- $.post("${ctx}/info/infoAd/updateEnabledStatus",{'status':status,'ids':ids}, 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>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/info/infoAd/">文章广告列表(PC)</a></li>
- <shiro:hasPermission name="info:infoAd:edit"><li><a href="${ctx}/info/infoAd/form">文章广告添加(PC)</a></li></shiro:hasPermission>
- <label style="display: inline-block;height:35px;line-height:35px" >(采美大讲坛右侧广告)</label>
- </ul>
- <form:form id="searchForm" modelAttribute="infoAd" action="${ctx}/info/infoAd/" 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>ID:</label>
- <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
- <label>业务方:</label>
- <form:input path="serviceObject" htmlEscape="false" maxlength="100" class="input-medium"/>
- <label>链接:</label>
- <form:input path="link" htmlEscape="false" class="input-medium"/>
- <label>广告位置:</label>
- <form:select path="location" class="input-medium">
- <form:option value="" label=" "/>
- <form:options items="${fns:getDictList('location_ad')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
- </form:select>
- <label>状态:</label>
- <form:select path="enabledStatus" class="input-medium">
- <form:option value="" label=" "/>
- <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
- </form:select>
- <input id="btnSubmit" class="btn btn-primary" type="submit" 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>ID</th>
- <th>业务方</th>
- <th>广告位置</th>
- <th>引导图</th>
- <th>链接</th>
- <th>排序</th>
- <th>点击量</th>
- <th>添加时间</th>
- <th>状态</th>
- <shiro:hasPermission name="info:infoAd:edit"><th>操作</th></shiro:hasPermission>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="infoAd">
- <tr>
- <td>
- ${infoAd.id}
- </td>
- <td>
- ${infoAd.serviceObject}
- </td>
- <td>
- ${fns:getDictLabel(infoAd.location, 'location_ad', '')}
- </td>
- <td><img src="${infoAd.guidanceImage}" width="100px;" height="100px;"></td>
- <td>
- ${infoAd.link}
- </td>
- <td>
- <input id="soft" type="number" value="${infoAd.soft}" maxlength="11" onblur="upSoft(${infoAd.id},this)">
- <%-- <input value="${infoAd.soft}"> --%>
- </td>
- <td>
- ${empty infoAd.clickRate?0:(infoAd.clickRate)}
- </td>
- <td><fmt:formatDate value="${infoAd.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
- <td>
- <c:if test="${infoAd.enabledStatus eq 1 }">
- <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${infoAd.id}');" >
- <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
- </a>
- </c:if>
- <c:if test="${infoAd.enabledStatus ne 1 }">
- <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${infoAd.id}');">
- <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
- </a>
- </c:if>
- </td>
- <shiro:hasPermission name="info:infoAd:edit"><td>
- <a href="${ctx}/info/infoAd/form?id=${infoAd.id}">编辑</a>
- <shiro:hasPermission name="info:infoAd:delete">
- <a href="${ctx}/info/infoAd/delete?id=${infoAd.id}" onclick="return confirmx('确认要删除该文章广告吗?', this.href)">删除</a>
- </shiro:hasPermission>
- </td></shiro:hasPermission>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- </body>
- </html>
|