|
@@ -519,8 +519,15 @@ func (this *CompanyApplyController) ApplyTurnPositive() {
|
|
|
br.ErrMsg = "客户状态为:" + companyProduct.Status + ";不可进行转正申请"
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ companyItem, e := company.GetCompanyById(req.CompanyId)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "客户信息有误"
|
|
|
+ br.ErrMsg = "获取客户信息失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
//客户归属判断
|
|
|
- if companyProduct.SellerId != sysUser.AdminId {
|
|
|
+ if companyProduct.SellerId != sysUser.AdminId && companyItem.ShareSellerId != sysUser.AdminId {
|
|
|
br.Msg = "客户信息异常"
|
|
|
br.ErrMsg = "客户信息异常,不是当前所属销售,客户所属销售:" + companyProduct.SellerName + ";当前销售:" + sysUser.AdminName
|
|
|
return
|
|
@@ -1397,12 +1404,19 @@ func (this *CompanyApplyController) ApplyThaw() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ companyItem, e := company.GetCompanyById(req.CompanyId)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "客户信息有误"
|
|
|
+ br.ErrMsg = "获取客户信息失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
//客户归属判断
|
|
|
- if companyProduct.SellerId != sysUser.AdminId {
|
|
|
+ if companyProduct.SellerId != sysUser.AdminId && companyItem.ShareSellerId != sysUser.AdminId {
|
|
|
br.Msg = "客户信息异常"
|
|
|
br.ErrMsg = "客户信息异常,不是当前所属销售,客户所属销售:" + companyProduct.SellerName + ";当前销售:" + sysUser.AdminName
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
// CRM8.8(仅针对权益客户)-此处同申请试用的逻辑
|
|
|
if companyProduct.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
reportPermissions, e := company.GetCompanyReportPermission(req.CompanyId, utils.COMPANY_PRODUCT_RAI_ID)
|
|
@@ -1643,12 +1657,20 @@ func (this *CompanyApplyController) ApplyDelay() {
|
|
|
br.Msg = "存在待审批订单,不可重复提交"
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ companyItem, e := company.GetCompanyById(req.CompanyId)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "客户信息有误"
|
|
|
+ br.ErrMsg = "获取客户信息失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
//客户归属判断
|
|
|
- if companyProduct.SellerId != sysUser.AdminId {
|
|
|
+ if companyProduct.SellerId != sysUser.AdminId && companyItem.ShareSellerId != sysUser.AdminId {
|
|
|
br.Msg = "客户信息异常"
|
|
|
br.ErrMsg = "客户信息异常,不是当前所属销售,客户所属销售:" + companyProduct.SellerName + ";当前销售:" + sysUser.AdminName
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
// CRM8.8(仅针对权益客户)-申请延期的权限不再进行选择, 而是自动将所有的试用权限延期
|
|
|
if companyProduct.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
reportPermissions, e := company.GetCompanyReportPermission(req.CompanyId, utils.COMPANY_PRODUCT_RAI_ID)
|