xingzai 1 рік тому
батько
коміт
dbee5ad3cf

+ 7 - 0
controllers/cygx/activity_meet.go

@@ -942,6 +942,13 @@ func (this *ActivityMeetCoAntroller) AppointmentList() {
 				respList.List = append(respList.List, v)
 			}
 		}
+		if adminInfo.RoleTypeCode == "rai_group" {
+			//组长查看本组所有组员
+			memberType = "GroupLeader"
+		} else {
+			//组员查看自己
+			memberType = "Sale"
+		}
 	} else {
 		respList.List = list
 	}

+ 37 - 0
controllers/cygx/activity_signup.go

@@ -318,6 +318,13 @@ func (this *ActivitySignupCoAntroller) AppointmentList() {
 				respList.List = append(respList.List, v)
 			}
 		}
+		if adminInfo.RoleTypeCode == "rai_group" {
+			//组长查看本组所有组员
+			memberType = "GroupLeader"
+		} else {
+			//组员查看自己
+			memberType = "Sale"
+		}
 	} else {
 		respList.List = list
 	}
@@ -739,6 +746,13 @@ func (this *ActivitySignupCoAntroller) SalonFailSignupList() {
 				respList.List = append(respList.List, v)
 			}
 		}
+		if adminInfo.RoleTypeCode == "rai_group" {
+			//组长查看本组所有组员
+			memberType = "GroupLeader"
+		} else {
+			//组员查看自己
+			memberType = "Sale"
+		}
 	} else {
 		respList.List = list
 	}
@@ -1034,6 +1048,13 @@ func (this *ActivitySignupCoAntroller) FailSignupList() {
 				respList.List = append(respList.List, v)
 			}
 		}
+		if adminInfo.RoleTypeCode == "rai_group" {
+			//组长查看本组所有组员
+			memberType = "GroupLeader"
+		} else {
+			//组员查看自己
+			memberType = "Sale"
+		}
 	} else {
 		respList.List = listNew
 	}
@@ -2468,6 +2489,14 @@ func (this *ActivitySignupCoAntroller) SummaryList() {
 				companyIdstr = append(companyIdstr, strconv.Itoa(v))
 			}
 			sqlStr += ` AND s.company_id IN (` + strings.Join(companyIdstr, ",") + `) `
+
+			if adminInfo.RoleTypeCode == "rai_group" {
+				//组长查看本组所有组员
+				memberType = "GroupLeader"
+			} else {
+				//组员查看自己
+				memberType = "Sale"
+			}
 		}
 	}
 	list, err := cygx.GetCygxAppointmentSummaryList(activityId, sqlStr)
@@ -2758,6 +2787,14 @@ func (this *ActivitySignupCoAntroller) ReminderList() {
 			companyIdstr = append(companyIdstr, strconv.Itoa(v))
 		}
 		sqlStr += ` AND s.company_id IN (` + strings.Join(companyIdstr, ",") + `) `
+
+		if adminInfo.RoleTypeCode == "rai_group" {
+			//组长查看本组所有组员
+			memberType = "GroupLeader"
+		} else {
+			//组员查看自己
+			memberType = "Sale"
+		}
 	}
 
 	list, err := cygx.GetCygxActivityMeetingReminderList(activityId, sqlStr)