|
@@ -12,6 +12,19 @@
|
|
|
.table td {
|
|
|
text-align: center;
|
|
|
}
|
|
|
+ .setHomeImageStatus {
|
|
|
+ width: 400px;
|
|
|
+ height: 210px;
|
|
|
+ border: 1px #000000 solid;
|
|
|
+ background: white;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ margin: auto;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
$(document).ready(function () {
|
|
@@ -50,16 +63,39 @@
|
|
|
}
|
|
|
|
|
|
//PC端状态修改
|
|
|
- function updateEnabledStatus(status, ids) {
|
|
|
+ function updateEnabledStatus(status, id) {
|
|
|
var msg = '确定开启?';
|
|
|
if ('0' == status) {
|
|
|
- msg = '确定停用?';
|
|
|
+ msg = '确定下架吗?下架后商城不再显示该商品';
|
|
|
+ }else if ('3' == status) {
|
|
|
+ $(".setHomeImageStatus").show()
|
|
|
+ $('#homeImgaeId').val(id)
|
|
|
+ return false
|
|
|
+ }else {
|
|
|
+ let isHomeimageStatus=true;
|
|
|
+ $.ajax({
|
|
|
+ async: false,
|
|
|
+ type : "post",
|
|
|
+ url : "${ctx}/newhome/newPageHomeimage/isHomeimageStatus",
|
|
|
+ data:{'id':id,'publishSource':$("#publishSource").val(),'bookStartDate':$("#bookStartDate").val(),'bookEndDate':$("#bookEndDate").val()},
|
|
|
+ datatype : 'json',
|
|
|
+ success : function (result) {
|
|
|
+ isHomeimageStatus=result.isHomeimageStatus
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(isHomeimageStatus)
|
|
|
+ if (!isHomeimageStatus){
|
|
|
+ $.jBox.tip('该时段广告已满,无法进行设置', 'info');
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
|
|
|
if (v == 'ok') {
|
|
|
$.post("${ctx}/newhome/newPageHomeimage/updateEnabledStatus", {
|
|
|
'enabledStatus': status,
|
|
|
- 'ids': ids
|
|
|
+ 'id': id,
|
|
|
+ 'bookStatus': $("input[name='bookStatus']:checked").val(),
|
|
|
+ 'bookStartDate':$("#bookStartDate").val(),'bookEndDate':$("#bookEndDate").val()
|
|
|
}, function (data) {
|
|
|
if (true == data.success) {
|
|
|
$.jBox.tip(data.msg, 'info');
|
|
@@ -68,6 +104,7 @@
|
|
|
}
|
|
|
$("#searchForm").submit();
|
|
|
}, "JSON");//这里返回的类型有:json,html,xml,text
|
|
|
+
|
|
|
}
|
|
|
return;
|
|
|
}, {buttonsFocus: 1, persistent: true});
|
|
@@ -77,65 +114,46 @@
|
|
|
obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
|
|
|
}
|
|
|
|
|
|
- //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/newPageHomeimage/updateCrmEnabledStatusByIds", {
|
|
|
- 'crmEnabledStatus': 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}/newhome/newPageHomeimage/">新首页轮播图列表</a></li>
|
|
|
- <shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
- <li><a href="${ctx}/newhome/newPageHomeimage/form">新首页轮播图添加</a></li>
|
|
|
- </shiro:hasPermission>
|
|
|
+ <li class="${publishSource==1?'active':''}"><a href="${ctx}/newhome/newPageHomeimage/?publishSource=1">新首页轮播(平台)</a></li>
|
|
|
+ <li class="${publishSource==2?'active':''}"><a href="${ctx}/newhome/newPageHomeimage/?publishSource=2">新首页轮播(供应商)</a></li>
|
|
|
</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">
|
|
|
+ <form:hidden path="publishSource" value="${publishSource}"/>
|
|
|
<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>
|
|
|
+ <label>状态:</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:option value="" label="全部"/>
|
|
|
+ <form:option value="2" label="待上架"/>
|
|
|
+ <form:option value="1" label="已上架"/>
|
|
|
+ <form:option value="0" label="已下架"/>
|
|
|
</form:select>
|
|
|
+ <c:if test="${publishSource eq 2 }">
|
|
|
+ <label>审核状态:</label>
|
|
|
+ <form:select path="auditStatus" class="input-small">
|
|
|
+ <form:option value="" label="全部"/>
|
|
|
+ <form:option value="1" label="待审核"/>
|
|
|
+ <form:option value="2" label="审核通过"/>
|
|
|
+ <form:option value="3" label="审核失败"/>
|
|
|
+ </form:select>
|
|
|
+ </c:if>
|
|
|
+
|
|
|
<label>点击时间:</label>
|
|
|
<form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageHomeimage.startPvCreateTime,'yyyy-MM-dd')}"
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
-
|
|
|
- <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageHomeimage.endPvCreateTime,'yyyy-MM-dd')}"
|
|
|
+ <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
|
|
|
+ value="${fns:setDate(newPageHomeimage.endPvCreateTime,'yyyy-MM-dd')}"
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
|
|
|
<c:if test="${cmImage.flag eq 4}">
|
|
@@ -144,6 +162,11 @@
|
|
|
</c:if>
|
|
|
<input class="btn btn-primary" type="button" value="一键排序" onclick="updateSortIndex()"
|
|
|
style="margin-left: 15px"/>
|
|
|
+ <c:if test="${publishSource eq 1 }">
|
|
|
+ <input class="btn btn-primary" type="button" value="添加"
|
|
|
+ onclick="location.href='${ctx}/newhome/newPageHomeimage/form?publishSource=${publishSource}'"
|
|
|
+ style="margin-left: 15px"/>
|
|
|
+ </c:if>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
</form:form>
|
|
@@ -157,9 +180,17 @@
|
|
|
<th>链接</th>
|
|
|
<th>排序</th>
|
|
|
<th>点击量</th>
|
|
|
- <th>小程序端状态</th>
|
|
|
- <th>PC端状态</th>
|
|
|
+ <th>状态</th>
|
|
|
+ <c:if test="${publishSource eq 2 }">
|
|
|
+ <th>审核状态</th>
|
|
|
+ </c:if>
|
|
|
+ <th>上架时间</th>
|
|
|
+ <th>下架时间</th>
|
|
|
<th>创建时间</th>
|
|
|
+ <c:if test="${publishSource eq 2 }">
|
|
|
+ <th>供应商</th>
|
|
|
+ </c:if>
|
|
|
+ <th>创建人</th>
|
|
|
<shiro:hasPermission name="newhome:newPageHomeimage:edit">
|
|
|
<th>操作</th>
|
|
|
</shiro:hasPermission>
|
|
@@ -179,44 +210,75 @@
|
|
|
onchange="changeSort(${newPageHomeimage.id})"/>
|
|
|
</td>
|
|
|
<td>${newPageHomeimage.count}</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>
|
|
|
+ <td>
|
|
|
+ <c:if test="${newPageHomeimage.wwwEnabledStatus eq 1 }">
|
|
|
+ <span style="color: #5bb75b">已上架</span>
|
|
|
</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 test="${newPageHomeimage.wwwEnabledStatus eq 0 }">
|
|
|
+ <span style="color: red">已下架</span>
|
|
|
</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 test="${newPageHomeimage.wwwEnabledStatus eq 2 }">
|
|
|
+ 待上架
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
+ <c:if test="${newPageHomeimage.publishSource eq 2 }">
|
|
|
+ <td>
|
|
|
+ <c:if test="${newPageHomeimage.auditStatus eq 2}">
|
|
|
+ <span style="color: #5bb75b">审核通过</span>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageHomeimage.auditStatus eq 3 }">
|
|
|
+ <span style="color: red">审核失败</span>
|
|
|
</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 test="${newPageHomeimage.auditStatus eq 1 }">
|
|
|
+ 待审核
|
|
|
</c:if>
|
|
|
- </shiro:hasPermission></td>
|
|
|
+ </td>
|
|
|
+ </c:if>
|
|
|
+ <td><fmt:formatDate value="${newPageHomeimage.bookStartDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
|
|
+ <td><fmt:formatDate value="${newPageHomeimage.bookEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/></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>
|
|
|
+ <c:if test="${newPageHomeimage.publishSource eq 2 }">
|
|
|
+ <td>${newPageHomeimage.shopName}</td>
|
|
|
+ </c:if>
|
|
|
+ <td>${fns:getUserById(newPageHomeimage.createBy).name}</td>
|
|
|
+ <td>
|
|
|
+ <c:if test="${newPageHomeimage.auditStatus eq 1 }">
|
|
|
+ <a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}&publishSource=${publishSource}">审核</a>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${newPageHomeimage.auditStatus ne 1 }">
|
|
|
+ <c:if test="${newPageHomeimage.wwwEnabledStatus ne 2 }">
|
|
|
+ <a href="#" onclick="updateEnabledStatus('${newPageHomeimage.wwwEnabledStatus eq 1?0:3}','${newPageHomeimage.id}')">${newPageHomeimage.wwwEnabledStatus eq 1?"下架":"上架" }</a>
|
|
|
+ </c:if>
|
|
|
+ <a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}&publishSource=${publishSource}">编辑</a>
|
|
|
+ <c:if test="${newPageHomeimage.publishSource eq 1}">
|
|
|
+ <a href="${ctx}/newhome/newPageHomeimage/delete?id=${newPageHomeimage.id}" onclick="return confirmx('确认要删除该新首页轮播图吗?', this.href)">删除</a>
|
|
|
+ </c:if>
|
|
|
+ </c:if>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</c:forEach>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
+<div class="setHomeImageStatus">
|
|
|
+ <h3 style="border-bottom: 1px #000 solid">上架提示</h3>
|
|
|
+ <input type="hidden" name="homeImgaeId" id="homeImgaeId">
|
|
|
+ <div style="padding: 10px 20px">
|
|
|
+ <label class="control-label">上架时间:</label>
|
|
|
+ <input type="radio" name="bookStatus" value="1" checked>立即上架
|
|
|
+ <input type="radio" name="bookStatus" value="2">预约上架
|
|
|
+ <input id="bookStartDate" type="text" maxlength="40" class="input-mini Wdate "
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 10px 20px">
|
|
|
+ <label class="control-label">下架时间:</label>
|
|
|
+ <input id="bookEndDate" type="text" maxlength="40" class="input-mini Wdate required"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
+ </div>
|
|
|
+ <div style="position: relative; float: right ;left: -20px">
|
|
|
+ <button onclick="$('.setHomeImageStatus').hide()">取消</button>
|
|
|
+ <button onclick="updateEnabledStatus('1',$('#homeImgaeId').val())">确认</button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
<div class="pagination">${page}</div>
|
|
|
</body>
|
|
|
</html>
|