瀏覽代碼

no message

xingzai 1 年之前
父節點
當前提交
3c35cc8f65
共有 2 個文件被更改,包括 6 次插入5 次删除
  1. 5 4
      controllers/company.go
  2. 1 1
      models/company/company.go

+ 5 - 4
controllers/company.go

@@ -347,10 +347,7 @@ func (this *CompanyController) SearchList() {
 		if sysProductId > 0 {
 			list[i].ApproveStatus = approveStatusMap[sysProductId]
 		}
-		//如果是权益客户,操作者又是权益管理员,那么就对他进行展示研选详情按钮
-		if strings.Contains(item.CompanyType, utils.COMPANY_CLASSIFY_RAI) && sysUser.RoleName == utils.ROLE_TYPE_RAI_PRODUCT {
-			list[i].IsResearchShow = 1
-		}
+
 		list[i].Duration = duration
 		//按钮显示控制
 		/*btnItem := services.GetCompanySearchPermissionButton(roleTypeCode, itemStatus, item.GroupId, sysUser.GroupId, item.SellerId, sysUser.AdminId, sysUser.Authority, item.ProductId)
@@ -362,6 +359,10 @@ func (this *CompanyController) SearchList() {
 			//根据销售"领取客户"的权限对部分按钮做限制
 			btnItem = services.GetCompanyPermissionButtonByReceiveEnabled(btnItem, receiveEnabled)
 		}
+		//如果是权益客户,操作者又是权益管理员,那么就对他进行展示研选详情按钮
+		if strings.Contains(item.CompanyType, utils.COMPANY_CLASSIFY_RAI) && sysUser.RoleName == utils.ROLE_TYPE_RAI_PRODUCT {
+			btnItem.IsResearchShow = true
+		}
 		list[i].BtnItem = btnItem
 	}
 	if list == nil {

+ 1 - 1
models/company/company.go

@@ -90,7 +90,6 @@ type CompanySearchItem struct {
 	ShareSeller     string `description:"共享销售员"`
 	ShareSellerId   int    `description:"共享销售员id"`
 	IsShare         int    `description:"0:非共享用户,1:共享客户"`
-	IsResearchShow  int    `description:"研选详情展示控制:1:显示,0:不显示"`
 }
 
 type CompanySearchListResp struct {
@@ -1203,6 +1202,7 @@ type ButtonPermission struct {
 	BtnServiceRecord bool `description:"查看服务记录按钮:true显示,false不显示"`
 	BtnClose         bool `description:"关闭客户按钮:true显示,false不显示"`
 	BtnLoss          bool `description:"转流失按钮:true显示,false不显示"`
+	IsResearchShow   bool `description:"研选详情展示控制:true显示,false不显示"`
 }
 
 type ButtonSearchPermission struct {