fix(ClientBlack): 修正黑名单删除结果提示
- 根据本次实际进入删除审批的记录数返回删除结果 - 未提交、新增已拒绝直接删除时提示“删除成功” - 已生效记录进入删除审批时提示“已经提交删除审批” - 批量混合删除时提示部分记录已提交删除审批
This commit is contained in:
@@ -114,7 +114,7 @@ namespace YLErp.Modules.ClientModule
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void DeleteClientBlack(IEnumerable<int> ids)
|
||||
public int DeleteClientBlack(IEnumerable<int> ids)
|
||||
{
|
||||
var idList = ids?.Distinct().ToList() ?? new List<int>();
|
||||
if (idList.Count == 0)
|
||||
@@ -129,6 +129,7 @@ namespace YLErp.Modules.ClientModule
|
||||
}
|
||||
|
||||
var hasProcess = ProcessList().Any();
|
||||
var submitRemovalApprovalCount = 0;
|
||||
foreach (var row in rows)
|
||||
{
|
||||
if (ClientBlackApprovalPolicy.CanDeleteDraft(row.State))
|
||||
@@ -151,6 +152,7 @@ namespace YLErp.Modules.ClientModule
|
||||
row.ApprovalOptName = UserName;
|
||||
row.ApprovalOptDate = DateTime.Now;
|
||||
ClientBlackCategoryLog(row.id, client_black.删除审批中);
|
||||
submitRemovalApprovalCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,6 +161,7 @@ namespace YLErp.Modules.ClientModule
|
||||
}
|
||||
|
||||
DbContext.SaveChanges();
|
||||
return submitRemovalApprovalCount;
|
||||
}
|
||||
|
||||
public void WithdrawApprovalClientBlack(List<int> ids, out int withdrawCount, out string msg)
|
||||
|
||||
Reference in New Issue
Block a user