Authored by caoyan

自助上架货号优化

... ... @@ -111,7 +111,7 @@ public class SelfShelvesServiceImpl implements ISelfShelvesService {
}
int num = selfShelvesMapper.upadteAuditResult(req.getId(), req.getStatus());
if(num > 0 && req.getStatus().intValue() == 1) {//审核通过,通知发布者站内信和短信“您提交的「品牌」「商品名称」「货号」信息已审核通过,赶紧发布您的好货吧”
if(num > 0 && req.getStatus().intValue() == 3) {//上架成功,通知发布者站内信和短信“您提交的「品牌」「商品名称」「货号」信息已审核通过,赶紧发布您的好货吧”
//发送站内信
inboxService.addInboxForPlatform(pss.getUid(), InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_SELF_SHELVES_AUDIT_PASS.getType(),
InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_SELF_SHELVES_AUDIT_PASS.getBusinessType(), buildParams(pss.getBrand(), pss.getProductName(), pss.getProductCode()));
... ... @@ -147,9 +147,11 @@ public class SelfShelvesServiceImpl implements ISelfShelvesService {
if(status == 0) {
return "待审核";
}else if(status == 1) {
return "已通过";
return "待上架";
}else if(status == 2) {
return "不通过";
}else if(status == 3) {
return "已上架";
}
return "";
}
... ...
... ... @@ -154,6 +154,8 @@ function loadMainList(){
var str = "";
if(rowData.status==0){
str = "<a role='audit' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核</a>" + str;
}else if(rowData.status==1){
str = "<a role='upperShelf' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>上架</a>";
}else{
str = "<a role='detail' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>查看</a>";
}
... ... @@ -179,6 +181,25 @@ function loadMainList(){
window.open(auditUrl + "?id=" + id + "&ver=" + new Date().getTime()); }
});
$(this).datagrid("getPanel").find("a[role='upperShelf']").linkbutton({
onClick: function () {
var id = $(this).attr("dataId");
$.post(contextPath + "/selfShelves/updateAuditInfoById", {
id : id,
status : 3
}, function(data) {
if (data.code == 200) {
document.getElementById("btnList").style.display= "none";
window.self.$.messager.show({
title : "提示",
msg : "上架成功!"
});
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
}); }
});
}
});
}
... ...