作者 yangfu

机会详情修改

@@ -2017,7 +2017,7 @@ func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) @@ -2017,7 +2017,7 @@ func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form)
2017 } 2017 }
2018 for i := range inputFormList { 2018 for i := range inputFormList {
2019 item := inputFormList[i] 2019 item := inputFormList[i]
2020 - if len(item.Value) > 0 { 2020 + if len(item.Value) > 0 || len(item.Data) > 0 {
2021 FormList = append(FormList, item) 2021 FormList = append(FormList, item)
2022 } 2022 }
2023 } 2023 }
@@ -2083,7 +2083,7 @@ func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetail @@ -2083,7 +2083,7 @@ func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetail
2083 } 2083 }
2084 jsonUnmarshal(chance.SourceContent, &item.FormList) 2084 jsonUnmarshal(chance.SourceContent, &item.FormList)
2085 item.SelfChecks = agg.GetChanceSelfChecks(chance) 2085 item.SelfChecks = agg.GetChanceSelfChecks(chance)
2086 - //item.FormList = clearEmptyForm(item.FormList) 2086 + item.FormList = clearEmptyForm(item.FormList)
2087 item.RelatedDepartmentId = chance.DepartmentId 2087 item.RelatedDepartmentId = chance.DepartmentId
2088 item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId)) 2088 item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId))
2089 if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil { 2089 if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil {
@@ -2165,6 +2165,7 @@ func ChanceDraftDetail(header *protocol.RequestHeader, request *protocol.ChanceD @@ -2165,6 +2165,7 @@ func ChanceDraftDetail(header *protocol.RequestHeader, request *protocol.ChanceD
2165 item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId)) 2165 item.RelatedDepartmentInfo = agg.GetDepartment(int(chance.DepartmentId))
2166 jsonUnmarshal(chance.SourceContent, &item.FormList) 2166 jsonUnmarshal(chance.SourceContent, &item.FormList)
2167 jsonUnmarshal(chance.SelfChecks, &item.SelfChecks) 2167 jsonUnmarshal(chance.SelfChecks, &item.SelfChecks)
  2168 + item.FormList = clearEmptyForm(item.FormList)
2168 2169
2169 if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil { 2170 if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil {
2170 if len(chanceData.Videos) > 0 { 2171 if len(chanceData.Videos) > 0 {