Jianghan 3 年 前
コミット
8f8eec554e
3 ファイル変更48 行追加2 行削除
  1. 7 0
      src/config.json
  2. 3 2
      src/front/remark.go
  3. 38 0
      src/util/config.go

+ 7 - 0
src/config.json

@@ -70,6 +70,13 @@
         "企业id列表": "entidlist",
         "项目唯一标识": "projectId"
     },
+    "topsubtype":{
+        "采购意向": ["采购意向"],
+        "预告": ["预告","预审","预审结果","论证意见","需求公示","其它"],
+        "招标": ["变更","邀标","询价","竞谈","单一","竞价","招标","其它"],
+        "结果": ["废标","流标","结果变更","中标","成交","其它"],
+        "其它": ["合同","验收","违规","其它"]
+    },
     "biaozhu": {
         "common": [
             {

+ 3 - 2
src/front/remark.go

@@ -58,6 +58,7 @@ func (f *Front) RemarkDetail(id, coll string) {
 	f.T["timeplace"] = rep["timeplace"]
 	f.T["purchasinglist"] = rep["purchasinglist"]
 	f.T["other"] = rep["other"]
+
 	f.T["PurchasinglistField"] = util.PurchasinglistField
 	f.T["WinnerorderField"] = util.WinnerorderField
 	f.T["PackageField"] = util.PackageField
@@ -98,7 +99,7 @@ func getDetail(id, coll string) map[string]interface{} {
 	rep["packskey"] = packskey
 	rep["pkg_new"] = pkg_new
 
-	purchasinglist, isNewStatus := setPurchasingMap(info) //标的物
+	purchasinglist, isNewStatus := setPurchasingMap(baseInfo, bzInfo) //标的物
 	rep["purchasinglist"] = purchasinglist
 	rep["pcl_new"] = isNewStatus
 	worder, worder_new := setWorderMap(info) //中标候选人
@@ -308,7 +309,7 @@ func setPaceMap(info, bzInfo map[string]interface{}) ([]map[string]interface{},
 }
 
 //拼装标的物
-func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
+func setPurchasingMap(info, bzinfo map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	purchasinglist, _ := util.BiaoZhu["purchasinglist"].([]interface{})
 	var purchasinglists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的

+ 38 - 0
src/util/config.go

@@ -33,6 +33,11 @@ var (
 	CustomerFieldMap_EH map[string]string
 	CustomerFieldMap_HE map[string]string
 	BiaoZhu             map[string]interface{}
+	PurchasinglistField []map[string]string
+	PackageField        []map[string]string
+	WinnerorderField    []map[string]string
+	TopSubStypeArr      []string
+	TopSubStypeArr2     []string
 )
 
 var (
@@ -144,6 +149,39 @@ func InitConfig() {
 	//tmpAllField = append(tmpAllField, descript)
 	//AllFieldMap[descript] = key
 	//}
+	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})
+	}
+	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[""].(map[string]interface{})
+	for top, v := range types {
+		tmp := v.([]interface{})
+		for _, sub := range tmp {
+			TopSubStypeArr = append(TopSubStypeArr, top+"-"+qu.ObjToString(sub))
+		}
+	}
+	TopSubStypeArr2 = TopSubStypeArr
 
 	initQuaConfig()
 }