123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <%@ 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}/cmpage/cmPageCentre/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}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}";
- }, "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}/cmpage/cmPageCentre/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}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}";
- }, "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}/cmpage/cmPageCentre/batchSaveSort?sortList=" + items, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- window.location.href = "${ctx}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}";
- } 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}/cmpage/cmPage/?flag=2">网页列表</a></li>
- <li class="active"><a href="${ctx}/cmpage/cmPageCentre/?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}">活动专题商品楼层</a>
- </li>
- </ul>
- <div>
- <label style="font-weight: bold;margin:10px 15px">网页标题:${pageTitle}</label>
- </div>
- <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}/cmpage/cmPageCentre/form?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}'"
- 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>
- <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.title}</td>
- <td>${newPageFloor.description}</td>
- <td>
- <c:if test="${newPageFloor.enabledStatus eq 1 }">
- <font color="green">已启用</font>
- <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageFloor.id}');">
- 停用
- </a>
- </c:if>
- <c:if test="${newPageFloor.enabledStatus ne 1 }">
- <font color="red">已停用</font>
- <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageFloor.id}');">
- 启用
- </a>
- </c:if>
- </td>
- <td>
- <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>
- </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>
- <td>
- <a href="${ctx}/cmpage/cmPageCentre/form?pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}&id=${newPageFloor.id}">编辑</a>
- <a href="${ctx}/cmpage/cmPageCentre/goContentPage?centreId=${newPageFloor.id}&pageId=${cmPageCentre.pageId}&type=${cmPageCentre.type}">内容</a>
- <a href="${ctx}/cmpage/cmPageCentre/delete?id=${newPageFloor.id}&type=${cmPageCentre.type}"
- onclick="return confirmx('是否删除该数据,删除后,对应的楼层数据也将被全部删除,确认是否删除', this.href)">删除</a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- </body>
- </html>
|