|
|
@ -202,12 +202,25 @@ namespace SCP |
|
|
|
var erpdomain = _list.FirstOrDefault(q => q.ErpSite == factoryValue.Value).ErpDomain; |
|
|
|
user.UsedDomain = erpdomain; |
|
|
|
user.UserdSite = factoryValue.Value; |
|
|
|
|
|
|
|
if (_factoryList.Contains(erpdomain)) |
|
|
|
{ |
|
|
|
// 判断是否是供应商权限 是的话 判断是否只绑定了供应商权限 只绑定了供应商权限 判断是否绑定了对应关系
|
|
|
|
var RoName = user.Roles.Select(q => q.Name).ToList(); |
|
|
|
if (RoName != null) |
|
|
|
{ |
|
|
|
if (RoName.Count() == 1 && RoName.Contains("供应商")) |
|
|
|
{ |
|
|
|
var list = DB.VenderUsers.Where(q => q.UserId == user.ID).ToList(); |
|
|
|
if (list.Count() == 0) |
|
|
|
{ |
|
|
|
Alert.Show(GetResourceKey("该账号未绑定供应商无法登录,请联系管理人员进行绑定后重新登录")); |
|
|
|
img.ImageUrl = DrawToBase64(4); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
string date = DateTime.Now.ToShortDateString(); |
|
|
|
var ret = SCP_LOGINNUMBER_CONTROLLER.Save_TA_LOGINNUMBER(p_userName, LoginNumer.Sussess, date); |
|
|
|
|
|
|
|
// 登录成功
|
|
|
|
LoginSuccess(user); |
|
|
|
} |
|
|
|