|
@@ -24,14 +24,14 @@ const (
|
|
|
)
|
|
|
|
|
|
type ParticipateBid struct {
|
|
|
- EntId int
|
|
|
- EntUserId int
|
|
|
- PositionType int
|
|
|
- PositionId int
|
|
|
+ EntId int64
|
|
|
+ EntUserId int64
|
|
|
+ PositionType int64
|
|
|
+ PositionId int64
|
|
|
EntRoleId int64 // 角色
|
|
|
}
|
|
|
|
|
|
-func NewParticipateBid(entId, entUserId, positionType, positionId int) ParticipateBid {
|
|
|
+func NewParticipateBid(entId, entUserId, positionType, positionId int64) ParticipateBid {
|
|
|
return ParticipateBid{
|
|
|
EntId: entId,
|
|
|
EntUserId: entUserId,
|
|
@@ -135,7 +135,7 @@ func (p *ParticipateBid) ListPersonalFormat(existProjectSet map[string]struct{},
|
|
|
return formatList
|
|
|
}
|
|
|
|
|
|
-// DetailPersonalFormat 详情页 按钮格式化数据 infoM里面只会有一条数据
|
|
|
+// DetailPersonalFormat 详情页个人版 按钮格式化数据
|
|
|
func (p *ParticipateBid) DetailPersonalFormat(existProjectSet map[string]struct{}) bxcore.ParticipateDetailInfo {
|
|
|
// 处理成 要返回的返回数据
|
|
|
formatData := bxcore.ParticipateDetailInfo{
|
|
@@ -208,13 +208,19 @@ func (p ParticipateBid) ListEntFormat(existProjectMap, infoM map[string]string,
|
|
|
}
|
|
|
|
|
|
// DetailEntFormat 企业版 详情页数据格式化
|
|
|
+// 判断企业下是否有参标人
|
|
|
+// - 无参标人 展示参标按钮
|
|
|
+// - 有参标人 判断是否包含本人 包含则展示 终止参标按钮 不包含则再判断用户身份
|
|
|
+// - 企业管理员 显示终止参标
|
|
|
+// - 部门管理员 如果参标人中有该部门的人员 显示终止参标 否则 判断是否允许多人参标 允许多人参标 显示参标按钮 否则不显示
|
|
|
+// - 员工: 判断是否允许多人参标 允许多人则展示 参标 不允许多人则不展示按钮
|
|
|
func (p ParticipateBid) DetailEntFormat(existProjectMap map[string]string, isAllow bool) (formatData bxcore.ParticipateDetailInfo) {
|
|
|
// 处理成 要返回的返回数据
|
|
|
formatData = bxcore.ParticipateDetailInfo{
|
|
|
ShowParticipate: true,
|
|
|
}
|
|
|
if len(existProjectMap) == 0 {
|
|
|
- // 不存在则说明 未参标 展示为参标
|
|
|
+ // 不存在则说明 当前未参标 按钮展示为参标
|
|
|
formatData.ShowValue = ButtonValueParticipate
|
|
|
return
|
|
|
}
|