|
@@ -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 == "" {
|