修复 bug 客户管理领域信息没存起来,高层次人才单选的形式存储的
This commit is contained in:
+28
-1
@@ -108,14 +108,41 @@ var DeclareCtr = Ctr{
|
||||
delete(company, "create_time")
|
||||
delete(company, "modify_time")
|
||||
data := Map{}
|
||||
//for k, _ := range company {
|
||||
// if that.Req.Form[k] != nil {
|
||||
// if k == "technology_center_flag" || k == "engineering_center_flag" || k == "engineering_laboratory_flag" || k == "key_laboratory_flag" || k == "industrial_design_center_flag" {
|
||||
// data[k] = ObjToStr(that.Req.Form[k])
|
||||
// } else {
|
||||
// data[k] = that.Req.FormValue(k)
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
for k, _ := range company {
|
||||
// 前端传传值不规范
|
||||
if k == "high_level_talents_flag" {
|
||||
that.Req.Form[k] = that.Req.Form["highLevel_talents_flag"]
|
||||
}
|
||||
if that.Req.Form[k] != nil {
|
||||
if k == "technology_center_flag" || k == "engineering_center_flag" || k == "engineering_laboratory_flag" || k == "key_laboratory_flag" || k == "industrial_design_center_flag" {
|
||||
data[k] = ObjToStr(that.Req.Form[k])
|
||||
} else if k == "tags" || k == "high_level_talents_flag" {
|
||||
keyObj := that.Req.Form[k]
|
||||
if keyObj != nil && ObjToStr(keyObj) != "" {
|
||||
tagsStr := ""
|
||||
for k2, v2 := range keyObj {
|
||||
if k == "tags" && k2 < len(keyObj)-1 {
|
||||
tagsStr = tagsStr + v2 + ","
|
||||
} else {
|
||||
tagsStr += v2
|
||||
}
|
||||
}
|
||||
data[k] = tagsStr
|
||||
}
|
||||
} else {
|
||||
data[k] = that.Req.FormValue(k)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user