123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <%@ 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/newPageZone/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/newPageZone/";
- }, "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/newPageZone/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/newPageZone/";
- }, "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/newPageZone/batchSaveSort?sortList=" + items, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- window.location.href = "${ctx}/newhome/newPageZone";
- } 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 class="active"><a href="${ctx}/newhome/newPageZone/">专区管理列表</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/newPageZone/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>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="newPageZone">
- <tr>
- <input class="check-item" type="hidden" id="preferredProductSort${newPageZone.id}"
- value='${newPageZone.id}-${newPageZone.sort}'/>
- <td>${newPageZone.id}</td>
- <td>${newPageZone.floorTitle}</td>
- <td>${newPageZone.floorDetail}</td>
- <td>
- <c:if test="${newPageZone.wwwEnabledStatus eq 1 }">
- <font color="green">已启用</font>
- <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageZone.id}');">
- 停用
- </a>
- </c:if>
- <c:if test="${newPageZone.wwwEnabledStatus ne 1 }">
- <font color="red">已停用</font>
- <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageZone.id}');">
- 启用
- </a>
- </c:if>
- </td>
- <td>
- <c:if test="${newPageZone.crmEnabledStatus eq 1 }">
- <font color="green">已启用</font>
- <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageZone.id}');">
- 停用
- </a>
- </c:if>
- <c:if test="${newPageZone.crmEnabledStatus ne 1 }">
- <font color="red">已停用</font>
- <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageZone.id}');">
- 启用
- </a>
- </c:if>
- </td>
- <td>
- <input type="text" id="sort" name="sort" style="width:50px;" value="${newPageZone.sort}"
- onkeyup="onlynum(this)" onchange="changeSort(${newPageZone.id},this)">
- </td>
- <td><fmt:formatDate value="${newPageZone.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
- <td>
- <a href="${ctx}/newhome/newPageZone/form?id=${newPageZone.id}">编辑</a>
- <a href="${ctx}/newhome/newPageZone/productList?zoneId=${newPageZone.id}">专区商品</a>
- <a href="${ctx}/newhome/newPageZone/goContentPage?floorId=${newPageZone.id}">专区轮播图</a>
- <a href="${ctx}/newhome/newPageZone/delete?id=${newPageZone.id}"
- onclick="return confirmx('确定删除该专区吗?', this.href)">删除</a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- </body>
- </html>
|