|
@@ -70,7 +70,7 @@
|
|
|
${cmHeheReduction.reducedAmount}
|
|
|
</td>
|
|
|
<td>
|
|
|
- ${cmHeheReduction.touchPrice}
|
|
|
+ 满${cmHeheReduction.touchPrice}
|
|
|
</td>
|
|
|
<td>
|
|
|
<fmt:formatDate value="${cmHeheReduction.startTime}" pattern="yyyy-MM-dd HH:mm"/>
|
|
@@ -104,24 +104,42 @@
|
|
|
if (status !== 3) {
|
|
|
if (status === 2) {
|
|
|
status = 3;
|
|
|
+ // 已上架活动下架
|
|
|
+ var submit = function (v, h, f) {
|
|
|
+ if (v == true) {
|
|
|
+ $.post("${ctx}/hehe/cmHeheReduction/updateStatus?id="+reductionId+"&status="+status,function (data) {
|
|
|
+ top.$.jBox.tip('下架活动成功');
|
|
|
+ setTimeout(function () {
|
|
|
+ $("#searchForm").submit();
|
|
|
+ }, 1000);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $.jBox.confirm("确定下架该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
|
|
|
} else {
|
|
|
+ debugger
|
|
|
status = 2;
|
|
|
- }
|
|
|
- // 待上架活动上架及已上架活动下架
|
|
|
- var submit = function (v, h, f) {
|
|
|
- if (v == true) {
|
|
|
- $.post("${ctx}/hehe/cmHeheReduction/updateStatus?id="+reductionId+"&status="+status,function (data) {
|
|
|
- top.$.jBox.tip((2 === status?'上架':'下架')+'活动成功');
|
|
|
- setTimeout(function () {
|
|
|
- $("#searchForm").submit();
|
|
|
- }, 1000);
|
|
|
- });
|
|
|
- }
|
|
|
- };
|
|
|
- if (2 == status) {
|
|
|
+ // 待上架活动上架
|
|
|
+ var submit = function (v, h, f) {
|
|
|
+ if (v == true) {
|
|
|
+ var startTime = new Date();
|
|
|
+ // 检查时间是否与其他活动时间重叠
|
|
|
+ $.post('${ctx}/hehe/cmHeheReduction/checkTime?reductionId=' + reductionId + "&type=1", function (data) {
|
|
|
+ if (!data.success) {
|
|
|
+ top.$.jBox.tip(data.msg);
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ $.post("${ctx}/hehe/cmHeheReduction/updateStatus?id=" + reductionId + "&status=" + status, function (data) {
|
|
|
+ top.$.jBox.tip('上架活动成功');
|
|
|
+ setTimeout(function () {
|
|
|
+ $("#searchForm").submit();
|
|
|
+ }, 1000);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
$.jBox.confirm("确定上架该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
|
|
|
- } else {
|
|
|
- $.jBox.confirm("确定下架该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
|
|
|
}
|
|
|
} else {
|
|
|
//已下架活动上架需重新设置上下架时间
|
|
@@ -139,6 +157,7 @@
|
|
|
var $jboxFrame = top.$('#jbox-iframe');
|
|
|
var $mainFrame = top.$('#mainFrame');
|
|
|
if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
|
+ debugger
|
|
|
var items = $jboxFrame[0].contentWindow.getCheckedItems(0);
|
|
|
if (items.length > 0) {
|
|
|
var startTime = items[0].startTime;
|
|
@@ -152,12 +171,12 @@
|
|
|
return false;
|
|
|
}
|
|
|
// 检查时间是否与其他活动时间重叠
|
|
|
- $.post('${ctx}/hehe/cmHeheReduction/checkTime?startTime=' + startTime + '&endTime=' + endTime + '&reductionId=' + reductionId,function (data) {
|
|
|
+ $.post('${ctx}/hehe/cmHeheReduction/checkTime?startTime=' + startTime + '&endTime=' + endTime + '&reductionId=' + reductionId + "&type=" + 2, function (data) {
|
|
|
if (!data.success) {
|
|
|
top.$.jBox.tip(data.msg);
|
|
|
return false;
|
|
|
} else {
|
|
|
- $.post("${ctx}/hehe/cmHeheReduction/updateTime?id="+reductionId+"&startTime=" + startTime + "&endTime=" + endTime, function (data) {
|
|
|
+ $.post("${ctx}/hehe/cmHeheReduction/updateTime?id=" + reductionId + "&startTime=" + startTime + "&endTime=" + endTime, function (data) {
|
|
|
top.$.jBox.tip("修改成功");
|
|
|
setTimeout(function () {
|
|
|
$("#searchForm").submit();
|