|
@@ -1,156 +1,214 @@
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
|
|
<html>
|
|
<html>
|
|
<head>
|
|
<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() {
|
|
|
|
|
|
+ <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 () {
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var changeSortNumber = [];
|
|
|
|
+ function changeSort(id) {
|
|
|
|
+ changeSortNumber.push(id);
|
|
|
|
+ console.log("changeSortNumber------------>" + changeSortNumber);
|
|
|
|
+ }
|
|
|
|
|
|
- });
|
|
|
|
- function page(n,s){
|
|
|
|
- $("#pageNo").val(n);
|
|
|
|
- $("#pageSize").val(s);
|
|
|
|
- $("#searchForm").submit();
|
|
|
|
- return false;
|
|
|
|
|
|
+ var changeSorts = "";
|
|
|
|
+ //批量保存排序
|
|
|
|
+ function updateSortIndex() {
|
|
|
|
+ for (let i = 0; i < changeSortNumber.length; i++) {
|
|
|
|
+ var id = changeSortNumber[i];
|
|
|
|
+ var sortNum = $("#sortNum" + id).val();
|
|
|
|
+ changeSorts += id + '_' + sortNum + ',';
|
|
|
|
+ }
|
|
|
|
+ $.post("${ctx}/newhome/newPageHomeimage/updateSort", {'sortNums': changeSorts}, function (result) {
|
|
|
|
+ $.jBox.tip(result.data, 'info');
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ $("#searchForm").submit();
|
|
|
|
+ }, 500);
|
|
|
|
+ })
|
|
|
|
+ changeSortNumber = null;
|
|
|
|
+ changeSorts = null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function page(n, s) {
|
|
|
|
+ $("#pageNo").val(n);
|
|
|
|
+ $("#pageSize").val(s);
|
|
|
|
+ $("#searchForm").submit();
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
|
|
+
|
|
//PC端状态修改
|
|
//PC端状态修改
|
|
- function updateEnabledStatus(status,ids){
|
|
|
|
- var msg='确定开启?';
|
|
|
|
- if('0'==status){
|
|
|
|
- msg='确定停用?';
|
|
|
|
|
|
+ function updateEnabledStatus(status, ids) {
|
|
|
|
+ var msg = '确定开启?';
|
|
|
|
+ if ('0' == status) {
|
|
|
|
+ msg = '确定停用?';
|
|
}
|
|
}
|
|
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
|
- if(v=='ok'){
|
|
|
|
- $.post("${ctx}/newhome/newPageHomeimage/updateEnabledStatus",{'enabledStatus':status,'ids':ids}, function(data) {
|
|
|
|
- if(true==data.success){
|
|
|
|
|
|
+ top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
|
|
|
|
+ if (v == 'ok') {
|
|
|
|
+ $.post("${ctx}/newhome/newPageHomeimage/updateEnabledStatus", {
|
|
|
|
+ 'enabledStatus': status,
|
|
|
|
+ 'ids': ids
|
|
|
|
+ }, function (data) {
|
|
|
|
+ if (true == data.success) {
|
|
$.jBox.tip(data.msg, 'info');
|
|
$.jBox.tip(data.msg, 'info');
|
|
} else {
|
|
} else {
|
|
- $.jBox.tip(data.msg,'error');
|
|
|
|
|
|
+ $.jBox.tip(data.msg, 'error');
|
|
}
|
|
}
|
|
$("#searchForm").submit();
|
|
$("#searchForm").submit();
|
|
- },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
|
|
|
+ }, "JSON");//这里返回的类型有:json,html,xml,text
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
- },{buttonsFocus:1,persistent: true});
|
|
|
|
|
|
+ }, {buttonsFocus: 1, persistent: true});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function onlynum(obj) {
|
|
|
|
+ obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
|
|
|
|
+ }
|
|
|
|
|
|
//CRM端状态修改
|
|
//CRM端状态修改
|
|
- function updateCrmEnabledStatusByIds(status,ids){
|
|
|
|
- var msg='确定开启?';
|
|
|
|
- if('0'==status){
|
|
|
|
- msg='确定停用?';
|
|
|
|
|
|
+ function updateCrmEnabledStatusByIds(status, ids) {
|
|
|
|
+ var msg = '确定开启?';
|
|
|
|
+ if ('0' == status) {
|
|
|
|
+ msg = '确定停用?';
|
|
}
|
|
}
|
|
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
|
- if(v=='ok'){
|
|
|
|
- $.post("${ctx}/newhome/newPageHomeimage/updateCrmEnabledStatusByIds",{'crmEnabledStatus':status,'ids':ids}, function(data) {
|
|
|
|
- if(true==data.success){
|
|
|
|
|
|
+ top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
|
|
|
|
+ if (v == 'ok') {
|
|
|
|
+ $.post("${ctx}/newhome/newPageHomeimage/updateCrmEnabledStatusByIds", {
|
|
|
|
+ 'crmEnabledStatus': status,
|
|
|
|
+ 'ids': ids
|
|
|
|
+ }, function (data) {
|
|
|
|
+ if (true == data.success) {
|
|
$.jBox.tip(data.msg, 'info');
|
|
$.jBox.tip(data.msg, 'info');
|
|
} else {
|
|
} else {
|
|
- $.jBox.tip(data.msg,'error');
|
|
|
|
|
|
+ $.jBox.tip(data.msg, 'error');
|
|
}
|
|
}
|
|
$("#searchForm").submit();
|
|
$("#searchForm").submit();
|
|
- },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
|
|
|
+ }, "JSON");//这里返回的类型有:json,html,xml,text
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
- },{buttonsFocus:1,persistent: true});
|
|
|
|
|
|
+ }, {buttonsFocus: 1, persistent: true});
|
|
}
|
|
}
|
|
- </script>
|
|
|
|
|
|
+ </script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
- <ul class="nav nav-tabs">
|
|
|
|
- <li class="active"><a href="${ctx}/newhome/newPageHomeimage/">新首页轮播图列表</a></li>
|
|
|
|
- <shiro:hasPermission name="newhome:newPageHomeimage:edit"><li><a href="${ctx}/newhome/newPageHomeimage/form">新首页轮播图添加</a></li></shiro:hasPermission>
|
|
|
|
- </ul>
|
|
|
|
- <form:form id="searchForm" modelAttribute="newPageHomeimage" action="${ctx}/newhome/newPageHomeimage/" 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="title" htmlEscape="false" maxlength="40" class="input-small"/>
|
|
|
|
|
|
+<ul class="nav nav-tabs">
|
|
|
|
+ <li class="active"><a href="${ctx}/newhome/newPageHomeimage/">新首页轮播图列表</a></li>
|
|
|
|
+ <shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
+ <li><a href="${ctx}/newhome/newPageHomeimage/form">新首页轮播图添加</a></li>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+</ul>
|
|
|
|
+<form:form id="searchForm" modelAttribute="newPageHomeimage" action="${ctx}/newhome/newPageHomeimage/" 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="title" htmlEscape="false" maxlength="40" class="input-small"/>
|
|
|
|
+
|
|
|
|
+ <label>小程序端状态:</label>
|
|
|
|
+ <form:select path="crmEnabledStatus" class="input-small">
|
|
|
|
+ <form:option value="" label=" "/>
|
|
|
|
+ <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
|
|
|
|
+ htmlEscape="false"/>
|
|
|
|
+ </form:select>
|
|
|
|
+ <label>PC端状态:</label>
|
|
|
|
+ <form:select path="wwwEnabledStatus" class="input-small">
|
|
|
|
+ <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="查询"/>
|
|
|
|
+ <c:if test="${cmImage.flag eq 4}">
|
|
|
|
+ <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html"
|
|
|
|
+ target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
|
|
|
|
+ </c:if>
|
|
|
|
+ <input class="btn btn-primary" type="button" value="一键排序" onclick="updateSortIndex()"
|
|
|
|
+ style="margin-left: 15px"/>
|
|
|
|
+ <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>PC端状态</th>
|
|
|
|
+ <th>创建时间</th>
|
|
|
|
+ <shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
+ <th>操作</th>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ <c:forEach items="${page.list}" var="newPageHomeimage">
|
|
|
|
+ <tr>
|
|
|
|
+ <td>${newPageHomeimage.id}</td>
|
|
|
|
+ <td>${newPageHomeimage.title}</td>
|
|
|
|
+ <td><img style="width:120px;height: 80px;" src="${newPageHomeimage.image}"/></td>
|
|
|
|
+ <td><a href="${newPageHomeimage.link}" target="_blank">${newPageHomeimage.link}</a></td>
|
|
|
|
|
|
- <label>小程序端状态:</label>
|
|
|
|
- <form:select path="crmEnabledStatus" class="input-small">
|
|
|
|
- <form:option value="" label=" "/>
|
|
|
|
- <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
|
- </form:select>
|
|
|
|
- <label>PC端状态:</label>
|
|
|
|
- <form:select path="wwwEnabledStatus" class="input-small">
|
|
|
|
- <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="查询"/>
|
|
|
|
- <c:if test="${cmImage.flag eq 4}">
|
|
|
|
- <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html" target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
|
|
|
|
- </c:if>
|
|
|
|
- <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>PC端状态</th>
|
|
|
|
- <th>创建时间</th>
|
|
|
|
- <shiro:hasPermission name="newhome:newPageHomeimage:edit"><th>操作</th></shiro:hasPermission>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- <c:forEach items="${page.list}" var="newPageHomeimage">
|
|
|
|
- <tr>
|
|
|
|
- <td>${newPageHomeimage.id}</td>
|
|
|
|
- <td>${newPageHomeimage.title}</td>
|
|
|
|
- <td><img style="width:120px;height: 80px;" src="${newPageHomeimage.image}"/></td>
|
|
|
|
- <td><a href="${newPageHomeimage.link}" target="_blank">${newPageHomeimage.link}</a></td>
|
|
|
|
- <td>${newPageHomeimage.sort}</td>
|
|
|
|
- <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
- <c:if test="${newPageHomeimage.crmEnabledStatus eq 1 }">
|
|
|
|
- <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageHomeimage.id}');" >
|
|
|
|
- <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
|
|
|
|
- </a>
|
|
|
|
- </c:if>
|
|
|
|
- <c:if test="${newPageHomeimage.crmEnabledStatus ne 1 }">
|
|
|
|
- <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageHomeimage.id}');">
|
|
|
|
- <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
|
|
|
|
- </a>
|
|
|
|
- </c:if>
|
|
|
|
- </shiro:hasPermission></td>
|
|
|
|
- <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
- <c:if test="${newPageHomeimage.wwwEnabledStatus eq 1 }">
|
|
|
|
- <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageHomeimage.id}');" >
|
|
|
|
- <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
|
|
|
|
- </a>
|
|
|
|
- </c:if>
|
|
|
|
- <c:if test="${newPageHomeimage.wwwEnabledStatus ne 1 }">
|
|
|
|
- <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageHomeimage.id}');">
|
|
|
|
- <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
|
|
|
|
- </a>
|
|
|
|
- </c:if>
|
|
|
|
- </shiro:hasPermission></td>
|
|
|
|
- <td><fmt:formatDate value="${newPageHomeimage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
|
- <shiro:hasPermission name="newhome:newPageHomeimage:edit"><td>
|
|
|
|
- <a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}">编辑</a>
|
|
|
|
- <shiro:hasPermission name="newhome:newPageHomeimage:delete">
|
|
|
|
- <a href="${ctx}/newhome/newPageHomeimage/delete?id=${newPageHomeimage.id}" onclick="return confirmx('确认要删除该新首页轮播图吗?', this.href)">删除</a>
|
|
|
|
- </shiro:hasPermission>
|
|
|
|
- </td></shiro:hasPermission>
|
|
|
|
- </tr>
|
|
|
|
- </c:forEach>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- <div class="pagination">${page}</div>
|
|
|
|
|
|
+ <td>
|
|
|
|
+ <input id="sortNum${newPageHomeimage.id}" type="text" name="sort" style="width:50px;"
|
|
|
|
+ value="${newPageHomeimage.sort}" onkeyup="onlynum(this)"
|
|
|
|
+ onchange="changeSort(${newPageHomeimage.id})"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
+ <c:if test="${newPageHomeimage.crmEnabledStatus eq 1 }">
|
|
|
|
+ <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageHomeimage.id}');">
|
|
|
|
+ <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
|
|
|
|
+ </a>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:if test="${newPageHomeimage.crmEnabledStatus ne 1 }">
|
|
|
|
+ <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageHomeimage.id}');">
|
|
|
|
+ <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
|
|
|
|
+ </a>
|
|
|
|
+ </c:if>
|
|
|
|
+ </shiro:hasPermission></td>
|
|
|
|
+ <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
+ <c:if test="${newPageHomeimage.wwwEnabledStatus eq 1 }">
|
|
|
|
+ <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageHomeimage.id}');">
|
|
|
|
+ <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
|
|
|
|
+ </a>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:if test="${newPageHomeimage.wwwEnabledStatus ne 1 }">
|
|
|
|
+ <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageHomeimage.id}');">
|
|
|
|
+ <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
|
|
|
|
+ </a>
|
|
|
|
+ </c:if>
|
|
|
|
+ </shiro:hasPermission></td>
|
|
|
|
+ <td><fmt:formatDate value="${newPageHomeimage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
|
+ <shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
|
+ <td>
|
|
|
|
+ <a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}">编辑</a>
|
|
|
|
+ <shiro:hasPermission name="newhome:newPageHomeimage:delete">
|
|
|
|
+ <a href="${ctx}/newhome/newPageHomeimage/delete?id=${newPageHomeimage.id}"
|
|
|
|
+ onclick="return confirmx('确认要删除该新首页轮播图吗?', this.href)">删除</a>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ </td>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+</table>
|
|
|
|
+<div class="pagination">${page}</div>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|