作者 yangfu

机会详情修改

... ... @@ -2017,7 +2017,7 @@ func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form)
}
for i := range inputFormList {
item := inputFormList[i]
if len(item.Value) > 0 {
if len(item.Value) > 0 || len(item.Data) > 0 {
FormList = append(FormList, item)
}
}
... ... @@ -2083,7 +2083,7 @@ func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetail
}
jsonUnmarshal(chance.SourceContent, &item.FormList)
item.SelfChecks = agg.GetChanceSelfChecks(chance)
//item.FormList = clearEmptyForm(item.FormList)
item.FormList = clearEmptyForm(item.FormList)
item.RelatedDepartmentId = chance.DepartmentId
item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId))
if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil {
... ... @@ -2165,6 +2165,7 @@ func ChanceDraftDetail(header *protocol.RequestHeader, request *protocol.ChanceD
item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId))
jsonUnmarshal(chance.SourceContent, &item.FormList)
jsonUnmarshal(chance.SelfChecks, &item.SelfChecks)
item.FormList = clearEmptyForm(item.FormList)
if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil {
if len(chanceData.Videos) > 0 {
... ...