|
@@ -94,6 +94,32 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ // 商品下架、下架
|
|
|
|
+ function updateStatus(organizeId,id,status) {
|
|
|
|
+ var submit = function (v, h, f) {
|
|
|
|
+ $.post("${ctx}/weisha/cmOrganizeProduct/updateStatus", {
|
|
|
|
+ 'organizeId': organizeId,
|
|
|
|
+ 'id': id,
|
|
|
|
+ 'status': status
|
|
|
|
+ }, function (data) {
|
|
|
|
+ if (true == data.success) {
|
|
|
|
+ $.jBox.tip(data.msg, 'info');
|
|
|
|
+ <%--window.location.href="${ctx}/product/new/list";--%>
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ $("#searchForm").submit();
|
|
|
|
+ },1000)
|
|
|
|
+ } else {
|
|
|
|
+ $.jBox.tip(data.msg, 'error');
|
|
|
|
+ }
|
|
|
|
+ }, "JSON");
|
|
|
|
+ };
|
|
|
|
+ if(1 == status){
|
|
|
|
+ $.jBox.confirm("确定上架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
|
|
|
|
+ }else{
|
|
|
|
+ $.jBox.confirm("确定下架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -187,7 +213,7 @@
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<a href="${ctx}/weisha/cmOrganizeProduct/form?id=${cmOrganizeProduct.id}">编辑</a>
|
|
<a href="${ctx}/weisha/cmOrganizeProduct/form?id=${cmOrganizeProduct.id}">编辑</a>
|
|
- <a href="${ctx}/weisha/cmOrganizeProduct/updateStatus?organizeId=${organizeId}&id=${cmOrganizeProduct.id}&status=${cmOrganizeProduct.status eq 1?0:1}" onclick="return confirmx('确定'+${cmOrganizeProduct.status eq 1?'下架该商品吗?':'上架该商品吗?'}, this.href)">${cmOrganizeProduct.status eq 1?'下架':'上架'}</a>
|
|
|
|
|
|
+ <a href="javascript:;" onclick=updateStatus(${organizeId},${cmOrganizeProduct.id},${cmOrganizeProduct.status eq 1?0:1})>${cmOrganizeProduct.status eq 1?'下架':'上架'}</a>
|
|
<a href="${ctx}/weisha/cmOrganizeProduct/delete?id=${cmOrganizeProduct.id}" onclick="return confirmx('确认要删除该商品吗?删除后需要重新添加', this.href)">删除</a>
|
|
<a href="${ctx}/weisha/cmOrganizeProduct/delete?id=${cmOrganizeProduct.id}" onclick="return confirmx('确认要删除该商品吗?删除后需要重新添加', this.href)">删除</a>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|