Authored by caoyan

自助上架增加驳回

@@ -157,6 +157,7 @@ function loadMainList(){ @@ -157,6 +157,7 @@ function loadMainList(){
157 str = "<a role='audit' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核</a>" + str; 157 str = "<a role='audit' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核</a>" + str;
158 }else if(rowData.status==3){ 158 }else if(rowData.status==3){
159 str = "<a role='upperShelf' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>上架</a>"; 159 str = "<a role='upperShelf' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>上架</a>";
  160 + str += "<a role='reject' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>驳回</a>";
160 }else{ 161 }else{
161 str = "<a role='detail' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>查看</a>"; 162 str = "<a role='detail' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>查看</a>";
162 } 163 }
@@ -198,7 +199,28 @@ function loadMainList(){ @@ -198,7 +199,28 @@ function loadMainList(){
198 }else { 199 }else {
199 window.self.$.messager.alert("失败", "失败!", "error"); 200 window.self.$.messager.alert("失败", "失败!", "error");
200 } 201 }
201 - }); } 202 + });
  203 + }
  204 + });
  205 +
  206 + $(this).datagrid("getPanel").find("a[role='reject']").linkbutton({
  207 + onClick: function () {
  208 + var id = $(this).attr("dataId");
  209 + $.post(contextPath + "/selfShelves/updateAuditInfoById", {
  210 + id : id,
  211 + status : 2
  212 + }, function(data) {
  213 + if (data.code == 200) {
  214 + $("#mainListTable").datagrid("reload");
  215 + window.self.$.messager.show({
  216 + title : "提示",
  217 + msg : "驳回成功!"
  218 + });
  219 + }else {
  220 + window.self.$.messager.alert("失败", "失败!", "error");
  221 + }
  222 + });
  223 + }
202 }); 224 });
203 225
204 } 226 }