jianghan7 1 жил өмнө
parent
commit
7bddb9c124

+ 104 - 77
src/front/project.go

@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"github.com/shopspring/decimal"
 	"github.com/tealeg/xlsx"
+	"go.mongodb.org/mongo-driver/bson"
 	"go.mongodb.org/mongo-driver/bson/primitive"
 	"io/ioutil"
 	"mime/multipart"
@@ -62,9 +63,6 @@ func (f *Front) ProjectList() {
 		count := util.Mgo.Count(util.PROJECTCOLLNAME, query)
 		f.ServeJson(map[string]interface{}{"draw": draw, "data": *list, "recordsFiltered": count, "recordsTotal": count})
 	} else {
-		f.T["fields"] = util.FieldsMap
-		f.T["dataTypeArr"] = util.DataTypeArr
-		f.T["dataTypeMap"] = util.DataTypeMap
 		_ = f.Render("project/project_list.html", &f.T)
 	}
 }
@@ -156,43 +154,15 @@ func (f *Front) ProjectSave() {
 		rulename := f.GetString("s_rulename")      //规则名称
 		s_rulename = strings.Split(rulename, ",")
 		s_personname := f.GetString("s_personname")
-		s_datatype := f.GetString("s_datatype") //数据类型
-		fields := f.GetString("v_fields_diy")
-		//fieldsAll := f.GetString("v_fields")
-		qu.Debug(fields)
-		v_fields := map[string]interface{}{}
-		v_fieldsAll := map[string]interface{}{}
-		if err := json.Unmarshal([]byte(fields), &v_fields); err != nil {
-			qu.Debug("V_Filelds Unmarshal Failed:", err)
-			f.ServeJson(map[string]interface{}{"success": false, "msg": err})
-			return
-		}
-		//if err := json.Unmarshal([]byte(fieldsAll), &v_fieldsAll); err != nil {
-		//	qu.Debug("v_FieldsAll Unmarshal Failed:", err)
-		//	f.ServeJson(map[string]interface{}{"success": false, "msg": err})
-		//	return
-		//}
-		for s, v := range v_fields {
-			v_fieldsAll[s] = v
-		}
-		for _, v := range qu.ObjArrToStringArr(util.DataTypeMap[s_datatype].([]interface{})) {
-			if strings.Contains(v, "purchasinglist") {
-				v_fieldsAll["purchasinglist"] = util.FieldsMap["purchasinglist"]
-			} else {
-				v_fieldsAll[v] = util.FieldsMap[v]
-			}
-		}
+
 		set = map[string]interface{}{
 			//"s_name":       s_name,                        //项目名称
 			//"s_entname":    s_entname,                     //公司名称
 			"s_departname":   s_departname,                  //部门名称
 			"s_rulename":     strings.Join(s_rulename, ","), //规则名称
-			"v_fields_diy":   v_fields,                      //标注字段
-			"v_fields":       v_fieldsAll,
-			"s_updateperson": username,          //更新人
-			"i_createtime":   time.Now().Unix(), //更新时间
-			"s_personname":   s_personname,      //售后人员
-			"s_datatype":     s_datatype,
+			"s_updateperson": username,                      //更新人
+			"i_createtime":   time.Now().Unix(),             //更新时间
+			"s_personname":   s_personname,                  //售后人员
 			//"i_starttime":,//开始时间
 			//"i_completetime",//结束时间
 		}
@@ -366,10 +336,10 @@ func (f *Front) ProjectQualityAssessment() {
 	project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, projectid, map[string]interface{}{"b_isassessment": 1, "s_sourceinfo": 1, "v_fields": 1})
 	if project != nil && len(*project) > 0 {
 		if isAssessment, ok := (*project)["b_isassessment"].(bool); ok && !isAssessment {
-			if fields, ok := (*project)["v_fields"].(map[string]interface{}); ok && len(fields) > 0 {
+			if fields := qu.ObjArrToMapArr((*project)["v_fields"].([]interface{})); len(fields) > 0 {
 				var fieldsArr []string
-				for f := range fields {
-					fieldsArr = append(fieldsArr, f)
+				for _, v := range fields {
+					fieldsArr = append(fieldsArr, qu.ObjToString(v["key"]))
 				}
 				sourceinfo := qu.ObjToString((*project)["s_sourceinfo"])
 				qu.Debug("质量评估字段:", fieldsArr)
@@ -1253,44 +1223,40 @@ func GetDataById(idInfoArr []util.Data, importType, s_sourceinfo string, success
 				}
 				// 补充filetext
 				(*bidData)["filetext"] = util.GetFileText(*bidData)
-				// 6.es查询项目合并信息
-				esQ := `{"query":{"bool":{"must":[{"term":{"ids":"` + id + `"}}]}}}`
-				info := util.Es.Get("projectset", esQ)
-				if len(*info) > 0 {
-					projectId := qu.ObjToString((*info)[0]["_id"])
-					project, _ := util.MgoE.FindById(util.ProjectColl, projectId, map[string]interface{}{"ids": 1})
-					if project != nil && len(*project) > 0 {
-						ids := qu.ObjArrToStringArr((*project)["ids"].([]interface{}))
-						if len(ids) > 0 {
-							var infolist []map[string]interface{}
-							for _, v := range ids {
-								if v == id { // 当前公告
-									continue
-								}
-								if v < util.BIDDINGSTARTID {
-									tmpBidColl = util.BidColl2 //bidding_back
-								}
-								bid, b := util.MgoB.FindById(tmpBidColl, v, nil)
-								if b && len(*bid) > 0 {
-									tmp := make(map[string]interface{})
-									tmp["id"] = v
-									tmp["title"] = (*bid)["title"]
-									tmp["href"] = (*bid)["href"]
-									tmp["toptype"] = (*bid)["toptype"]
-									tmp["subtype"] = (*bid)["subtype"]
-									tmp["publishtime"] = (*bid)["publishtime"]
-									tmp["detail"] = (*bid)["detail"]
-									tmp["filetext"] = util.GetFileText(*bid)
-									infolist = append(infolist, tmp)
-								}
+				// 6.项目合并信息
+				project, _ := util.MgoE.Find(util.ProjectColl, bson.M{"ids": id}, nil, nil, true, -1, -1)
+				//esQ := `{"query":{"bool":{"must":[{"term":{"ids":"` + id + `"}}]}}}`
+				//info := util.Es.Get("projectset", esQ)
+				if project != nil && len((*project)[0]) > 0 {
+					qu.Debug(*project)
+					ids := qu.ObjArrToStringArr((*project)[0]["ids"].([]interface{}))
+					if len(ids) > 0 {
+						var infolist []map[string]interface{}
+						for _, v := range ids {
+							if v == id { // 当前公告
+								continue
+							}
+							if v < util.BIDDINGSTARTID {
+								tmpBidColl = util.BidColl2 //bidding_back
+							}
+							bid, b := util.MgoB.FindById(tmpBidColl, v, nil)
+							if b && len(*bid) > 0 {
+								tmp := make(map[string]interface{})
+								tmp["id"] = v
+								tmp["title"] = (*bid)["title"]
+								tmp["href"] = (*bid)["href"]
+								tmp["toptype"] = (*bid)["toptype"]
+								tmp["subtype"] = (*bid)["subtype"]
+								tmp["publishtime"] = (*bid)["publishtime"]
+								tmp["detail"] = (*bid)["detail"]
+								tmp["filetext"] = util.GetFileText(*bid)
+								infolist = append(infolist, tmp)
 							}
-							(*bidData)["info"] = infolist
 						}
-					} else {
-						qu.Debug("Projectset Find Error", projectId)
+						(*bidData)["info"] = infolist
 					}
 				} else {
-					qu.Debug("ProjectId Is Null", id)
+					qu.Debug("Projectset Find Error", id)
 				}
 				baseInfoMap["id"] = id
 				_id := (*bidData)["_id"]
@@ -1404,16 +1370,77 @@ func (f *Front) ProjectTagNum() {
 }
 
 func (f *Front) ProjectField() {
-	defer qu.Catch()
+	defer qu.Catch() //项目id
 	if f.Method() == "POST" {
-
+		pid := f.GetString("pid")
+		d1 := f.GetString("fields") //配置字段
+		var bObj []map[string]interface{}
+		err := json.Unmarshal([]byte(d1), &bObj)
+		if err != nil {
+			qu.Debug("Json Unmarshal Error")
+			f.ServeJson(map[string]interface{}{"success": false, "msg": "解析数据失败"})
+			return
+		}
+		b := util.Mgo.UpdateById(util.PROJECTCOLLNAME, pid, bson.M{"$set": bson.M{"v_fields": bObj}})
+		if b {
+			f.ServeJson(map[string]interface{}{"success": b, "msg": "保存数据成功"})
+		} else {
+			f.ServeJson(map[string]interface{}{"success": b, "msg": "字段保存失败"})
+		}
 	} else {
-		pid := f.GetString("id") //项目id
+		pid := f.GetString("id")
 		project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, map[string]interface{}{"v_fields": 1})
 		if (*project)["v_fields"] != nil {
-			f.T["p_fields"] = (*project)["v_fields"]
+			fields := util.Copy(util.FieldsArr).([]map[string]interface{})
+			var a1 []string                    // 标注基本字段
+			a2 := make(map[string]interface{}) // 多包、标的物、采购意向、中标候选
+			for _, m := range qu.ObjArrToMapArr((*project)["v_fields"].([]interface{})) {
+				if m["child"] != nil {
+					if qu.ObjToString(m["key"]) == "extend" {
+						m["enable"] = true
+						f.T["diy_fields"] = m["child"]
+					} else {
+						var a []string
+						for _, m2 := range qu.ObjArrToMapArr(m["child"].([]interface{})) {
+							a = append(a, qu.ObjToString(m2["key"]))
+						}
+						a2[qu.ObjToString(m["key"])] = a
+					}
+				} else {
+					a1 = append(a1, qu.ObjToString(m["key"]))
+				}
+			}
+
+			for _, m := range fields {
+				if qu.ObjToString(m["descript"]) == "基本字段" {
+					if len(a1) > 0 {
+						m["enable"] = true
+						s := strings.Join(a1, ",")
+						for _, m2 := range m["child"].([]map[string]interface{}) {
+							if strings.Contains(s, qu.ObjToString(m2["key"])) {
+								m2["enable"] = true
+							}
+						}
+					}
+				} else {
+					if a3 := a2[qu.ObjToString(m["key"])]; a3 != nil {
+						m["enable"] = true
+						for _, m2 := range m["child"].([]map[string]interface{}) {
+							s := strings.Join(a3.([]string), ",")
+							if strings.Contains(s, qu.ObjToString(m2["key"])) {
+								m2["enable"] = true
+							}
+						}
+					} else {
+						continue
+					}
+				}
+			}
+			f.T["fields"] = fields
+		} else {
+			f.T["fields"] = util.FieldsArr
 		}
-		f.T["fields"] = util.FieldsMap
+		f.T["pid"] = pid
 		_ = f.Render("project/project_field.html", &f.T)
 	}
 }

+ 214 - 191
src/front/remark.go

@@ -73,51 +73,57 @@ func (f *Front) RemarkDetail() {
 	did := f.GetString("did")
 	coll := f.GetString("s_sourceinfo")
 	project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, `{"v_fields": 1}`)
-	if len(*project) > 0 {
-		field := make(map[string]bool)
-		vf := (*project)["v_fields"].(map[string]interface{})
-		for k := range vf {
-			field[k] = true
-		}
-		f.T["fields"] = field
-	}
-	qu.Debug(pid, did, coll)
-	rep := getDetail(did, coll)         //获取本条公告的信息
-	f.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
-	f.T["moreInfo"] = rep["moreInfo"]   //更多关联公告信息
+	fs, _ := (*project)["v_fields"].([]interface{})
+	rep := getDetail(did, coll, qu.ObjArrToMapArr(fs)) //获取本条公告的信息
+	f.T["otherInfo"] = rep["otherInfo"]                //展示关联公告信息
+	f.T["moreInfo"] = rep["moreInfo"]                  //更多关联公告信息
 	f.T["pid"] = pid
 	f.T["tid"] = tid
 	f.T["did"] = did
 	f.T["coll"] = coll
 	f.T["info"] = rep["info"]
 	f.T["common"] = rep["common"]
-	f.T["worder"] = rep["worder"]
-	f.T["packs"] = rep["packs"]
-	f.T["packskey"] = rep["packskey"]
-	f.T["ck_pclistag"] = rep["purchasingTag"]
-	f.T["timeplace"] = rep["timeplace"]
-	f.T["purchasinglist"] = rep["purchasinglist"]
-	f.T["procurementlist"] = rep["procurementlist"]
 	f.T["other"] = rep["other"]
-	f.T["PurchasinglistField"] = util.PurchasinglistField
-	f.T["ProcurementlistField"] = util.PurchasinglistField1
-	f.T["WinnerorderField"] = util.WinnerorderField
-	f.T["PackageField"] = util.PackageField
+	f.T["ck_pclistag"] = rep["purchasingTag"]
+	f.T["enbArr"] = rep["enbArr"]
+	if rep["pru"] != nil {
+		m := rep["pru"].(map[string]interface{})
+		f.T["purchasinglist"] = m["purchasinglist"]
+		f.T["pcl_new"] = m["pcl_new"]
+		f.T["PurchasinglistField"] = m["field"]
+	}
+	if rep["proc"] != nil {
+		qu.Debug(rep["proc"])
+		m := rep["proc"].(map[string]interface{})
+		f.T["procurementlist"] = m["procurementlist"]
+		f.T["pcl_new_1"] = m["pcl_new_1"]
+		f.T["ProcurementlistField"] = m["field"]
+	}
+	if rep["pkg"] != nil {
+		m := rep["pkg"].(map[string]interface{})
+		f.T["packs"] = m["packs"]
+		f.T["packskey"] = m["packskey"]
+		f.T["pkg_new"] = m["pkg_new"]
+		f.T["PackageField"] = m["field"]
+	}
+	if rep["wino"] != nil {
+		m := rep["wino"].(map[string]interface{})
+		f.T["worder"] = m["worder"]
+		f.T["worder_new"] = m["worder_new"]
+		f.T["WinnerorderField"] = m["field"]
+	}
 	f.T["topsubtype"] = util.TopSubStypeArr2
 	f.T["ck_purchasinglist"] = rep["ck_purchasinglist"]
 	f.T["ck_package"] = rep["ck_package"]
 	f.T["ck_winnerorder"] = rep["ck_winnerorder"]
-	f.T["worder_new"] = rep["worder_new"]
-	f.T["pcl_new"] = rep["pcl_new"]
-	f.T["pcl_new_1"] = rep["pcl_new_1"]
-	f.T["pkg_new"] = rep["pkg_new"]
 	f.T["keyword"] = rep["matchkey"]
 	f.T["nextid"] = GetNextDataId(did, coll, tid) //下一条id
 	_ = f.Render("project/remark_detail.html", &f.T)
 }
 
-func getDetail(id, coll string) map[string]interface{} {
+func getDetail(id, coll string, fs []map[string]interface{}) map[string]interface{} {
 	rep := map[string]interface{}{}
+	qu.Debug(fs)
 	infoTmp, _ := util.Mgo.FindById(coll, id, ``)
 	rep["s_excp_info"] = (*infoTmp)["s_excp_info"]
 	baseInfo := (*infoTmp)["v_baseinfo"].(map[string]interface{}) //字段值
@@ -137,24 +143,15 @@ func getDetail(id, coll string) map[string]interface{} {
 	}
 	rep["matchkey"] = baseInfo["matchkey"]
 	rep["info"] = baseInfo
-	common, timeplace, other := setExtComMap(baseInfo, bzInfo) //拼装抽取common值
+	common, other, pruM, proM, pkgM, winM, enbArr := setExtComMap(baseInfo, bzInfo, fs)
 	rep["common"] = common
-	rep["timeplace"] = timeplace
 	rep["other"] = other
-	packs, packskey, pkg_new := setPaceMap(baseInfo) //拼装子包信息
-	rep["packs"] = packs
-	rep["packskey"] = packskey
-	rep["pkg_new"] = pkg_new
-	purchasinglist, isNewStatus := setPurchasingMap(baseInfo) //标的物
-	rep["purchasinglist"] = purchasinglist
-	rep["pcl_new"] = isNewStatus
-	purchasinglist_1, isNewStatus1 := setPurchasingMap1(baseInfo) //标的物(采购意向)
-	rep["procurementlist"] = purchasinglist_1
-	rep["pcl_new_1"] = isNewStatus1
-	worder, worder_new := setWorderMap(baseInfo) //中标候选人
-	rep["worder"] = worder
-	rep["worder_new"] = worder_new
+	rep["pkg"] = pkgM                             // 多包信息
+	rep["pru"] = pruM                             //标的物
+	rep["proc"] = proM                            //采购意向
+	rep["wino"] = winM                            //中标候选人
 	otherInfo, moreInfo := setOtherInfo(baseInfo) //处理公告关联信息
+	rep["enbArr"] = enbArr
 	rep["otherInfo"] = otherInfo
 	rep["moreInfo"] = moreInfo
 	//
@@ -177,93 +174,119 @@ func getDetail(id, coll string) map[string]interface{} {
 }
 
 // 拼装抽取common值
-func setExtComMap(info, bzInfo map[string]interface{}) ([]interface{}, []interface{}, []interface{}) {
+func setExtComMap(info, bzInfo map[string]interface{}, fs []map[string]interface{}) ([]interface{}, []interface{},
+	map[string]interface{}, map[string]interface{}, map[string]interface{}, map[string]interface{}, []string) {
+	var common []interface{}             // 基本字段信息
+	var other []interface{}              //自定义字段信息
+	purM := make(map[string]interface{}) // 标的物信息
+	proM := make(map[string]interface{}) // 采购意向信息
+	pkgM := make(map[string]interface{}) // 多包信息
+	winM := make(map[string]interface{}) // 中标候选
+	var enbArr []string                  //标的物信息、采购意向信息、多包信息、中标候选字段隐藏
 	//基本参数
-	common, _ := util.BiaoZhu["common"].([]interface{})
-	for k, tmp := range common {
-		if cp, ok := tmp.(map[string]interface{}); ok {
-			if info[fmt.Sprint(cp["key"])] == nil {
-				cp["value"] = ""
-			} else {
-				if cp["key"] == "subtype" {
-					if info["toptype"] != nil && info["subtype"] != nil {
-						cp["value"] = qu.ObjToString(info["toptype"]) + "-" + qu.ObjToString(info[fmt.Sprint(cp["key"])])
-					} else {
-						cp["value"] = ""
-					}
-				} else {
-					cp["value"] = info[fmt.Sprint(cp["key"])]
+	for _, v := range fs {
+		key := qu.ObjToString(v["key"])
+		if key == "purchasinglist" {
+			if v["child"] != nil {
+				enbArr = append(enbArr, key)
+				child := qu.ObjArrToMapArr(v["child"].([]interface{}))
+				purchasinglist, isNewStatus := setPurchasingMap(info, child)
+				purM["purchasinglist"] = purchasinglist
+				purM["pcl_new"] = isNewStatus
+				var m []map[string]string
+				for _, v := range child {
+					key := qu.ObjToString(v["key"])
+					descript := qu.ObjToString(v["descript"])
+					m = append(m, map[string]string{key: descript})
+				}
+				purM["field"] = m
+			}
+		} else if key == "procurementlist" {
+			if v["child"] != nil {
+				enbArr = append(enbArr, key)
+				child := qu.ObjArrToMapArr(v["child"].([]interface{}))
+				purchasinglist_1, isNewStatus1 := setPurchasingMap1(info, child)
+				qu.Debug(purchasinglist_1, isNewStatus1)
+				proM["procurementlist"] = purchasinglist_1
+				proM["pcl_new_1"] = isNewStatus1
+				var m []map[string]string
+				for _, v := range child {
+					key := qu.ObjToString(v["key"])
+					descript := qu.ObjToString(v["descript"])
+					m = append(m, map[string]string{key: descript})
+				}
+				proM["field"] = m
+			}
+		} else if key == "package" {
+			if v["child"] != nil {
+				enbArr = append(enbArr, key)
+				child := qu.ObjArrToMapArr(v["child"].([]interface{}))
+				packs, packskey, pkg_new := setPaceMap(info, child)
+				pkgM["packs"] = packs
+				pkgM["packskey"] = packskey
+				pkgM["pkg_new"] = pkg_new
+				var m []map[string]string
+				for _, v := range child {
+					key := qu.ObjToString(v["key"])
+					descript := qu.ObjToString(v["descript"])
+					m = append(m, map[string]string{key: descript})
+				}
+				pkgM["field"] = m
+			}
+		} else if key == "winnerorder" {
+			if v["child"] != nil {
+				enbArr = append(enbArr, key)
+				child := qu.ObjArrToMapArr(v["child"].([]interface{}))
+				worder, worderNew := setWorderMap(info, child)
+				winM["worder"] = worder
+				winM["worder_new"] = worderNew
+				var m []map[string]string
+				for _, v := range child {
+					key := qu.ObjToString(v["key"])
+					descript := qu.ObjToString(v["descript"])
+					m = append(m, map[string]string{key: descript})
+				}
+				winM["field"] = m
+			}
+		} else if key == "extend" {
+			if v["child"] != nil {
+				enbArr = append(enbArr, key)
+				for _, tm := range qu.ObjArrToMapArr(v["child"].([]interface{})) {
+					tm["status"] = "1"
+					tm["value"] = info[qu.ObjToString(tm["key"])]
+					other = append(other, tm)
 				}
 			}
-			if bzInfo[fmt.Sprint(cp["key"])] == nil {
-				cp["status"] = "-1"
-			} else {
-				cp["status"] = "1"
-			}
-			common[k] = cp
-		}
-	}
-	//时间地点信息
-	timeplace, _ := util.BiaoZhu["timeplace"].([]interface{})
-	for k, tmp := range timeplace {
-		if tp, ok := tmp.(map[string]interface{}); ok {
-			if info[fmt.Sprint(tp["key"])] == nil {
-				tp["value"] = ""
-			} else {
-				key := tp["key"]
-				if key == "bidopentime" || key == "publishtime" || key == "bidendtime" || key == "project_startdate" || key == "project_completedate" {
-					tmpTime := qu.Int64All(info[fmt.Sprint(tp["key"])])
-					if tmpTime > 0 {
-						tp["value"] = qu.FormatDateByInt64(&tmpTime, qu.Date_Full_Layout)
-					} else {
-						tp["value"] = info[qu.ObjToString(tp["key"])]
-					}
+		} else {
+			if key == "bidopentime" || key == "publishtime" || key == "bidendtime" || key == "project_startdate" ||
+				key == "project_completedate" || key == "signaturedate" {
+				tmpTime := qu.Int64All(info[key])
+				if tmpTime > 0 {
+					v["value"] = qu.FormatDateByInt64(&tmpTime, qu.Date_Full_Layout)
 				} else {
-					tp["value"] = info[fmt.Sprint(tp["key"])]
+					v["value"] = info[key]
 				}
-			}
-			if bzInfo[fmt.Sprint(tp["key"])] == nil {
-				tp["status"] = "-1"
-			} else {
-				tp["status"] = "1"
-			}
-			timeplace[k] = tp
-		}
-	}
-	//other信息
-	other, _ := util.BiaoZhu["other"].([]interface{})
-	for k, tmp := range other {
-		if cp, ok := tmp.(map[string]interface{}); ok {
-			if info[fmt.Sprint(cp["key"])] == nil {
-				cp["value"] = ""
-			} else {
-				if cp["key"] == "signaturedate" {
-					bidopentime := qu.Int64All(info[fmt.Sprint(cp["key"])])
-					if bidopentime > 0 {
-						cp["value"] = qu.FormatDateByInt64(&bidopentime, qu.Date_Full_Layout)
-					} else {
-						cp["value"] = info[qu.ObjToString(cp["key"])]
-					}
+			} else if key == "subtype" {
+				if info["toptype"] != nil && info["subtype"] != nil {
+					v["value"] = qu.ObjToString(info["toptype"]) + "-" + qu.ObjToString(info[fmt.Sprint(v["key"])])
 				} else {
-					cp["value"] = info[fmt.Sprint(cp["key"])]
+					v["value"] = ""
 				}
-			}
-			//log.Println(cp)
-			if bzInfo[fmt.Sprint(cp["key"])] == nil {
-				cp["status"] = "-1"
 			} else {
-				cp["status"] = "1"
+				v["value"] = info[key]
 			}
-			other[k] = cp
+			v["status"] = "1"
+			common = append(common, v)
 		}
 	}
-	return common, timeplace, other
+	if len(common) > 0 {
+		enbArr = append(enbArr, "common")
+	}
+	return common, other, purM, proM, pkgM, winM, enbArr
 }
 
 // 拼装子包信息
-func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string, []bool) {
-	var confpack []interface{}
-	confpack, _ = util.BiaoZhu["package"].([]interface{})
+func setPaceMap(info map[string]interface{}, confpack []map[string]interface{}) ([]map[string]interface{}, []string, []bool) {
 	//bzpack := bzInfo["package"].(map[string]interface{})
 	packs := map[string]map[string]interface{}{}
 	var sortpackskey []string
@@ -271,8 +294,7 @@ func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string
 	if packages, ok := info["package"].(map[string]interface{}); ok && len(packages) > 0 {
 		for k, tmpackage := range packages { //遍历分包
 			if tmppack, ok := tmpackage.(map[string]interface{}); ok {
-				//isNew, _ := tmppack["isnew"].(bool)
-				isNew := false
+				isNew, _ := tmppack["isnew"].(bool)
 				status := "-1"
 				if tmppack["package_son"] != nil {
 					status = "1"
@@ -281,7 +303,6 @@ func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string
 				sortpackskey = append(sortpackskey, k)
 				var pack []interface{}
 				for _, cpack := range confpack {
-					cpack, _ := cpack.(map[string]interface{})
 					key := qu.ObjToString(cpack["key"])
 					if key == "winner" || key == "bidamount" { //中标单位和中标金额winner_all特殊处理
 						continue
@@ -357,8 +378,7 @@ func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string
 }
 
 // 拼装标的物
-func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
-	purchasinglist, _ := util.BiaoZhu["purchasinglist"].([]interface{})
+func setPurchasingMap(info map[string]interface{}, pur []map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	var purchasinglists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的
 	var isNewAndStatus []map[string]interface{}
@@ -374,8 +394,7 @@ func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]
 				//isNewPcl = append(isNewPcl, isNew)
 				isNewAndStatus = append(isNewAndStatus, map[string]interface{}{"isnew": isNew, "status": status})
 				var pcls []interface{}
-				for _, ps := range purchasinglist {
-					ps, _ := ps.(map[string]interface{})
+				for _, ps := range pur {
 					value := pcl[qu.ObjToString(ps["key"])]
 					if value == nil {
 						value = ""
@@ -401,8 +420,7 @@ func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]
 }
 
 // 采购意向
-func setPurchasingMap1(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
-	procurementlist, _ := util.BiaoZhu["procurementlist"].([]interface{})
+func setPurchasingMap1(info map[string]interface{}, pro []map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	var procurementlists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的
 	var isNewAndStatus []map[string]interface{}
@@ -418,8 +436,7 @@ func setPurchasingMap1(info map[string]interface{}) ([]interface{}, []map[string
 				//isNewPcl = append(isNewPcl, isNew)
 				isNewAndStatus = append(isNewAndStatus, map[string]interface{}{"isnew": isNew, "status": status})
 				var pcls []interface{}
-				for _, ps := range procurementlist {
-					ps, _ := ps.(map[string]interface{})
+				for _, ps := range pro {
 					value := pcl[qu.ObjToString(ps["key"])]
 					if value == nil {
 						value = ""
@@ -445,9 +462,8 @@ func setPurchasingMap1(info map[string]interface{}) ([]interface{}, []map[string
 }
 
 // 拼装中标候选人
-func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
+func setWorderMap(info map[string]interface{}, winnerorder []map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	//基本参数--中标候选人
-	winnerorder, _ := util.BiaoZhu["winnerorder"].([]interface{})
 	worders := []interface{}{}
 	isNewAndStatus := []map[string]interface{}{}
 	if tmpwds, ok := info["winnerorder"].([]interface{}); ok {
@@ -462,7 +478,6 @@ func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]inte
 				isNewAndStatus = append(isNewAndStatus, map[string]interface{}{"isnew": isNew, "status": status})
 				wds := []interface{}{}
 				for _, cp := range winnerorder {
-					cp, _ := cp.(map[string]interface{})
 					value := wd[qu.ObjToString(cp["key"])]
 					if value == nil {
 						value = ""
@@ -971,18 +986,10 @@ func (f *Front) CheckDetail() {
 	did := f.GetString("did")
 	coll := f.GetString("s_sourceinfo")
 	project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, `{"v_fields": 1}`)
-	if len(*project) > 0 {
-		field := make(map[string]bool)
-		vf := (*project)["v_fields"].(map[string]interface{})
-		for k := range vf {
-			field[k] = true
-		}
-		f.T["fields"] = field
-	}
-	qu.Debug(pid, did, coll)
-	rep := getDetail(did, coll)         //获取本条公告的信息
-	f.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
-	f.T["moreInfo"] = rep["moreInfo"]   //更多关联公告信息
+	fs, _ := (*project)["v_fields"].([]interface{})
+	rep := getDetail(did, coll, qu.ObjArrToMapArr(fs)) //获取本条公告的信息
+	f.T["otherInfo"] = rep["otherInfo"]                //展示关联公告信息
+	f.T["moreInfo"] = rep["moreInfo"]                  //更多关联公告信息
 	f.T["s_excp_info"] = rep["s_excp_info"]
 	f.T["pid"] = pid
 	f.T["tid"] = tid
@@ -990,24 +997,45 @@ func (f *Front) CheckDetail() {
 	f.T["coll"] = coll
 	f.T["info"] = rep["info"]
 	f.T["common"] = rep["common"]
+	f.T["other"] = rep["other"]
+	f.T["ck_pclistag"] = rep["purchasingTag"]
+	f.T["enbArr"] = rep["enbArr"]
+	if rep["pru"] != nil {
+		m := rep["pru"].(map[string]interface{})
+		f.T["purchasinglist"] = m["purchasinglist"]
+		f.T["pcl_new"] = m["pcl_new"]
+		f.T["PurchasinglistField"] = m["field"]
+	}
+	if rep["proc"] != nil {
+		qu.Debug(rep["proc"])
+		m := rep["proc"].(map[string]interface{})
+		f.T["procurementlist"] = m["procurementlist"]
+		f.T["pcl_new_1"] = m["pcl_new_1"]
+		f.T["ProcurementlistField"] = m["field"]
+	}
+	if rep["pkg"] != nil {
+		m := rep["pkg"].(map[string]interface{})
+		f.T["packs"] = m["packs"]
+		f.T["packskey"] = m["packskey"]
+		f.T["pkg_new"] = m["pkg_new"]
+		f.T["PackageField"] = m["field"]
+	}
+	if rep["wino"] != nil {
+		m := rep["wino"].(map[string]interface{})
+		f.T["worder"] = m["worder"]
+		f.T["worder_new"] = m["worder_new"]
+		f.T["WinnerorderField"] = m["field"]
+	}
+	f.T["topsubtype"] = util.TopSubStypeArr2
+	f.T["ck_purchasinglist"] = rep["ck_purchasinglist"]
+	f.T["ck_package"] = rep["ck_package"]
+	f.T["ck_winnerorder"] = rep["ck_winnerorder"]
 	f.T["worder"] = rep["worder"]
 	f.T["packs"] = rep["packs"]
 	f.T["packskey"] = rep["packskey"]
-	f.T["ck_pclistag"] = rep["purchasingTag"]
 	f.T["timeplace"] = rep["timeplace"]
 	f.T["purchasinglist"] = rep["purchasinglist"]
-	f.T["other"] = rep["other"]
-	f.T["PurchasinglistField"] = util.PurchasinglistField
-	f.T["PurchasinglistField1"] = util.PurchasinglistField1
-	f.T["WinnerorderField"] = util.WinnerorderField
-	f.T["PackageField"] = util.PackageField
 	f.T["topsubtype"] = util.TopSubStypeArr2
-	f.T["ck_purchasinglist"] = rep["ck_purchasinglist"]
-	f.T["ck_package"] = rep["ck_package"]
-	f.T["ck_winnerorder"] = rep["ck_winnerorder"]
-	f.T["worder_new"] = rep["worder_new"]
-	f.T["pcl_new"] = rep["pcl_new"]
-	f.T["pkg_new"] = rep["pkg_new"]
 	f.T["nextid"] = GetNextDataId1(did, coll, tid, qu.ObjToString(f.GetSession("check"))) //下一条id
 	_ = f.Render("project/check_detail.html", &f.T)
 }
@@ -1048,8 +1076,6 @@ func (f *Front) CheckSave() {
 		switch title {
 		case "基本字段":
 			MarkBase(content, tagSet, baseSet, baseUnset)
-		case "时间地点":
-			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 		case "采购意向信息":
@@ -1058,11 +1084,12 @@ func (f *Front) CheckSave() {
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
 			MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-		case "其余信息":
+		case "自定义字段":
 			MarkOther(content, tagSet, baseSet, baseUnset)
 		}
 	} else {
-		for j, val := range obj {
+		for _, val := range obj {
+			title := qu.ObjToString(obj[0]["title"])
 			content, ok := val["content"].([]interface{})
 			status := qu.IntAll(val["status"])
 			if !ok {
@@ -1070,19 +1097,18 @@ func (f *Front) CheckSave() {
 				continue
 			}
 			istag, _ := val["checkAllTag"].(bool)
-			if j == 0 { //基本信息
+			switch title {
+			case "基本字段":
 				MarkBase(content, tagSet, baseSet, baseUnset)
-			} else if j == 1 { //时间地点
-				MarkTimePlace(content, tagSet, baseSet, baseUnset)
-			} else if j == 2 { //标的物
+			case "标的信息":
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //采购意向
+			case "采购意向信息":
 				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 4 { //多包
+			case "多包信息":
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 5 { //候选人
+			case "中标候选人信息":
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-			} else { //其余信息
+			case "自定义字段":
 				MarkOther(content, tagSet, baseSet, baseUnset)
 			}
 		}
@@ -1689,8 +1715,6 @@ func (f *Front) JyUserDataMark() {
 		switch title {
 		case "基本字段":
 			MarkBase(content, tagSet, baseSet, baseUnset)
-		case "时间地点":
-			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 		case "采购意向信息":
@@ -1699,11 +1723,12 @@ func (f *Front) JyUserDataMark() {
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
 			MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-		case "其余信息":
+		case "自定义字段":
 			MarkOther(content, tagSet, baseSet, baseUnset)
 		}
 	} else {
-		for j, val := range obj {
+		for _, val := range obj {
+			title := qu.ObjToString(val["title"])
 			content, ok := val["content"].([]interface{})
 			status := qu.IntAll(val["status"])
 			if !ok {
@@ -1711,19 +1736,18 @@ func (f *Front) JyUserDataMark() {
 				continue
 			}
 			istag, _ := val["checkAllTag"].(bool)
-			if j == 0 { //基本信息
+			switch title {
+			case "基本字段":
 				MarkBase(content, tagSet, baseSet, baseUnset)
-			} else if j == 1 { //时间地点
-				MarkTimePlace(content, tagSet, baseSet, baseUnset)
-			} else if j == 2 { //标的物
+			case "标的信息":
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //采购意向
+			case "采购意向信息":
 				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 4 { //多包
+			case "多包信息":
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 5 { //候选人
+			case "中标候选人信息":
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-			} else { //其余信息
+			case "自定义字段":
 				MarkOther(content, tagSet, baseSet, baseUnset)
 			}
 		}
@@ -1852,8 +1876,6 @@ func (f *Front) UserDataMark() {
 		switch title {
 		case "基本字段":
 			MarkBase(content, tagSet, baseSet, baseUnset)
-		case "时间地点":
-			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 		case "采购意向信息":
@@ -1862,11 +1884,13 @@ func (f *Front) UserDataMark() {
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
 			MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-		case "其余信息":
+		case "自定义字段":
 			MarkOther(content, tagSet, baseSet, baseUnset)
 		}
 	} else {
-		for j, val := range obj {
+		for _, val := range obj {
+			qu.Debug("---", val)
+			title := qu.ObjToString(val["title"])
 			content, ok := val["content"].([]interface{})
 			status := qu.IntAll(val["status"])
 			if !ok {
@@ -1874,19 +1898,18 @@ func (f *Front) UserDataMark() {
 				continue
 			}
 			istag, _ := val["checkAllTag"].(bool)
-			if j == 0 { //基本信息
+			switch title {
+			case "基本字段":
 				MarkBase(content, tagSet, baseSet, baseUnset)
-			} else if j == 1 { //时间地点
-				MarkTimePlace(content, tagSet, baseSet, baseUnset)
-			} else if j == 2 { //标的物
+			case "标的信息":
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //采购意向
+			case "采购意向信息":
 				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 4 { //多包
+			case "多包信息":
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 5 { //候选人
+			case "中标候选人信息":
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
-			} else { //其余信息
+			case "自定义字段":
 				MarkOther(content, tagSet, baseSet, baseUnset)
 			}
 		}
@@ -2380,7 +2403,7 @@ func MarkOther(content []interface{}, tagSet, baseSet, baseUnset map[string]inte
 					}
 					if status == 2 { //新增、修改、删除
 						input := tmpMap["input"] //值
-						if key == "isppp" || key == "contract_guarantee" || key == "bid_guarantee" {
+						if tmpMap["selectArr"] != nil && tmpMap["select"] != nil {
 							input = tmpMap["select"]
 						}
 						if input == "" {

+ 80 - 120
src/util/config.go

@@ -1,6 +1,7 @@
 package util
 
 import (
+	"go.mongodb.org/mongo-driver/bson"
 	"go.mongodb.org/mongo-driver/mongo"
 	"mongodb"
 	qu "qfw/util"
@@ -13,35 +14,28 @@ import (
 //const JYDATATODB = "jyqyfw"
 
 var (
-	Sysconfig            map[string]interface{} //配置文件
-	Quaconfig            map[string]interface{} //质量配置文件
-	Es                   *Elastic
-	Mgo                  *mongodb.MongodbSim
-	AllToColl            string              //所有标注数据汇总表
-	Password             string              //默认登陆密码
-	MgoB                 *mongodb.MongodbSim //bidding
-	BidColl1             string
-	BidColl2             string
-	MgoE                 *mongodb.MongodbSim //extract
-	ExtColl1             string
-	ExtColl2             string
-	ProjectColl          string
-	MgoJy                *mongodb.MongodbSim //jy
-	JyHistory            string
-	JyUser               string
-	CustomerFieldMap_EH  map[string]string
-	CustomerFieldMap_HE  map[string]string
-	BiaoZhu              map[string]interface{}
-	PurchasinglistField  []map[string]string
-	PurchasinglistField1 []map[string]string
-	PackageField         []map[string]string
-	WinnerorderField     []map[string]string
-	AllFieldArr          []map[string]string
-	TopSubStypeArr       []string
-	TopSubStypeArr2      []string
-	FieldsMap            map[string]interface{}
-	DataTypeArr          []string
-	DataTypeMap          map[string]interface{} //项目中数据类型
+	Sysconfig           map[string]interface{} //配置文件
+	Quaconfig           map[string]interface{} //质量配置文件
+	Es                  *Elastic
+	Mgo                 *mongodb.MongodbSim
+	AllToColl           string              //所有标注数据汇总表
+	Password            string              //默认登陆密码
+	MgoB                *mongodb.MongodbSim //bidding
+	BidColl1            string
+	BidColl2            string
+	MgoE                *mongodb.MongodbSim //extract
+	ExtColl1            string
+	ExtColl2            string
+	ProjectColl         string
+	MgoJy               *mongodb.MongodbSim //jy
+	JyHistory           string
+	JyUser              string
+	CustomerFieldMap_EH map[string]string
+	CustomerFieldMap_HE map[string]string
+	AllFieldArr         []map[string]string
+	TopSubStypeArr      []string
+	TopSubStypeArr2     []string
+	FieldsArr           []map[string]interface{}
 )
 
 var (
@@ -151,79 +145,6 @@ func InitConfig() {
 		CustomerFieldMap_EH[val] = k
 	}
 
-	BiaoZhu = Sysconfig["biaozhu"].(map[string]interface{})
-	tmpAllField := Arr{}
-	AllFieldMap := map[string]string{}
-	AllFieldArr = []map[string]string{}
-	common := BiaoZhu["common"].([]interface{})
-	timeplace := BiaoZhu["timeplace"].([]interface{})
-	other := BiaoZhu["other"].([]interface{})
-	for _, com := range common {
-		tmp := com.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		if key == "" {
-			continue
-		}
-		descript := qu.ObjToString(tmp["descript"])
-		tmpAllField = append(tmpAllField, descript)
-		AllFieldMap[descript] = key
-	}
-	for _, tp := range timeplace {
-		tmp := tp.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		tmpAllField = append(tmpAllField, descript)
-		AllFieldMap[descript] = key
-	}
-	for _, o := range other {
-		tmp := o.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		tmpAllField = append(tmpAllField, descript)
-		AllFieldMap[descript] = key
-	}
-	tmpAllField = append(tmpAllField, "标的物列表")
-	tmpAllField = append(tmpAllField, "多包")
-	tmpAllField = append(tmpAllField, "中标候选人")
-	AllFieldMap["标的物列表"] = "purchasinglist"
-	AllFieldMap["多包"] = "package"
-	AllFieldMap["中标候选人"] = "winnerorder"
-	sort.Sort(tmpAllField)
-	for _, f := range tmpAllField {
-		AllFieldArr = append(AllFieldArr, map[string]string{AllFieldMap[f]: f})
-	}
-	PurchasinglistField = []map[string]string{}
-	pcls, _ := BiaoZhu["purchasinglist"].([]interface{})
-	for _, pcl := range pcls {
-		tmp := pcl.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		PurchasinglistField = append(PurchasinglistField, map[string]string{key: descript})
-	}
-	PurchasinglistField1 = []map[string]string{}
-	pcls1, _ := BiaoZhu["procurementlist"].([]interface{})
-	for _, pcl := range pcls1 {
-		tmp := pcl.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		PurchasinglistField1 = append(PurchasinglistField1, map[string]string{key: descript})
-	}
-	PackageField = []map[string]string{}
-	pkgs, _ := BiaoZhu["package"].([]interface{})
-	for _, pkg := range pkgs {
-		tmp := pkg.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		PackageField = append(PackageField, map[string]string{key: descript})
-	}
-	WinnerorderField = []map[string]string{}
-	wods, _ := BiaoZhu["winnerorder"].([]interface{})
-	for _, wod := range wods {
-		tmp := wod.(map[string]interface{})
-		key := qu.ObjToString(tmp["key"])
-		descript := qu.ObjToString(tmp["descript"])
-		WinnerorderField = append(WinnerorderField, map[string]string{key: descript})
-	}
 	//公告类型
 	types := Sysconfig["topsubtype"].(map[string]interface{})
 	for top, v := range types {
@@ -233,36 +154,75 @@ func InitConfig() {
 		}
 	}
 	TopSubStypeArr2 = TopSubStypeArr
-	DataTypeMap = Sysconfig["dataType"].(map[string]interface{})
-	for k := range DataTypeMap {
-		DataTypeArr = append(DataTypeArr, k)
-	}
 	info, _ := Mgo.Find("v_field", nil, nil, nil, false, -1, -1)
-	FieldsMap = make(map[string]interface{})
-	purMap := make(map[string]interface{})
-	proMap := make(map[string]interface{})
-	pkgMap := make(map[string]interface{})
-	wnMap := make(map[string]interface{})
+	AllFieldMap := map[string]string{}
+	AllFieldArr = []map[string]string{}
+	var bArr []map[string]interface{}
+	var purArr []map[string]interface{}
+	var proArr []map[string]interface{}
+	var pkgArr []map[string]interface{}
+	var wnArr []map[string]interface{}
 	for _, m := range *info {
+		m1 := make(map[string]interface{})
 		if qu.IntAll(m["f_level"]) == 1 {
-			FieldsMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+			m1["key"] = m["s_code"]
+			m1["descript"] = m["s_name"]
+			m1["enable"] = false
+			m1["ftype"] = m["s_ftype"]
+			m1["stype"] = m["s_type"]
+			AllFieldMap[qu.ObjToString(m["s_name"])] = qu.ObjToString(m["s_code"])
+			bArr = append(bArr, m1)
 		} else {
 			pstr := qu.ObjToString(m["s_parent"])
 			if pstr == "purchasinglist" {
-				purMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+				m1["key"] = m["s_code"]
+				m1["descript"] = m["s_name"]
+				m1["enable"] = false
+				m1["ftype"] = m["s_ftype"]
+				m1["stype"] = m["s_type"]
+				purArr = append(purArr, m1)
 			} else if pstr == "procurementlist" {
-				proMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+				m1["key"] = m["s_code"]
+				m1["descript"] = m["s_name"]
+				m1["enable"] = false
+				m1["ftype"] = m["s_ftype"]
+				m1["stype"] = m["s_type"]
+				proArr = append(proArr, m1)
 			} else if pstr == "package" {
-				pkgMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+				m1["key"] = m["s_code"]
+				m1["descript"] = m["s_name"]
+				m1["enable"] = false
+				m1["ftype"] = m["s_ftype"]
+				m1["stype"] = m["s_type"]
+				pkgArr = append(pkgArr, m1)
 			} else if pstr == "winnerorder" {
-				wnMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+				m1["key"] = m["s_code"]
+				m1["descript"] = m["s_name"]
+				m1["enable"] = false
+				m1["ftype"] = m["s_ftype"]
+				m1["stype"] = m["s_type"]
+				wnArr = append(wnArr, m1)
 			}
 		}
 	}
-	FieldsMap["purchasinglist"] = purMap
-	FieldsMap["procurementlist"] = proMap
-	FieldsMap["package"] = pkgMap
-	FieldsMap["winnerorder"] = wnMap
+	FieldsArr = append(FieldsArr, bson.M{"descript": "基本字段", "child": bArr})
+	FieldsArr = append(FieldsArr, bson.M{"descript": "标的物信息", "key": "purchasinglist", "child": purArr})
+	FieldsArr = append(FieldsArr, bson.M{"descript": "采购意向信息", "key": "procurementlist", "child": proArr})
+	FieldsArr = append(FieldsArr, bson.M{"descript": "多包信息", "key": "package", "child": pkgArr})
+	FieldsArr = append(FieldsArr, bson.M{"descript": "中标候选信息", "key": "winnerorder", "child": wnArr})
+	AllFieldMap["标的物列表"] = "purchasinglist"
+	AllFieldMap["多包"] = "package"
+	AllFieldMap["中标候选人"] = "winnerorder"
+
+	tmpAllField := Arr{}
+	tmpAllField = append(tmpAllField, "标的物列表")
+	tmpAllField = append(tmpAllField, "多包")
+	tmpAllField = append(tmpAllField, "中标候选人")
+
+	sort.Sort(tmpAllField)
+	for _, f := range tmpAllField {
+		AllFieldArr = append(AllFieldArr, map[string]string{AllFieldMap[f]: f})
+	}
 	initQuaConfig()
 }
 

+ 119 - 0
src/util/deepcopy.go

@@ -0,0 +1,119 @@
+package util
+
+import (
+	"reflect"
+	"time"
+)
+
+// Interface for delegating copy process to type
+type Interface interface {
+	DeepCopy() interface{}
+}
+
+// Iface is an alias to Copy; this exists for backwards compatibility reasons.
+func Iface(iface interface{}) interface{} {
+	return Copy(iface)
+}
+
+// Copy creates a deep copy of whatever is passed to it and returns the copy
+// in an interface{}.  The returned value will need to be asserted to the
+// correct type.
+func Copy(src interface{}) interface{} {
+	if src == nil {
+		return nil
+	}
+
+	// Make the interface a reflect.Value
+	original := reflect.ValueOf(src)
+
+	// Make a copy of the same type as the original.
+	cpy := reflect.New(original.Type()).Elem()
+
+	// Recursively copy the original.
+	copyRecursive(original, cpy)
+
+	// Return the copy as an interface.
+	return cpy.Interface()
+}
+
+// copyRecursive does the actual copying of the interface. It currently has
+// limited support for what it can handle. Add as needed.
+func copyRecursive(original, cpy reflect.Value) {
+	// check for implement deepcopy.Interface
+	if original.CanInterface() {
+		if copier, ok := original.Interface().(Interface); ok {
+			cpy.Set(reflect.ValueOf(copier.DeepCopy()))
+			return
+		}
+	}
+
+	// handle according to original's Kind
+	switch original.Kind() {
+	case reflect.Ptr:
+		// Get the actual value being pointed to.
+		originalValue := original.Elem()
+
+		// if  it isn't valid, return.
+		if !originalValue.IsValid() {
+			return
+		}
+		cpy.Set(reflect.New(originalValue.Type()))
+		copyRecursive(originalValue, cpy.Elem())
+
+	case reflect.Interface:
+		// If this is a nil, don't do anything
+		if original.IsNil() {
+			return
+		}
+		// Get the value for the interface, not the pointer.
+		originalValue := original.Elem()
+
+		// Get the value by calling Elem().
+		copyValue := reflect.New(originalValue.Type()).Elem()
+		copyRecursive(originalValue, copyValue)
+		cpy.Set(copyValue)
+
+	case reflect.Struct:
+		t, ok := original.Interface().(time.Time)
+		if ok {
+			cpy.Set(reflect.ValueOf(t))
+			return
+		}
+		// Go through each field of the struct and copy it.
+		for i := 0; i < original.NumField(); i++ {
+			// The Type's StructField for a given field is checked to see if StructField.PkgPath
+			// is set to determine if the field is exported or not because CanSet() returns false
+			// for settable fields.  I'm not sure why.  -mohae
+			if original.Type().Field(i).PkgPath != "" {
+				continue
+			}
+			copyRecursive(original.Field(i), cpy.Field(i))
+		}
+
+	case reflect.Slice:
+		if original.IsNil() {
+			return
+		}
+		// Make a new slice and copy each element.
+		cpy.Set(reflect.MakeSlice(original.Type(), original.Len(), original.Cap()))
+		for i := 0; i < original.Len(); i++ {
+			copyRecursive(original.Index(i), cpy.Index(i))
+		}
+
+	case reflect.Map:
+		if original.IsNil() {
+			return
+		}
+		cpy.Set(reflect.MakeMap(original.Type()))
+		for _, key := range original.MapKeys() {
+			originalValue := original.MapIndex(key)
+			copyValue := reflect.New(originalValue.Type()).Elem()
+			copyRecursive(originalValue, copyValue)
+			copyKey := Copy(key.Interface())
+			cpy.SetMapIndex(reflect.ValueOf(copyKey), copyValue)
+		}
+
+	default:
+		cpy.Set(original)
+	}
+}

+ 4 - 1
src/web/res/dist/css/project_field.css

@@ -41,6 +41,7 @@
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
+    padding: 0 80px;
 }
 .switch-item--group::before {
     content: attr(data-type);
@@ -68,10 +69,12 @@
     display: flex;
     flex-direction: row;
     align-items: center;
-    margin: 6px;
+    margin: 10px 20px;
     padding: 8px;
     border: 1px solid #eee;
     border-radius: 6px;
+    width: 20%;
+    justify-content: space-between;
 }
 .switch-item--label {
     display: flex;

+ 21 - 107
src/web/templates/project/check_detail.html

@@ -281,7 +281,7 @@
                                                 <div v-for="(uin, uindex) of two.uInput" class="input-box"
                                                      :key="uin.title">
                                                     <div class="label" v-if="uin.selectArr">
-                                                        <span><span v-if="allCheckFields[uin.key]">*</span>[[uin.title]]&nbsp;:&nbsp;</span>
+                                                        <span>[[uin.title]]&nbsp;:&nbsp;</span>
                                                         <select v-model="uin.select"
                                                                 @change="focusFn(uin, oindex,index,uindex, two, one)">
                                                             <option disabled value="">请选择</option>
@@ -299,7 +299,7 @@
                                                         </div>
                                                     </div>
                                                     <div class="label" v-else :title="uin.input">
-                                                        <span @click="goText(uin.title)"><span v-if="allCheckFields[uin.key]" style="color: red">*</span>[[uin.title]]&nbsp;:&nbsp;</span>
+                                                        <span @click="goText(uin.title)">[[uin.title]]&nbsp;:&nbsp;</span>
                                                         <input type="text" v-model="uin.input"
                                                                @focus="goText(uin.input)" @click="goText(uin.input)"
                                                                @blur="focusFn(uin, oindex, index, uindex,two,one)">
@@ -406,8 +406,6 @@
     let pid = {{ .T.pid }}      // 项目id
     let tid = {{ .T.tid }}
     let coll = {{ .T.coll }}    // 表名
-    var allCheckFields = {{ .T.fields }}          //本次需标注的所有字段
-    console.log(allCheckFields)
     var moreInfo = {{ .T.moreInfo }}            // 更多关联信息
     var otherInfo = {{ .T.otherInfo }}          //公告关联信息
 
@@ -416,8 +414,6 @@
     let package_status = {{ .T.ck_package }}                //包标记
     let winneroder_status = {{ .T.ck_winnerorder }}         //中标候选人标记
 
-    console.log({{ .T.s_excp_info }})
-
     // 页面数据
     var pageDataMap = {
         '原文': {
@@ -434,76 +430,12 @@
         },
     }
 
-    //快捷键
-    $(document).keydown(function (event) {
-        if (!event.shiftKey) {
-            var text = getSelectedContents();//获取选中文本
-            if (!text.trim().length) {
-                return
-            }
-        }
-        if (event.keyCode === 82) {//项目名称快捷键r
-            if (event.shiftKey) {
-                app.changeBaseValue(0, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(0, text, 2)//填充
-            }
-        } else if (event.keyCode === 81) {//省份快捷键q
-            if (event.shiftKey) {
-                app.changeBaseValue(1, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(1, text, 2)//填充
-            }
-        } else if (event.keyCode === 84) {//项目编号快捷键t
-            if (event.shiftKey) {
-                app.changeBaseValue(2, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(2, text, 2)//填充
-            }
-        } else if (event.keyCode === 87) {//城市快捷键w
-            if (event.shiftKey) {
-                app.changeBaseValue(3, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(3, text, 2)//填充
-            }
-        } else if (event.keyCode === 69) {//区县快捷键e
-            if (event.shiftKey) {
-                app.changeBaseValue(5, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(5, text, 2)//填充
-            }
-        } else if (event.keyCode === 65) {//采购单位快捷键a
-            if (event.shiftKey) {
-                app.changeBaseValue(6, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(6, text, 2)//填充
-            }
-        } else if (event.keyCode === 90) {//预算快捷键z
-            if (event.shiftKey) {
-                app.changeBaseValue(7, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(7, text, 2)//填充
-            }
-        } else if (event.keyCode === 83) {//代理机构快捷键s
-            if (event.shiftKey) {
-                app.changeBaseValue(8, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(8, text, 2)//填充
-            }
-        } else if (event.keyCode === 88) {//中标金额快捷键x
-            if (event.shiftKey) {
-                app.changeBaseValue(9, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(9, text, 2)//填充
-            }
-        } else if (event.keyCode === 68) {//中标单位快捷键d
-            if (event.shiftKey) {
-                app.changeBaseValue(10, '', 2) //删除对应文本
-            } else {
-                app.changeBaseValue(10, text, 2)//填充
-            }
-        }
-    });
+    // 是否需要显示 Group
+    var canShowGroupsList = []
+    var enbArr = {{ .T.enbArr }}
+    if (enbArr) {
+        enbArr.forEach(v => canShowGroupsList.push(v))
+    }
 
     //获取鼠标选中的文本
     function getSelectedContents() {
@@ -566,19 +498,8 @@
         }
         uInput[k] = tmp
     }
-    //时间地点
-    var timeplace = {{ .T.timeplace }}
-    var tpInput = [];
-    for (k in timeplace) {
-        var tmp = {}
-        tmp.title = timeplace[k].descript
-        tmp.input = timeplace[k].value
-        tmp.key = timeplace[k].key
-        tmp.status = timeplace[k].status
-        tpInput[k] = tmp
-    }
 
-    //其他信息
+    //自定义字段
     var other = {{ .T.other }}
     var otherInput = [];
     for (k in other) {
@@ -587,9 +508,9 @@
         tmp.input = other[k].value
         tmp.key = other[k].key
         tmp.status = other[k].status
-        if (other[k].key === "isppp" || other[k].key === "contract_guarantee" || other[k].key === "bid_guarantee") {
+        if (other[k].stype === "select") {
             tmp.select = other[k].value
-            tmp.selectArr = ['是', '否']
+            tmp.selectArr = other[k].values
         }
         otherInput[k] = tmp
     }
@@ -782,11 +703,12 @@
             pfInput.push(tempNode)
         }
     }
+    let einfo = {{ .T.s_excp_info }}
     var app = new Vue({
         el: '#app',
         delimiters: ["[[", "]]"],
         data: {
-            titleDesc: {{ .T.s_excp_info }},
+            titleDesc: einfo,
             activeLabel: '原文',
             nowLabel: ['原文'],
             otherInfo: otherInfo,
@@ -799,11 +721,11 @@
             // pageHtml: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
             pageHtml: '{{ .T.info.detail }}',
             showPop: false,
-            allCheckFields: allCheckFields,
             editData:[{
                 title: '基本字段',
                 show: true,
                 status: "1",
+                key: 'common',
                 content: [{
                     title: '',
                     show: true,
@@ -812,17 +734,6 @@
                     uInput: uInput
                     //content: c_content
                 }]
-            }, {
-                title: '时间地点',
-                show: false,
-                status: "1",
-                content: [{
-                    title: '',
-                    show: true,
-                    delete: false,
-                    //wstatus:"-1",
-                    uInput: tpInput
-                }]
             }, {
                 title: '标的信息',
                 show: false,
@@ -857,9 +768,10 @@
                 status: winneroder_status,
                 content: c_content
             }, {
-                title: '其余信息',
+                title: '自定义字段',
                 show:false,
                 status:"1",
+                key: 'extend',
                 content:[{
                     title: '',
                     show: true,
@@ -867,7 +779,9 @@
                     //wstatus:"-1",
                     uInput: otherInput
                 }]
-            }],
+            }].filter(group => {
+                return canShowGroupsList.includes(group.key)
+            }),
             originData: []},
             watch: {
                 //切换标签时更改正文内容
@@ -1318,13 +1232,13 @@
                     var noTagKey = [];
                     this.editData.filter(function (one) {
                         if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
-                            if (allCheckFields[one.key] && one.status === "-1") {
+                            if (one.status === "-1") {
                                 noTagKey.push(one.title);
                             }
                         } else {
                             one.content.filter(function (v) {
                                 v.uInput.filter(function (u) {
-                                    if (allCheckFields[u.key] && u.status === "-1") {
+                                    if (u.status === "-1") {
                                         noTagKey.push(u.title);
                                     }
                                 })

+ 58 - 137
src/web/templates/project/project_field.html

@@ -11,6 +11,7 @@
     <h1><small></small></h1>
     <ol class="breadcrumb">
       <li><a href="/front/project"><i class="fa fa-dashboard"></i> 项目列表</a></li>
+      <li><a href="#"><i class="fa fa-dashboard"></i> 设置字段</a></li>
     </ol>
   </section>
   <!-- Main content -->
@@ -43,7 +44,7 @@
                               @change="changeSwitch('child', group)"
                               v-model="child.enable"
                               active-color="#13ce66"
-                              inactive-color="#ff4949">
+                              inactive-color="#409EFF">
                       </el-switch>
                     </div>
                   </div>
@@ -106,153 +107,28 @@
 <!-- import JavaScript -->
 <script src="https://cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js"></script>
 <script>
+  let pid = {{ .T.pid }}
   // 获取配置
-  // 预设配置
-  var baseForm = [
-    {
-      key: "base",
-      enable: false,
-      descript: "基础字段",
-      ftype: "string",
-      stype: "input",
-      values: [],
-      child: [
-        {
-          key: "projectname",
-          enable: false,
-          descript: "项目名称",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "area",
-          enable: false,
-          descript: "地区",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "projectcode",
-          enable: false,
-          descript: "项目编号",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "subtype",
-          enable: false,
-          descript: "公告类别",
-          ftype: "string",
-          stype: "select",
-          values: [],
-        }
-      ]
-    },
-    {
-      key: "base2",
-      enable: false,
-      descript: "测试字段",
-      ftype: "string",
-      stype: "input",
-      values: [],
-      child: [
-        {
-          key: "projectname",
-          enable: false,
-          descript: "项目名称",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "area",
-          enable: false,
-          descript: "地区",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "projectcode",
-          enable: false,
-          descript: "项目编号",
-          ftype: "string",
-          stype: "input",
-          values: [],
-        },
-        {
-          key: "subtype",
-          enable: false,
-          descript: "公告类别-多选",
-          ftype: "string",
-          stype: "mul-select",
-          values: [],
-        },
-      ]
-    }
-  ]
+  let baseForm = {{ .T.fields }}
+  console.log(baseForm)
+  let exForm = {{ .T.diy_fields }}
+  if (!exForm) {
+    exForm = []
+  }
   // 新增自定义配置Item
   var extendBaseItem = {
     key: "",
-    enable: false,
+    enable: true,
     descript: "",
-    ftype: "string",
     stype: "input",
     values: []
   }
   // 自定义配置
   var extendForm = {
     key: "extend",
-    enable: false,
-    descript: "扩展自定义字段",
-    ftype: "string",
-    stype: "input",
+    descript: "自定义字段",
     values: [],
-    child: [
-      {
-        key: "projectname",
-        enable: false,
-        descript: "项目名称",
-        ftype: "string",
-        stype: "input",
-        values: [],
-      },
-      {
-        key: "area",
-        enable: false,
-        descript: "地区",
-        ftype: "string",
-        stype: "input",
-        values: [],
-      },
-      {
-        key: "projectcode",
-        enable: false,
-        descript: "项目编号",
-        ftype: "string",
-        stype: "input",
-        values: [],
-      },
-      {
-        key: "subtype",
-        enable: false,
-        descript: "公告类别",
-        ftype: "string",
-        stype: "select",
-        values: [],
-      },
-      {
-        key: "subtype2",
-        enable: false,
-        descript: "公告类别-多选",
-        ftype: "string",
-        stype: "mul-select",
-        values: [],
-      },
-    ]
+    child: exForm
   }
 
   // 初始化
@@ -294,8 +170,53 @@
         const baseForm = this.editForm.data.slice(0, -1)
         const extendForm = this.editForm.data.slice(-1)[0]
         console.log('baseForm', baseForm)
-        extendForm.child.forEach(v => delete v._id)
         console.log('extendForm', extendForm)
+        const m1 = []
+        baseForm.forEach(function (v) {
+          if (v.enable) {
+            if (v.descript === "基本字段") {
+              v.child.forEach(function (v1) {
+                if (v1.enable) {
+                  m1.push(v1)
+                }
+              })
+            }else {
+              let m = []
+              v.child.forEach(function (v1) {
+                if (v1.enable) {
+                  m.push(v1)
+                }
+              })
+              v.child = m
+              m1.push(v)
+            }
+          }
+        })
+
+        console.log(extendForm)
+        if (extendForm.child.length > 0) {
+          extendForm.child.forEach(v => delete v._id)
+          m1.push(extendForm)
+        }
+        console.log('m1', m1)
+        if (m1.length <= 0) {
+          alert('未选中字段')
+          return
+        }
+        const d1 = JSON.stringify(m1);
+        $.ajax({
+          url: "/front/project/field",
+          type: 'POST',
+          data: {"fields": d1, "pid": pid},
+          success: function (r) {
+            if (r.success) {
+              showMsg(r.msg)
+              // location.reload()
+            } else {
+              showMsg(r.msg);
+            }
+          }
+        })
       },
       getFormData () {
         return JSON.parse(JSON.stringify([].concat(baseForm, [extendForm])))

+ 21 - 34
src/web/templates/project/remark_detail.html

@@ -286,7 +286,7 @@
                                                 <div v-for="(uin, uindex) of two.uInput" class="input-box"
                                                      :key="uin.title">
                                                     <div class="label" v-if="uin.selectArr">
-                                                        <span><span v-if="allCheckFields[uin.key]">*</span>[[uin.title]]&nbsp;:&nbsp;</span>
+                                                        <span>[[uin.title]]&nbsp;:&nbsp;</span>
                                                         <select v-model="uin.select"
                                                                 @change="focusFn(uin, oindex,index,uindex, two, one)">
                                                             <option disabled value="">请选择</option>
@@ -303,7 +303,7 @@
                                                         </div>
                                                     </div>
                                                     <div class="label" v-else :title="uin.input">
-                                                        <span @click="goText(uin.title)"><span v-if="allCheckFields[uin.key]" style="color: red">*</span>[[uin.title]]&nbsp;:&nbsp;</span>
+                                                        <span @click="goText(uin.title)">[[uin.title]]&nbsp;:&nbsp;</span>
                                                         <input type="text" v-model="uin.input"
                                                                @focus="goText(uin.input)" @click="goText(uin.input)"
                                                                @blur="focusFn(uin, oindex, index, uindex,two,one)">
@@ -368,7 +368,6 @@
     let did = {{ .T.did }}      // 数据id
     let pid = {{ .T.pid }}      // 项目id
     let coll = {{ .T.coll }}    // 表名
-    var allCheckFields = {{ .T.fields }}          //本次需标注的所有字段
     var moreInfo = {{ .T.moreInfo }}            // 更多关联信息
     var otherInfo = {{ .T.otherInfo }}          //公告关联信息
 
@@ -490,6 +489,9 @@
         return text;
     }
 
+    // 是否需要显示 Group
+    var canShowGroupsList = []
+
     //记录是否点击保存
     var issave = false;
     var isEff = true
@@ -528,19 +530,13 @@
         }
         uInput[k] = tmp
     }
-    //时间地点
-    var timeplace = {{ .T.timeplace }}
-    var tpInput = [];
-    for (k in timeplace) {
-        var tmp = {}
-        tmp.title = timeplace[k].descript
-        tmp.input = timeplace[k].value
-        tmp.key = timeplace[k].key
-        tmp.status = timeplace[k].status
-        tpInput[k] = tmp
+
+    var enbArr = {{ .T.enbArr }}
+    if (enbArr) {
+        enbArr.forEach(v => canShowGroupsList.push(v))
     }
 
-    //其他信息
+    //自定义字段
     var other = {{ .T.other }}
     var otherInput = [];
     for (k in other) {
@@ -549,9 +545,9 @@
         tmp.input = other[k].value
         tmp.key = other[k].key
         tmp.status = other[k].status
-        if (other[k].key === "isppp" || other[k].key === "contract_guarantee" || other[k].key === "bid_guarantee") {
+        if (other[k].stype === "select") {
             tmp.select = other[k].value
-            tmp.selectArr = ['是', '否']
+            tmp.selectArr = other[k].values
         }
         otherInput[k] = tmp
     }
@@ -629,7 +625,7 @@
     }
 
     //var ispackage='{{.T.ispackage}}'
-    //包信息
+    //包信息
     var packs = {{ .T.packs }}
     var packskey = {{ .T.packskey }}
     var pkg_new = {{ .T.pkg_new }}
@@ -756,11 +752,11 @@
             // pageHtml: `{{Html (Regexp (Regexp .T.info.detail "(\\n|\\\\n)\\s+" "\n") "(`|\\n|\\\\n)+" "<br/>")}}`,
             pageHtml: '{{ .T.info.detail }}',
             showPop: false,
-            allCheckFields: allCheckFields,
             editData:[{
                 title: '基本字段',
                 show: true,
                 status: "1",
+                key: 'common',
                 content: [{
                     title: '',
                     show: true,
@@ -770,17 +766,6 @@
                     //content: c_content
                     }]
                 }, {
-                title: '时间地点',
-                show: false,
-                status: "1",
-                content: [{
-                    title: '',
-                    show: true,
-                    delete: false,
-                    //wstatus:"-1",
-                    uInput: tpInput
-                    }]
-                }, {
                 title: '标的信息',
                 show: false,
                 showCheck: true,
@@ -814,8 +799,9 @@
                 status: winneroder_status,
                 content: c_content
                 }, {
-                title: '其余信息',
+                title: '自定义字段',
                 show:false,
+                key: 'extend',
                 status:"1",
                 content:[{
                     title: '',
@@ -824,7 +810,9 @@
                     //wstatus:"-1",
                     uInput: otherInput
                   }]
-                }],
+                }].filter(group => {
+                return canShowGroupsList.includes(group.key)
+            }),
             originData: []},
             watch: {
                 //切换标签时更改正文内容
@@ -1291,17 +1279,16 @@
                 //验证保存提示
                 open:function (stype) {
                     var noTagKey = [];
-                    console.log(allCheckFields)
                     this.editData.filter(function (one) {
                         if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
-                            if (allCheckFields[one.key] && one.status === "-1") {
+                            if (one.status === "-1") {
                                 noTagKey.push(one.title);
                             }
                         } else {
                             one.content.filter(function (v) {
                                 v.uInput.filter(function (u) {
                                     console.log(u.key, u.status)
-                                    if (allCheckFields[u.key] && u.status === "-1") {
+                                    if (u.status === "-1") {
                                         noTagKey.push(u.title);
                                     }
                                 })