|
@@ -0,0 +1,175 @@
|
|
|
+<%@ 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;
|
|
|
+ }
|
|
|
+ //PC端状态修改
|
|
|
+ function updateEnabledStatus(status,ids){
|
|
|
+ var msg='确定启用该楼层吗?';
|
|
|
+ if('0'==status){
|
|
|
+ msg='确定停用该楼层吗?';
|
|
|
+ }
|
|
|
+ top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
+ if(v=='ok'){
|
|
|
+ $.post("${ctx}/newhome/newPageFloor/updateEnabledStatus",{'enabledStatus':status,'ids':ids}, function(data) {
|
|
|
+ if(true==data.success){
|
|
|
+ $.jBox.tip(data.msg, 'info');
|
|
|
+ } else {
|
|
|
+ $.jBox.tip(data.msg,'error');
|
|
|
+ }
|
|
|
+ window.location = "${ctx}/newhome/newPageFloor/";
|
|
|
+ },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ },{buttonsFocus:1,persistent: true});
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //CRM端状态修改
|
|
|
+ function updateCrmEnabledStatusByIds(status,ids){
|
|
|
+ var msg='确定启用该楼层吗?';
|
|
|
+ if('0'==status){
|
|
|
+ msg='确定停用该楼层吗?';
|
|
|
+ }
|
|
|
+ top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
|
|
|
+ if(v=='ok'){
|
|
|
+ $.post("${ctx}/newhome/newPageFloor/updateCrmEnabledStatusByIds",{'crmEnabledStatus':status,'ids':ids}, function(data) {
|
|
|
+ if(true==data.success){
|
|
|
+ $.jBox.tip(data.msg, 'info');
|
|
|
+ } else {
|
|
|
+ $.jBox.tip(data.msg,'error');
|
|
|
+ }
|
|
|
+ window.location = "${ctx}/newhome/newPageFloor/";
|
|
|
+ },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ },{buttonsFocus:1,persistent: true});
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param obj
|
|
|
+ * jquery控制input只能输入数字
|
|
|
+ */
|
|
|
+ function onlynum(obj) {
|
|
|
+ obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
|
|
|
+ }
|
|
|
+
|
|
|
+ //批量保存排序
|
|
|
+ function batchSaveSort() {
|
|
|
+ var items = new Array();
|
|
|
+ var $items = $('.check-item');
|
|
|
+ $items.each(function(){
|
|
|
+ items.push($(this).val());
|
|
|
+ });
|
|
|
+ //保存批量排序
|
|
|
+ $.post("${ctx}/newhome/newPageFloor/batchSaveSort?sortList="+items, function(data) {
|
|
|
+ if(true==data.success){
|
|
|
+ $.jBox.tip(data.msg, 'info');
|
|
|
+ window.location.href = "${ctx}/newhome/newPageFloor";
|
|
|
+ } else {
|
|
|
+ $.jBox.tip(data.msg,'error');
|
|
|
+ }
|
|
|
+ },"JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+ }
|
|
|
+
|
|
|
+ //修改排序值
|
|
|
+ function changeSort(id,sortThis) {
|
|
|
+ var value = sortThis.value;
|
|
|
+ $("#preferredProductSort"+id).val(id+"-"+value);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <ul class="nav nav-tabs">
|
|
|
+ <li><a href="${ctx}/newhome/newPageFloor/">自由楼层管理列表</a></li>
|
|
|
+ <li class="active"><a href="${ctx}/newhome/newPageFloor/lists">固定楼层管理列表</a></li>
|
|
|
+ </ul>
|
|
|
+ <form:form action="" class="breadcrumb form-search">
|
|
|
+ <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort()" value="一键排序"/>
|
|
|
+ <input class="btn btn-primary" style="width: 70px" onclick="window.location='${ctx}/newhome/newPageFloor/form'" value="添加楼层"/>
|
|
|
+ <div style="margin-top: 10px">
|
|
|
+ <label><font color="#a9a9a9">注:排序值越小越靠前</font></label>
|
|
|
+ </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>
|
|
|
+ <shiro:hasPermission name="newhome:newPageFloor:edit"><th>操作</th></shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:forEach items="${page.list}" var="newPageFloor">
|
|
|
+ <tr>
|
|
|
+ <input class="check-item" type="hidden" id="preferredProductSort${newPageFloor.id}" value='${newPageFloor.id}-${newPageFloor.sort}'/>
|
|
|
+ <td>${newPageFloor.id}</td>
|
|
|
+ <td>${newPageFloor.floorTitle}</td>
|
|
|
+ <td>${newPageFloor.floorDetail}</td>
|
|
|
+ <td><c:if test="${newPageFloor.floorType eq 1}">新品橱窗</c:if></td>
|
|
|
+ <td><shiro:hasPermission name="newhome:newPageFloor:edit">
|
|
|
+ <c:if test="${newPageFloor.wwwEnabledStatus eq 1 }">
|
|
|
+ <font color="green">已启用</font>
|
|
|
+ <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageFloor.id}');" >
|
|
|
+ 停用
|
|
|
+ </a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageFloor.wwwEnabledStatus ne 1 }">
|
|
|
+ <font color="red">已停用</font>
|
|
|
+ <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageFloor.id}');">
|
|
|
+ 启用
|
|
|
+ </a>
|
|
|
+ </c:if>
|
|
|
+ </shiro:hasPermission></td>
|
|
|
+ <td><shiro:hasPermission name="newhome:newPageFloor:edit">
|
|
|
+ <c:if test="${newPageFloor.crmEnabledStatus eq 1 }">
|
|
|
+ <font color="green">已启用</font>
|
|
|
+ <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageFloor.id}');" >
|
|
|
+ 停用
|
|
|
+ </a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageFloor.crmEnabledStatus ne 1 }">
|
|
|
+ <font color="red">已停用</font>
|
|
|
+ <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageFloor.id}');">
|
|
|
+ 启用
|
|
|
+ </a>
|
|
|
+ </c:if>
|
|
|
+ </shiro:hasPermission></td>
|
|
|
+ <td><input id="sort" name="sort" style="width:50px;" value="${newPageFloor.sort}" onkeyup="onlynum(this)" onchange="changeSort(${newPageFloor.id},this)"></td>
|
|
|
+ <td><fmt:formatDate value="${newPageFloor.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
+ <shiro:hasPermission name="newhome:newPageFloor:edit"><td>
|
|
|
+ <a href="${ctx}/newhome/newPageFloor/form?id=${newPageFloor.id}">编辑</a>
|
|
|
+ <a href="${ctx}/newhome/newPageFloor/goContentPage?floorId=${newPageFloor.id}">内容</a>
|
|
|
+ <shiro:hasPermission name="newhome:newPageFloor:delete">
|
|
|
+ <a href="${ctx}/newhome/newPageFloor/delete?id=${newPageFloor.id}" onclick="return confirmx('确定删除该楼层吗?', this.href)">删除</a>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ </td></shiro:hasPermission>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="pagination">${page}</div>
|
|
|
+</body>
|
|
|
+</html>
|