xingzai hai 6 meses
pai
achega
b3a2bee254
Modificáronse 3 ficheiros con 34 adicións e 8 borrados
  1. 2 4
      controllers/cygx/rai_serve.go
  2. 1 1
      models/cygx/rai_serve_company.go
  3. 31 3
      services/company.go

+ 2 - 4
controllers/cygx/rai_serve.go

@@ -487,9 +487,7 @@ func (this *RaiServeCoAntroller) List() {
 		item.ShareSellerId = v.ShareSellerId
 		item.Status = v.Status
 		item.PermissionName = v.PermissionName
-		if v.IsUserMaker == 0 {
-			item.IsRed = true
-		}
+		item.IsUserMaker = v.IsUserMaker
 		item.ThisWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 0)]
 		item.LastWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 1)]
 		item.TwoWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 2)]
@@ -626,7 +624,7 @@ func RaiServeListExport(this *RaiServeCoAntroller, resp *cygx.CygxRaiServeCompan
 		dataRow.SetHeight(20)
 
 		cellA := dataRow.AddCell()
-		if v.IsRed {
+		if v.IsUserMaker == 0 {
 			cellA.SetStyle(redStyle)
 		} else {
 			cellA.SetStyle(style)

+ 1 - 1
models/cygx/rai_serve_company.go

@@ -27,7 +27,7 @@ type CygxRaiServeCompany struct {
 type CygxRaiServeCompanyResp struct {
 	CompanyId         int     `comment:"公司ID"`
 	CompanyName       string  `comment:"公司名称"`
-	IsRed             bool    `comment:"是否标红"`
+	IsUserMaker       int     `description:"近四周之内是否包含决策人互动过 ,0否,1是"`
 	Money             float64 `comment:"合同金额"`
 	ServeCoverageRate string  `comment:"近四周服务覆盖率"`
 	SellerId          int     `comment:"所属销售id"`

+ 31 - 3
services/company.go

@@ -867,12 +867,20 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 		if !strings.Contains(status, "/") {
 			if status == utils.COMPANY_STATUS_FORMAL { //正式
 				//button.BtnModifySeller = true
-				button.BtnRemarkView = true
+				if productId == utils.COMPANY_PRODUCT_RAI_ID {
+					button.BtnRemarkViewHistory = true
+				} else {
+					button.BtnRemarkView = true
+				}
 				return
 			} else if status == utils.COMPANY_STATUS_TRY_OUT { //试用
 				button.BtnEdit = true
 				button.BtnDelete = true
-				button.BtnRemarkView = true
+				if productId == utils.COMPANY_PRODUCT_RAI_ID {
+					button.BtnRemarkViewHistory = true
+				} else {
+					button.BtnRemarkView = true
+				}
 				//button.BtnModifySeller = true
 				button.BtnFreeze = false
 				if productId == utils.COMPANY_PRODUCT_FICC_ID {
@@ -881,11 +889,18 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 				return
 			} else if status == utils.COMPANY_STATUS_FREEZE { //冻结
 				//button.BtnModifySeller = true
-				button.BtnRemarkView = true
+				if productId == utils.COMPANY_PRODUCT_RAI_ID {
+					button.BtnRemarkViewHistory = true
+				} else {
+					button.BtnRemarkView = true
+				}
 				return
 			} else if status == utils.COMPANY_STATUS_LOSE { //流失
 				//button.BtnModifySeller = true
 				button.BtnDelete = true
+				if productId == utils.COMPANY_PRODUCT_RAI_ID {
+					button.BtnRemarkViewHistory = true
+				}
 				return
 			} else if status == utils.COMPANY_STATUS_CLOSE { // 关闭
 				//button.BtnModifySeller = true
@@ -898,6 +913,9 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 				//button.BtnModifySeller = true
 				button.BtnDelete = true
 				button.BtnEdit = true
+				if productId == utils.COMPANY_PRODUCT_RAI_ID {
+					button.BtnRemarkViewHistory = true
+				}
 				return
 			}
 		}
@@ -949,6 +967,7 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 			if productStatus == utils.COMPANY_STATUS_FORMAL { //正式
 				button.BtnModifySeller = true
 				button.BtnShare = true
+				button.BtnRemarkViewHistory = true
 			} else if productStatus == utils.COMPANY_STATUS_TRY_OUT { //试用
 				button.BtnEdit = true
 				//button.BtnDelete = true
@@ -956,13 +975,17 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 				button.BtnFreeze = false
 				// CRM14.7.2 权益管理员可以设置试用客户为共享
 				button.BtnShare = true
+				button.BtnRemarkViewHistory = true
 			} else if productStatus == utils.COMPANY_STATUS_FREEZE { //冻结
 				button.BtnModifySeller = true
+				button.BtnRemarkViewHistory = true
 			} else if productStatus == utils.COMPANY_STATUS_LOSE { //流失
 				//button.BtnDelete = true
+				button.BtnRemarkViewHistory = true
 			} else { //永续
 				button.BtnModifySeller = true
 				button.BtnShare = true
+				button.BtnRemarkViewHistory = true
 			}
 		} else {
 			productStatus2, hasProduct2 := productStatusMap[1]
@@ -1184,12 +1207,15 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 						button.BtnRemarkView = true
 					} else if productStatus == utils.COMPANY_STATUS_LOSE { //流失
 						button.BtnApplyReceive = true
+						button.BtnRemarkViewHistory = true
 					} else if productStatus == utils.COMPANY_STATUS_FOREVER { //永续
 						button.BtnTurnPositive = true
+						button.BtnRemarkViewHistory = true
 					}
 				} else {
 					if productStatus == utils.COMPANY_STATUS_LOSE { //流失
 						button.BtnView = true //显示权限、详情
+						button.BtnRemarkViewHistory = true
 						//如果不是自己客户,那么判断是否是本小组的,如果是本小组,那么还是申请领取,非本小组的话,那就是领取
 						if groupId == sysUserGroupId {
 							button.BtnApplyReceive = true
@@ -1223,8 +1249,10 @@ func GetCompanyPermissionButton(roleTypeCode, status, itemSellerIds, itemGroupId
 					} else {
 						button.BtnReceive = true
 					}
+					button.BtnRemarkViewHistory = true
 				} else { //永续
 					//button.BtnDelete = true
+					button.BtnRemarkViewHistory = true
 				}
 			}