|
@@ -20,12 +20,12 @@
|
|
|
}
|
|
|
// alert($("#span").text());
|
|
|
});
|
|
|
- function page(n,s){
|
|
|
+ function page(n, s) {
|
|
|
$("#pageNo").val(n);
|
|
|
$("#pageSize").val(s);
|
|
|
$("#searchForm").submit();
|
|
|
- return false;
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
//PC端状态修改
|
|
|
function updateEnabledStatus(status,ids){
|
|
|
var msg='确定启用该楼层吗?';
|
|
@@ -99,7 +99,7 @@
|
|
|
obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
|
|
|
}
|
|
|
|
|
|
- function offoce(productID,date,newshowTime,ShowTime,addTime){
|
|
|
+ function offoce(productID,date,ShowTime,addTime,floorTitle,floorType){
|
|
|
var html = "<div id='auditBox'>"
|
|
|
+ "<div class='bd-row'>"
|
|
|
+ "<span style='margin-left: 5px;size: 30px'>更改时间后,将从此刻的时间开始重新计算</span>"
|
|
@@ -111,13 +111,14 @@
|
|
|
+ "<span id='err' hidden=hidden style='color: red'>请输入天数</span>"
|
|
|
+ "</div>";
|
|
|
var submit = function (v, h, f) {
|
|
|
-
|
|
|
+ if(v==true){
|
|
|
if (f.yat == '' || f.yat == null) {
|
|
|
$("#err").show()
|
|
|
return false;
|
|
|
}else {
|
|
|
$("#err").hide()
|
|
|
}
|
|
|
+
|
|
|
debugger
|
|
|
var time = new Date();
|
|
|
var y = time.getFullYear();
|
|
@@ -137,26 +138,12 @@ debugger
|
|
|
data.getTime()+1000*60*60*24;
|
|
|
var dtime = new Date(data);
|
|
|
commTime = dateFormat("YYYY-mm-dd HH:MM:SS",dtime);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // d=time.setDate(Number(d) + Number(f.yat)).toLocaleString().replace(/\//g, "-");
|
|
|
-
|
|
|
- // d=time.setTime(time.getTime() + 1000 * 60 * 60 * (f.yat*24))
|
|
|
-
|
|
|
- //对天数进行加
|
|
|
- window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime"+addTime;
|
|
|
- <%--$.post("${ctx}/newhome/newPageFloor/updateshowTime", {//y+'-'+m+'-'+d+' '+h+':'+minute+':'+s--%>
|
|
|
- <%-- 'newshowTime':commTime,--%>
|
|
|
- <%-- 'productID':productID,--%>
|
|
|
- <%-- 'showTime':commonTime,--%>
|
|
|
- <%-- 'newshowTime':newshowTime,--%>
|
|
|
- <%-- 'addTime':addTime--%>
|
|
|
-
|
|
|
- <%--}, "JSON");--%>
|
|
|
+ console.log(window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime="+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType)
|
|
|
+ window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime="+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
|
|
|
+ }
|
|
|
};
|
|
|
- $.jBox(html, {title: "提示",submit:submit});
|
|
|
+ // $.jBox.confirm(html, {title: "提示",submit:submit});
|
|
|
+ $.jBox.confirm(html, "提示", submit, {buttons: {'确认': true, '取消': false}});
|
|
|
}
|
|
|
|
|
|
|
|
@@ -183,33 +170,33 @@ debugger
|
|
|
$("#preferredProductSort"+id).val(id+"-"+value);
|
|
|
}
|
|
|
|
|
|
- function offocea(productID,newshowTime,ShowTime,addTime) {
|
|
|
+ function offocea(productID,newshowTime,ShowTime,addTime,floorTitle,floorType) {
|
|
|
$.jBox.confirm("确定上线该商品吗?","提示",function(v,h,f){
|
|
|
|
|
|
if(v === 1){
|
|
|
- window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=1&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime;
|
|
|
+ window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=1&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
|
|
|
}
|
|
|
} ,{ buttons: { '确定': 1,'取消':2}});
|
|
|
}
|
|
|
- function offoceb(productID,newshowTime,ShowTime,addTime) {
|
|
|
+ function offoceb(productID,newshowTime,ShowTime,addTime,floorTitle,floorType) {
|
|
|
console.log(newshowTime)
|
|
|
$.jBox.confirm("确定下线该商品吗?下线后该商品将不展示在商城新品区域","提示",function(v,h,f){
|
|
|
if(v === 1){
|
|
|
- window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=5&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime;
|
|
|
+ window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=5&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
|
|
|
}
|
|
|
} ,{ buttons: { '确定': 1,'取消':2}});
|
|
|
}
|
|
|
- function offocec(productID) {
|
|
|
+ function offocec(productID,floorTitle,floorType) {
|
|
|
$.jBox.confirm("确定取消重点推荐吗?","提示",function(v,h,f){
|
|
|
if(v === 1){
|
|
|
- window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=0&productID="+productID;
|
|
|
+ window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=0&productID="+productID+"&floorTitle="+floorTitle+"&floorType="+floorType;
|
|
|
}
|
|
|
} ,{ buttons: { '确定': 1,'取消':2}});
|
|
|
}
|
|
|
- function offoced(productID) {
|
|
|
+ function offoced(productID,floorTitle,floorType) {
|
|
|
$.jBox.confirm("确定将该商品设为重点推荐吗?推荐后商品将在商城新品区域重点展示","提示",function(v,h,f){
|
|
|
if(v === 1){
|
|
|
- window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=1&productID="+productID;
|
|
|
+ window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=1&productID="+productID+"&floorTitle="+floorTitle+"&floorType="+floorType;
|
|
|
}
|
|
|
} ,{ buttons: { '确定': 1,'取消':2}});
|
|
|
}
|
|
@@ -224,7 +211,12 @@ debugger
|
|
|
<form:form id="searchForm" modelAttribute="Product" action="${ctx}/newhome/newPageFloor/ContentPage?floorId=${newPageFloor.id}&floorTitle=${newPageFloor.floorTitle}&floorType=${newPageFloor.floorType}">
|
|
|
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+ <c:if test="${not empty floorTitle}">
|
|
|
+ 楼层名称: <span style="color: #0bbbee">${floorTitle}</span> <span >楼层类型:</span> <span style="color: #0bbbee"><c:if test="${floorType eq 1}">新品橱窗</c:if></span>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${not empty newPageFloor.floorTitle}">
|
|
|
楼层名称: <span style="color: #0bbbee">${newPageFloor.floorTitle}</span> <span >楼层类型:</span> <span style="color: #0bbbee"><c:if test="${newPageFloor.floorType eq 1}">新品橱窗</c:if></span>
|
|
|
+ </c:if>
|
|
|
<div class="ul-form">
|
|
|
|
|
|
<label>商品ID:</label>
|
|
@@ -308,11 +300,11 @@ debugger
|
|
|
<c:if test="${list.recommend eq 1}"><img src="/static/images/yes.gif" width="15px" border="none"/></c:if>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <c:if test="${list.showFlag eq 5}"><a class="red" href="javascript:void(0);" onclick="offocea(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}')">上线商品</a></c:if>
|
|
|
- <c:if test="${list.showFlag eq 1 }"><a class="red" href="javascript:void(0);" onclick="offoceb(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}')">下线商品</a> </c:if>
|
|
|
- <c:if test="${list.recommend eq 1}"><a class="red" href="javascript:void(0);" onclick="offocec(${list.productID})">取消重点推荐</a> </c:if>
|
|
|
- <c:if test="${list.recommend != 1 && count<5 && list.showFlag != 5}"><a class="red" href="javascript:void(0);" onclick="offoced(${list.productID})">设为重点推荐</a></c:if>
|
|
|
- <a class="red" href="javascript:void(0);" onclick="offoce(${list.productID},new Date,'${list.newshowTime}','${list.addTime}')">更改展示时间</a>
|
|
|
+ <c:if test="${list.showFlag eq 5}"><a class="red" href="javascript:void(0);" onclick="offocea(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">上线商品</a></c:if>
|
|
|
+ <c:if test="${list.showFlag eq 1 }"><a class="red" href="javascript:void(0);" onclick="offoceb(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">下线商品</a> </c:if>
|
|
|
+ <c:if test="${list.recommend eq 1}"><a class="red" href="javascript:void(0);" onclick="offocec(${list.productID},'${newPageFloor.floorTitle}','${newPageFloor.floorType}')">取消重点推荐</a> </c:if>
|
|
|
+ <c:if test="${list.recommend != 1 && count<5 && list.showFlag != 5}"><a class="red" href="javascript:void(0);" onclick="offoced('${list.productID}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">设为重点推荐</a></c:if>
|
|
|
+ <c:if test="${list.showFlag !=5}"> <a class="red" href="javascript:void(0);" onclick="offoce('${list.productID}',new Date,'${list.newshowTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">更改展示时间</a></c:if>
|
|
|
</td>
|
|
|
</c:forEach>
|
|
|
</tr>
|