jianghan7 преди 1 година
родител
ревизия
14bb40c2d6

+ 3 - 2
exportData/main.go

@@ -51,10 +51,11 @@ func init() {
 		Fields["totalprice"] = "小计"
 	} else if ExportType == 3 {
 		FiedlsPurchase[len(FiedlsPurchase)-1] = "projectname_purchase"
-		FiedlsPurchase = append(FiedlsPurchase, "projectscope_purchase", "item", "buyer_purchase", "totalprice", "expurasingtime", "cgyxxqhref", "id")
+		FiedlsPurchase = append(FiedlsPurchase, "projectscope_purchase", "item", "buyer_purchase", "remark", "totalprice", "expurasingtime", "cgyxxqhref", "id")
 		Fields["projectname_purchase"] = "采购意向名称"
 		Fields["projectscope_purchase"] = "采购内容"
 		Fields["item"] = "采购品目"
+		Fields["remark"] = "备注"
 		Fields["buyer_purchase"] = "采购单位"
 		Fields["totalprice"] = "预计采购金额(元)"
 		Fields["expurasingtime"] = "预计采购时间"
@@ -376,7 +377,7 @@ func main() {
 					p1 := p.(map[string]interface{})
 					for _, v := range FiedlsPurchase {
 						if v == "projectname_purchase" || v == "projectscope_purchase" || v == "item" || v == "buyer_purchase" ||
-							v == "totalprice" || v == "expurasingtime" || v == "cgyxxqhref" {
+							v == "totalprice" || v == "expurasingtime" || v == "cgyxxqhref" || v == "remark" {
 							v1 := strings.ReplaceAll(v, "_purchase", "")
 							row.AddCell().SetValue(p1[v1])
 							m[v] = p1[v1]

+ 8 - 4
src/config.json

@@ -30,10 +30,10 @@
         "size": 10
     },
     "es":{
-        "addr": "http://127.0.0.1:19800",
+        "addr": "http://127.0.0.1:19805",
         "index": "bidding",
-        "user": "",
-        "password": "",
+        "user": "es_all",
+        "password": "TopJkO2E_d1x",
         "pool": 12
     },
     "customerfield":{
@@ -178,6 +178,10 @@
             {
                 "key": "projectaddr",
                 "descript": "项目地址"
+            },
+            {
+                "key": "signendtime",
+                "descript": "报名截止时间"
             }
         ],
         "purchasinglist": [
@@ -214,7 +218,7 @@
                 "descript": "尺寸"
             }
         ],
-        "purchasinglist_1": [
+        "procurementlist": [
             {
                 "key": "projectname",
                 "descript": "采购项目名称"

+ 0 - 2
src/filter/filter.go

@@ -1,14 +1,12 @@
 package filter
 
 import (
-	"log"
 	"regexp"
 
 	"github.com/go-xweb/xweb"
 )
 
 func init() {
-	log.Println("过滤器")
 	matchUrl := make([]*regexp.Regexp, 0)
 	filter, _ := regexp.Compile("/front")
 	matchUrl = append(matchUrl, filter)

+ 8 - 5
src/front/front.go

@@ -63,6 +63,7 @@ type Front struct {
 	projectList              xweb.Mapper `xweb:"/front/project"`      //项目列表
 	projectSave              xweb.Mapper `xweb:"/front/project/save"` //新增项目
 	projectAddData           xweb.Mapper `xweb:"/front/project/new/data"`
+	projectField             xweb.Mapper `xweb:"/front/project/field"`             //字段配置
 	projectComplete          xweb.Mapper `xweb:"/front/project/complete"`          //项目完成
 	projectQualityAssessment xweb.Mapper `xweb:"/front/project/qualityAssessment"` //数据质量评估
 	projectGroupTaskSave     xweb.Mapper `xweb:"/front/project/task/save"`         //用户组任务分发
@@ -77,11 +78,13 @@ type Front struct {
 	projectTagNum            xweb.Mapper `xweb:"/front/project/tagNum"`            //项目标注数据量
 
 	//user task
-	userTaskSave     xweb.Mapper `xweb:"/front/user/task/save"`     //用户任务分发
-	userTaskList     xweb.Mapper `xweb:"/front/user/task/list"`     //用户任务列表
-	userTaskRetrieve xweb.Mapper `xweb:"/front/user/task/retrieve"` //用户任务收回
-	userTaskDeliver  xweb.Mapper `xweb:"/front/user/task/deliver"`  //用户任务交付
-	userTaskClose    xweb.Mapper `xweb:"/front/user/task/close"`    //用户任务关闭改打回
+	userTaskSave       xweb.Mapper `xweb:"/front/user/task/save"`        //用户任务分发
+	userTaskList       xweb.Mapper `xweb:"/front/user/task/list"`        //用户任务列表
+	userTaskRetrieve   xweb.Mapper `xweb:"/front/user/task/retrieve"`    //用户任务收回
+	userTaskDeliver    xweb.Mapper `xweb:"/front/user/task/deliver"`     //用户任务交付
+	userTaskClose      xweb.Mapper `xweb:"/front/user/task/close"`       //用户任务关闭改打回
+	userTaskAppend     xweb.Mapper `xweb:"/front/user/task/append"`      //任务领取数据
+	userTaskAppendSave xweb.Mapper `xweb:"/front/user/task/append/save"` //任务领取数据
 
 	//group task
 	groupTaskListByAdmin xweb.Mapper `xweb:"/front/group/admin/task/list"`   //用户组任务列表(系统管理员权限)

+ 18 - 3
src/front/project.go

@@ -989,7 +989,7 @@ func UpdateSourceInfoByGroup(sourceinfo, stype string, groupIdInfo map[string]ut
 	}
 }
 
-//ImportDataByExcel 通过excel获取数据源
+// ImportDataByExcel 通过excel获取数据源
 func ImportDataByExcel(s_sourceinfo string, mf multipart.File, success *bool, msg *string, successNum *int64, createindex bool) (importDataNum int) {
 	defer qu.Catch()
 	binary, _ := ioutil.ReadAll(mf)
@@ -1061,7 +1061,7 @@ func ImportDataByExcel(s_sourceinfo string, mf multipart.File, success *bool, ms
 	return
 }
 
-//ImportDataByColl 通过表获取数据源
+// ImportDataByColl 通过表获取数据源
 func ImportDataByColl(s_sourceinfo, historyid string, success *bool, msg *string, successNum *int64, createindex bool) (departname, entname string, rulename []string, importDataNum int) {
 	defer qu.Catch()
 	rulenameMap := map[string]bool{}
@@ -1135,7 +1135,7 @@ func ImportDataByColl(s_sourceinfo, historyid string, success *bool, msg *string
 	return
 }
 
-//GetDataById 通过id集从bidding、extract、project获取数据所有信息
+// GetDataById 通过id集从bidding、extract、project获取数据所有信息
 func GetDataById(idInfoArr []util.Data, importType, s_sourceinfo string, success *bool, msg *string, successNum *int64, newAdd bool) {
 	*success = true
 	var msgArr []string
@@ -1402,3 +1402,18 @@ func (f *Front) ProjectTagNum() {
 		}
 	}
 }
+
+func (f *Front) ProjectField() {
+	defer qu.Catch()
+	if f.Method() == "POST" {
+
+	} else {
+		pid := f.GetString("id") //项目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"]
+		}
+		f.T["fields"] = util.FieldsMap
+		_ = f.Render("project/project_field.html", &f.T)
+	}
+}

+ 101 - 20
src/front/remark.go

@@ -97,9 +97,10 @@ func (f *Front) RemarkDetail() {
 	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["PurchasinglistField1"] = util.PurchasinglistField1
+	f.T["ProcurementlistField"] = util.PurchasinglistField1
 	f.T["WinnerorderField"] = util.WinnerorderField
 	f.T["PackageField"] = util.PackageField
 	f.T["topsubtype"] = util.TopSubStypeArr2
@@ -108,6 +109,7 @@ func (f *Front) RemarkDetail() {
 	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
@@ -147,7 +149,7 @@ func getDetail(id, coll string) map[string]interface{} {
 	rep["purchasinglist"] = purchasinglist
 	rep["pcl_new"] = isNewStatus
 	purchasinglist_1, isNewStatus1 := setPurchasingMap1(baseInfo) //标的物(采购意向)
-	rep["purchasinglist_1"] = purchasinglist_1
+	rep["procurementlist"] = purchasinglist_1
 	rep["pcl_new_1"] = isNewStatus1
 	worder, worder_new := setWorderMap(baseInfo) //中标候选人
 	rep["worder"] = worder
@@ -174,7 +176,7 @@ func getDetail(id, coll string) map[string]interface{} {
 	return rep
 }
 
-//拼装抽取common值
+// 拼装抽取common值
 func setExtComMap(info, bzInfo map[string]interface{}) ([]interface{}, []interface{}, []interface{}) {
 	//基本参数
 	common, _ := util.BiaoZhu["common"].([]interface{})
@@ -258,7 +260,7 @@ func setExtComMap(info, bzInfo map[string]interface{}) ([]interface{}, []interfa
 	return common, timeplace, other
 }
 
-//拼装子包信息
+// 拼装子包信息
 func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string, []bool) {
 	var confpack []interface{}
 	confpack, _ = util.BiaoZhu["package"].([]interface{})
@@ -354,7 +356,7 @@ func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string
 	return packages, sortpackskey, isNewPkgArr
 }
 
-//拼装标的物
+// 拼装标的物
 func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	purchasinglist, _ := util.BiaoZhu["purchasinglist"].([]interface{})
 	var purchasinglists []interface{}
@@ -398,12 +400,13 @@ func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]
 	return purchasinglists, isNewAndStatus
 }
 
+// 采购意向
 func setPurchasingMap1(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
-	purchasinglist, _ := util.BiaoZhu["purchasinglist_1"].([]interface{})
-	var purchasinglists []interface{}
+	procurementlist, _ := util.BiaoZhu["procurementlist"].([]interface{})
+	var procurementlists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的
 	var isNewAndStatus []map[string]interface{}
-	if tmpcls, ok := info["purchasinglist"].([]interface{}); ok {
+	if tmpcls, ok := info["procurementlist"].([]interface{}); ok {
 		for _, v := range tmpcls {
 			if pcl, ok := v.(map[string]interface{}); ok {
 				//isNew, _ := pcl["isnew"].(bool)
@@ -415,7 +418,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 purchasinglist {
+				for _, ps := range procurementlist {
 					ps, _ := ps.(map[string]interface{})
 					value := pcl[qu.ObjToString(ps["key"])]
 					if value == nil {
@@ -434,14 +437,14 @@ func setPurchasingMap1(info map[string]interface{}) ([]interface{}, []map[string
 					// }
 					pcls = append(pcls, tp)
 				}
-				purchasinglists = append(purchasinglists, pcls)
+				procurementlists = append(procurementlists, pcls)
 			}
 		}
 	}
-	return purchasinglists, isNewAndStatus
+	return procurementlists, isNewAndStatus
 }
 
-//拼装中标候选人
+// 拼装中标候选人
 func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]interface{}) {
 	//基本参数--中标候选人
 	winnerorder, _ := util.BiaoZhu["winnerorder"].([]interface{})
@@ -479,7 +482,7 @@ func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]inte
 	return worders, isNewAndStatus
 }
 
-//获取公告关联信息
+// 获取公告关联信息
 func setOtherInfo(info map[string]interface{}) (result, moreArr []map[string]interface{}) {
 	if otherInfo, ok := info["info"].([]interface{}); ok && len(otherInfo) > 0 {
 		//中标,成交、合同、招标(不含变更)
@@ -677,7 +680,7 @@ func (f *Front) CheckList() {
 		}
 		qu.Debug("Query:", query)
 		count := util.Mgo.Count(util.TASKCOLLNAME, query)
-		list, _ := util.Mgo.Find(util.TASKCOLLNAME, query, map[string]interface{}{"_id": -1}, nil, false, start, limit)
+		list, _ := util.Mgo.Find(util.TASKCOLLNAME, query, bson.M{"_id": -1}, nil, false, start, limit)
 		for _, l := range *list {
 			if status := qu.ObjToString(l["s_status"]); status == "进行中" { //更新任务进度
 				giveNum := qu.IntAll(l["i_givenum"])
@@ -718,6 +721,8 @@ func (f *Front) CheckData() {
 			query["b_check"] = true
 		} else if status == "-1" {
 			query["b_check"] = false
+		} else {
+			query["b_istag"] = true // 默认查询 已标注数据
 		}
 		if s_excp == "1" {
 			query["s_excp"] = nil
@@ -1047,6 +1052,8 @@ func (f *Front) CheckSave() {
 			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+		case "采购意向信息":
+			MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 		case "多包信息":
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
@@ -1070,7 +1077,7 @@ func (f *Front) CheckSave() {
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 3 { //采购意向
-				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
 			} else if j == 5 { //候选人
@@ -1657,6 +1664,7 @@ func (f *Front) JyUserDataMark() {
 	infoId := f.GetString("s_infoid")
 	sourceInfo := f.GetString("s_sourceinfo")
 	remark := f.GetString("remark")
+	isEff, _ := f.GetBool("isEff")
 	pid := f.GetString("pid")
 	qu.Debug("Data ID:", infoId)
 	data := f.GetString("data")
@@ -1685,6 +1693,8 @@ func (f *Front) JyUserDataMark() {
 			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+		case "采购意向信息":
+			MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 		case "多包信息":
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
@@ -1708,7 +1718,7 @@ func (f *Front) JyUserDataMark() {
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 3 { //采购意向
-				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
 			} else if j == 5 { //候选人
@@ -1772,10 +1782,10 @@ func (f *Front) JyUserDataMark() {
 		for field, _ := range baseUnset {           //删除基本字段
 			baseUnsetResult["v_baseinfo."+field] = ""
 		}
-		// todo
 		if remark != "" {
 			setResult["v_taginfo.reamrk"] = remark
 		}
+		setResult["isEff"] = isEff
 		set := map[string]interface{}{
 			"$set": setResult,
 		}
@@ -1814,6 +1824,7 @@ func (f *Front) UserDataMark() {
 	userId := qu.ObjToString(user["id"])        //当前登录用户标识
 	userRole := qu.ObjToString(user["i_role"])  //当前登录用户权限
 	remark := f.GetString("remark")
+	isEff, _ := f.GetBool("isEff")
 	obj := []map[string]interface{}{}
 	infoId := f.GetString("s_infoid")
 	userTaskId := f.GetString("s_usertaskid")
@@ -1845,6 +1856,8 @@ func (f *Front) UserDataMark() {
 			MarkTimePlace(content, tagSet, baseSet, baseUnset)
 		case "标的信息":
 			MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+		case "采购意向信息":
+			MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 		case "多包信息":
 			MarkPackage(content, tagSet, baseSet, baseUnset, status)
 		case "中标候选人信息":
@@ -1868,7 +1881,7 @@ func (f *Front) UserDataMark() {
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 3 { //采购意向
-				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+				MarkProcurementList(content, tagSet, baseSet, baseUnset, istag, status)
 			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
 			} else if j == 5 { //候选人
@@ -1944,6 +1957,7 @@ func (f *Front) UserDataMark() {
 		if remark != "" {
 			setResult["v_taginfo.reamrk"] = remark
 		}
+		setResult["isEff"] = isEff
 		set := map[string]interface{}{
 			"$set": setResult,
 		}
@@ -2129,6 +2143,69 @@ func MarkPurchasinglist(content []interface{}, tagSet, baseSet, baseUnset map[st
 	qu.Debug("baseUnset===", baseUnset)
 }
 
+func MarkProcurementList(content []interface{}, tagSet, baseSet, baseUnset map[string]interface{}, istag bool, status int) {
+	if status == -1 {
+		return
+	}
+	baseSet["procurementlist_alltag"] = istag //是否标注完全
+	procurementlist := []interface{}{}
+	procurementlistStatus := []interface{}{}
+	delpclson := 0
+	for _, con := range content {
+		info, _ := con.(map[string]interface{})
+		//isNew, _ := info["isnew"].(bool) //是否是新增子包
+		pclSonStatus := qu.IntAll(info["status"])
+		if pclSonStatus == 4 {
+			delpclson++
+		}
+		if uInputs, ok := info["uInput"].([]interface{}); ok {
+			result := map[string]interface{}{
+				//"isnew": isNew,
+			}
+			statusMap := make(map[string]interface{})
+			for _, tmp := range uInputs {
+				if tmpMap, ok := tmp.(map[string]interface{}); ok {
+					key := qu.ObjToString(tmpMap["key"]) //字段
+					input := tmpMap["input"]             //值
+					status := qu.IntAll(tmpMap["status"])
+					statusMap[key] = status
+					isNull := false
+					if input == "" { //判断前台页面是否填值,无值不进行字段存储
+						isNull = true
+					} else if key == "number" || key == "unitprice" || key == "totalprice" {
+						input = qu.Float64All(input)
+					}
+					if !isNull { //避免数字类型的字段在没有填写值的情况默认给0
+						result[key] = input
+					}
+				}
+			}
+			if pclSonStatus != -1 { //没有标注的标的信息不打标记
+				result["procurementlist_son"] = pclSonStatus
+			}
+			if len(result) > 0 && pclSonStatus != 4 {
+				procurementlist = append(procurementlist, result)
+				procurementlistStatus = append(procurementlistStatus, statusMap)
+			}
+		}
+	}
+	qu.Debug("procurementlist", len(procurementlist))
+	if len(procurementlist)+delpclson == len(content) {
+		if len(procurementlist) > 0 {
+			baseSet["procurementlist"] = procurementlist
+		} else if len(content) > 0 && delpclson == len(content) { //只有删除
+			baseUnset["procurementlist"] = ""
+		}
+		//tagSet["purchasinglist"] = status
+		tagSet["procurementlist"] = procurementlistStatus
+	} else {
+		qu.Debug("ProcurementList Tag Error")
+	}
+	qu.Debug("tagSet===", tagSet)
+	qu.Debug("baseSet===", baseSet)
+	qu.Debug("baseUnset===", baseUnset)
+}
+
 // MarkPackage 标注多包信息
 func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]interface{}, status int) {
 	if status == -1 {
@@ -2137,6 +2214,7 @@ func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]in
 	pkgs := map[string]interface{}{}
 	newNum := 1
 	delpkgson := 0 //记录子包删除个数
+	var sw []string
 	for _, con := range content {
 		info, _ := con.(map[string]interface{})
 		pkgSonStatus := qu.IntAll(info["status"])
@@ -2192,12 +2270,14 @@ func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]in
 				}
 			}
 			winner_all := []interface{}{}
+
 			if len(winnerArr) == len(bidamountArr) {
 				for i, w := range winnerArr {
 					b := bidamountArr[i]
 					wbMap := map[string]interface{}{}
 					if w != nil {
 						wbMap["winner"] = w
+						sw = append(sw, qu.ObjToString(w))
 					}
 					if b != nil {
 						wbMap["bidamount"] = b
@@ -2221,6 +2301,7 @@ func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]in
 	if len(pkgs)+delpkgson == len(content) {
 		if len(pkgs) > 0 {
 			baseSet["package"] = pkgs
+			baseSet["s_winner"] = strings.Join(sw, ",")
 		} else if len(content) > 0 && delpkgson == len(content) { //只有删除
 			baseUnset["package"] = ""
 		}
@@ -2230,7 +2311,7 @@ func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]in
 	}
 }
 
-//标注中标候选人信息
+// 标注中标候选人信息
 func MarkWonderorder(content []interface{}, tagSet, baseSet, baseUnset map[string]interface{}, status int) {
 	if status == -1 {
 		return
@@ -2286,7 +2367,7 @@ func MarkWonderorder(content []interface{}, tagSet, baseSet, baseUnset map[strin
 	qu.Debug("baseUnset===", baseUnset)
 }
 
-//标注其他信息
+// 标注其他信息
 func MarkOther(content []interface{}, tagSet, baseSet, baseUnset map[string]interface{}) {
 	info, _ := content[0].(map[string]interface{})
 	if uInputs, ok := info["uInput"].([]interface{}); ok {

+ 54 - 2
src/front/user.go

@@ -1018,8 +1018,6 @@ func RetrieveCloseTaskByUser(sourceInfo, username string, userTaskIdStatus map[s
 }
 
 func (f *Front) UserTask() {
-	defer qu.Catch()
-
 	defer qu.Catch()
 	user := f.GetSession("user").(map[string]interface{})
 	//s_role := qu.ObjToString(user["i_role"])
@@ -1141,3 +1139,57 @@ func (f *Front) UserTask() {
 		_ = f.Render("user/task_user_new.html", &f.T)
 	}
 }
+
+func (f *Front) UserTaskAppend() {
+	defer qu.Catch()
+	if f.Method() == "POST" {
+		gid := f.GetString("groupid")
+		sourceinfo := f.GetString("s_sourceinfo")
+		c := Mgo.Count(sourceinfo, bson.M{"b_isgiveuser": false, "s_grouptaskid": gid})
+		qu.Debug(gid, sourceinfo, c)
+		if c > 0 {
+			f.ServeJson(map[string]interface{}{
+				"success": true,
+				"count":   c,
+			})
+		} else {
+			f.ServeJson(map[string]interface{}{"success": false, "msg": "当前用户组没有更多待分配数量"})
+		}
+	}
+}
+
+func (f *Front) UserTaskAppendSave() {
+	defer qu.Catch()
+	if f.Method() == "POST" {
+		user := f.GetSession("user").(map[string]interface{})
+		userid := qu.ObjToString(user["id"])
+		username := qu.ObjToString(user["s_login"])
+		tid := f.GetString("taskid")
+		sourceinfo := f.GetString("s_sourceinfo")
+		gid := f.GetString("groupid")
+		num, _ := f.GetInt("num")
+		if num > 0 {
+			tinfo, _ := Mgo.FindById(TASKCOLLNAME, tid, "")
+			total := qu.IntAll((*tinfo)["i_givenum"]) + int(num)
+			n1 := Mgo.Count(sourceinfo, bson.M{"s_usertaskid": tid, "b_istag": false})
+			noTag := n1 + int(num)
+			progressFloat := float64(noTag) / float64(total)
+			value, _ := strconv.ParseFloat(fmt.Sprintf("%.4f", progressFloat), 64)
+			decimalValue := decimal.NewFromFloat(value)
+			decimalValue = decimalValue.Mul(decimal.NewFromInt(100))
+			value, _ = decimalValue.Float64()
+			progress := fmt.Sprint(value) + "%"
+			update := bson.M{"$set": bson.M{
+				"i_givenum":  qu.IntAll((*tinfo)["i_givenum"]) + int(num),
+				"s_progress": progress,
+				"s_status":   "进行中",
+			}}
+			Mgo.UpdateById(TASKCOLLNAME, tid, update)
+			UpdateSourceInfoByUser(sourceinfo, gid, map[string]Task{tid: {UserId: userid, GiveNum: int(num), UserName: username}})
+
+			f.ServeJson(map[string]interface{}{"success": true, "msg": "领取数量成功"})
+		} else {
+			f.ServeJson(map[string]interface{}{"success": false, "msg": "领取数量异常"})
+		}
+	}
+}

+ 1 - 1
src/util/common.go

@@ -19,7 +19,7 @@ type Data struct {
 	Info map[string]interface{}
 }
 
-//oss
+// oss
 var (
 	ossEndpoint        = "oss-cn-beijing-internal.aliyuncs.com" //正式环境用:oss-cn-beijing-internal.aliyuncs.com 测试:oss-cn-beijing.aliyuncs.com
 	ossAccessKeyId     = "LTAI4G5x9aoZx8dDamQ7vfZi"

+ 25 - 4
src/util/config.go

@@ -201,7 +201,7 @@ func InitConfig() {
 		PurchasinglistField = append(PurchasinglistField, map[string]string{key: descript})
 	}
 	PurchasinglistField1 = []map[string]string{}
-	pcls1, _ := BiaoZhu["purchasinglist_1"].([]interface{})
+	pcls1, _ := BiaoZhu["procurementlist"].([]interface{})
 	for _, pcl := range pcls1 {
 		tmp := pcl.(map[string]interface{})
 		key := qu.ObjToString(tmp["key"])
@@ -237,15 +237,36 @@ func InitConfig() {
 	for k := range DataTypeMap {
 		DataTypeArr = append(DataTypeArr, k)
 	}
-	info, _ := Mgo.Find("v_field", `{"s_type": "tag"}`, nil, nil, false, -1, -1)
+	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{})
 	for _, m := range *info {
-		FieldsMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+		if qu.IntAll(m["f_level"]) == 1 {
+			FieldsMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+		} else {
+			pstr := qu.ObjToString(m["s_parent"])
+			if pstr == "purchasinglist" {
+				purMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+			} else if pstr == "procurementlist" {
+				proMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+			} else if pstr == "package" {
+				pkgMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+			} else if pstr == "winnerorder" {
+				wnMap[qu.ObjToString(m["s_code"])] = m["s_name"]
+			}
+		}
 	}
+	FieldsMap["purchasinglist"] = purMap
+	FieldsMap["procurementlist"] = proMap
+	FieldsMap["package"] = pkgMap
+	FieldsMap["winnerorder"] = wnMap
 	initQuaConfig()
 }
 
-//质量相关初始化配置
+// 质量相关初始化配置
 func initQuaConfig() {
 	Ext_Type = Quaconfig["ext_type"].(map[string]interface{})
 	Ext_From = Quaconfig["ext_from"].(map[string]interface{})

+ 4 - 5
src/util/elasticSim.go

@@ -38,7 +38,7 @@ func (e *Elastic) InitElasticSize() {
 	}
 }
 
-//关闭连接
+// 关闭连接
 func (e *Elastic) DestoryEsConn(client *es.Client) {
 	select {
 	case e.Pool <- client:
@@ -97,11 +97,10 @@ func (e *Elastic) Get(index, query string) *[]map[string]interface{} {
 			if r := recover(); r != nil {
 				log.Println("[E]", r)
 				for skip := 1; ; skip++ {
-					_, file, line, ok := runtime.Caller(skip)
+					_, _, _, ok := runtime.Caller(skip)
 					if !ok {
 						break
 					}
-					go log.Printf("%v,%v\n", file, line)
 				}
 			}
 		}()
@@ -128,7 +127,7 @@ func (e *Elastic) Get(index, query string) *[]map[string]interface{} {
 	return &res
 }
 
-//关闭elastic
+// 关闭elastic
 func (e *Elastic) Close() {
 	for i := 0; i < e.I_size; i++ {
 		cli := <-e.Pool
@@ -181,7 +180,7 @@ func (e *Elastic) BulkSave(index string, obj []map[string]interface{}) {
 	}
 }
 
-//根据id删除索引对象
+// 根据id删除索引对象
 func (e *Elastic) DelById(index, itype, id string) bool {
 	client := e.GetEsConn()
 	defer e.DestoryEsConn(client)

+ 71 - 14
src/web/templates/project/check_detail.html

@@ -646,6 +646,29 @@
         content.content = []
         pcl_content[k] = content
     }
+    //采购意向
+    var procurementlist = {{ .T.procurementlist }}
+    var pcl_new_1 = {{ .T.pcl_new_1 }}
+    var pcl_content_1 = [];
+    for (k in procurementlist) {
+        let c_uInput = [];
+        for (i in procurementlist[k]) {
+            let tmp = {}
+            tmp.title = procurementlist[k][i].descript
+            tmp.input = procurementlist[k][i].value
+            tmp.key = procurementlist[k][i].key
+            tmp.status = procurementlist[k][i].status
+            c_uInput[i] = tmp
+        }
+        let content = {};
+        content.title = "采购标的物"
+        content.show = true
+        content.status = pcl_new_1[k]["status"]
+        content.uInput = c_uInput
+        content.isnew = pcl_new_1[k]["isnew"] || false
+        content.content = []
+        pcl_content_1[k] = content
+    }
 
     //var ispackage='{{.T.ispackage}}'
     //子包信息
@@ -713,8 +736,23 @@
             pclfInput.push(tempNode)
         }
     }
-
-
+    var pclf1 = {{ .T.ProcurementlistField }}
+    const pclfInput1 = [];
+    for (i in pclf1) {
+        for (key in pclf1[i]) {
+            const tempNode = {
+                input: "",
+                key: key,
+                status: "2",
+                title: pclf1[i][key]
+            };
+            //if(key== "pclisover"){
+            //  tempNode.select= '是'
+            //  tempNode.selectArr=['是','否']
+            //}
+            pclfInput1.push(tempNode)
+        }
+    }
     var wodf = {{ .T.WinnerorderField }}
     var wodfInput = []
     for (i in wodf) {
@@ -773,8 +811,8 @@
                     //wstatus:"-1",
                     uInput: uInput
                     //content: c_content
-                    }]
-                }, {
+                }]
+            }, {
                 title: '时间地点',
                 show: false,
                 status: "1",
@@ -784,8 +822,8 @@
                     delete: false,
                     //wstatus:"-1",
                     uInput: tpInput
-                    }]
-                }, {
+                }]
+            }, {
                 title: '标的信息',
                 show: false,
                 showCheck: true,
@@ -794,7 +832,15 @@
                 checkAllTag: purchasing_all_tag,
                 status: purchasing_status,
                 content: pcl_content
-                }, {
+            }, {
+                title: '采购意向信息',
+                show:false,
+                showCheck: true,
+                key: 'procurementlist',
+                // checkType: {{.T.ck_pkgisext}},
+                status: purchasing_status,
+                content: pcl_content_1
+            }, {
                 title: '多包信息',
                 show:false,
                 showCheck: true,
@@ -802,7 +848,7 @@
                 // checkType: {{.T.ck_pkgisext}},
                 status: package_status,
                 content: p_content
-                }, {
+            }, {
                 title: '中标候选人信息',
                 show: false,
                 showCheck: true,
@@ -810,7 +856,7 @@
                 // checkType: {{.T.ck_wodrisext}},
                 status: winneroder_status,
                 content: c_content
-                }, {
+            }, {
                 title: '其余信息',
                 show:false,
                 status:"1",
@@ -820,8 +866,8 @@
                     delete: false,
                     //wstatus:"-1",
                     uInput: otherInput
-                  }]
-                }],
+                }]
+            }],
             originData: []},
             watch: {
                 //切换标签时更改正文内容
@@ -1107,6 +1153,17 @@
                             }
                             break
                         }
+                        case "采购意向信息": {
+                            tempNode = {
+                                //content: [],
+                                show: true,
+                                isnew: true,
+                                status: "2",
+                                title: "标的物",
+                                uInput: JSON.parse(JSON.stringify(pclfInput1))
+                            }
+                            break
+                        }
                         case "多包信息": {
                             tempNode = {
                                 //content: [],
@@ -1260,7 +1317,7 @@
                 open:function (stype) {
                     var noTagKey = [];
                     this.editData.filter(function (one) {
-                        if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                        if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
                             if (allCheckFields[one.key] && one.status === "-1") {
                                 noTagKey.push(one.title);
                             }
@@ -1288,7 +1345,7 @@
                                     return u.status === '-1'
                                 }).length
                             })
-                            if ((one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
+                            if ((one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
                                 return true
                             } else {
                                 return otherOne.length
@@ -1301,7 +1358,7 @@
                         this.editData.filter(function (one) {
                             //多包信息、中标候选人信息在为标注失败的前提下检测标注状态,一个失败不能保存
                             if (otherTag < 2) {
-                                if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                                if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
                                     if (one.status === "-1") {//没标
                                         if (otherTag !== 1) {//前一个标注成功不用记录后一个是否未标
                                             otherTag = 0

+ 13 - 3
src/web/templates/project/check_user_data_list.html

@@ -32,15 +32,15 @@
                     <div id="status-div" class="col-xs-1" style="width: auto;float: right;">
                         <label for="statusSelect" class="form-inline">质检状态:
                             <select class="form-control selectpicker" id="statusSelect">
-                                <option value="0">全部</option>
+                                <option value="0" selected>全部</option>
                                 <option value="1">已质检</option>
                                 <option value="-1">未质检</option>
                             </select></label>
                         <label for="dataSelect" class="form-inline">数据状态:
                             <select class="form-control selectpicker" id="dataSelect">
-                                <option value="0">全部</option>
+                                <option value="0" selected>全部</option>
                                 <option value="1">正常</option>
-                                <option value="-1" selected>异常</option>
+                                <option value="-1">异常</option>
                             </select>
                         </label>
                     </div>
@@ -49,6 +49,7 @@
                         <tr>
                             <th></th>
                             <th>数据状态</th>
+                            <th>质检状态</th>
                             <th>标题</th>
                             <th>用户</th>
                         </tr>
@@ -111,6 +112,15 @@
                         }
                         return tmp
                     }},
+                {"data": "b_check", width: "5%", render: function (val) {
+                        let tmp;
+                        if (val) {
+                            tmp = '<span style="display: inline-block;font-size:14px;">已质检</span>'
+                        } else {
+                            tmp = '<span style="display: inline-block;font-size:14px;">未质检</span>'
+                        }
+                        return tmp
+                    }},
                 {"data": "v_baseinfo.title", render: function (val, index, row) {
                         let tmp
                         if (row["b_check"]) {

+ 36 - 0
src/web/templates/project/project_field.html

@@ -0,0 +1,36 @@
+{{include "com/inc.html"}}
+<!-- Main Header -->
+{{include "com/header.html"}}
+<!-- Left side column. 权限菜单 -->
+{{include "com/menu.html"}}
+<div class="content-wrapper">
+  <section class="content-header">
+    <h1><small></small></h1>
+    <ol class="breadcrumb">
+      <li><a href="/front/project"><i class="fa fa-dashboard"></i> 项目列表</a></li>
+    </ol>
+  </section>
+  <!-- Main content -->
+  <section class="content">
+    <div class="row">
+      <div class="col-xs-12">
+        <div class="box">
+          <div class="box-body">
+
+
+
+          </div>
+          <!-- /.box-body -->
+        </div>
+        <!-- /.box -->
+      </div>
+    </div>
+  </section>
+</div>
+
+{{include "com/footer.html"}}
+<script>
+  menuActive("project");
+
+
+</script>

+ 2 - 0
src/web/templates/project/project_list.html

@@ -417,6 +417,7 @@
                                 '<a class="btn btn-sm btn-primary" onclick="checkMethod(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">质检</a>&nbsp;&nbsp;' +
                                 '<br>' +
                                 // '<a class="btn btn-sm btn-primary" href="">质检结果</a>&nbsp;&nbsp;' +
+                                '<a class="btn btn-sm btn-primary" href="/front/project/field?id='+row._id+'">字段配置</a>&nbsp;&nbsp;' +
                                 '<a class="btn btn-sm btn-primary" style="margin-top: 5px" onclick="completePro(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">完成</a>&nbsp;&nbsp;' +
                                 '</div>';
                         }else {
@@ -427,6 +428,7 @@
                                 '<a class="btn btn-sm btn-primary" onclick="checkMethod(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">质检</a>&nbsp;&nbsp;' +
                                 '<br>' +
                                 // '<a class="btn btn-sm btn-primary" href="">质检结果</a>&nbsp;&nbsp;' +
+                                '<a class="btn btn-sm btn-primary" href="/front/project/field?id='+row._id+'">字段配置</a>&nbsp;&nbsp;' +
                                 '<a class="btn btn-sm btn-primary" style="margin-top: 5px" onclick="completePro(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">完成</a>&nbsp;&nbsp;' +
                                 '</div>';
                         }

+ 45 - 69
src/web/templates/project/remark_detail.html

@@ -8,6 +8,9 @@
     <link href="/dist/css/animate.min.css" rel="stylesheet">
     <link rel="stylesheet" href="/dist/css/zz.css">
     <link rel="stylesheet" href="/dist/css/index.css">
+    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet">
+    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
+    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-switch/3.3.4/js/bootstrap-switch.min.js"></script>
     <script src="/dist/js/vue.min.js"></script>
     <script src="/dist/js/index.js"></script>
     <style>
@@ -209,6 +212,7 @@
                 <div style="padding: 5px;margin-left: 20px">
                     <label style="color: red">备注:<input type="text" id="remark" style="height: 25px;width: 300px;display: inline-block;"></label>
                     <label style="color: red" id="keyword">关键词:</label>
+                    <label>数据是否有效:<input id="group-switch-pwd" name="switch-pwd" type="checkbox"></label>
                 </div>
                 <div class="edit one" v-for="(one,oindex) in editData" :key="oindex">
                     <!--one-->
@@ -316,52 +320,6 @@
                                                     </div>
                                                 </div>
                                             </div>
-                                            <!--three-->
-                                            <!--<div>
-                                                                     <div class="edit-title" v-show="one.title == '基本字段'">
-                                                    <span>候选人</span>
-                                                    <div class="info-box" >
-                                                        <div :class="{default: two.wstatus == '-1'}" @click="two.wstatus = '-1'"></div>
-                                                        <div :class="{ok: two.wstatus == '1'}" @click="two.wstatus = '1'"></div>
-                                                        <el-popover trigger="click" >
-                                                          <div style="text-align: right; margin: 0">
-                                                            <el-button type="success" size="mini" @click="two.wstatus = '2'">新增</el-button>
-                                                            <el-button type="warning" size="mini" @click="two.wstatus = '3'">修改</el-button>
-                                                            <el-button type="danger" size="mini" @click="two.wstatus = '4'">删除</el-button>
-                                                          </div>
-                                                          <div class="add-tip" slot="reference" :class="{err: (two.wstatus != '1' && two.wstatus != '-1')}">[[textMap[two.wstatus] || '']]</div>
-                                                        </el-popover>
-                                                    </div>
-                                                </div>
-                                                <div class="edit three" v-for="(three,index) in two.content" :key="index">
-                                                    <div class="edit-title" @click="three.show = !three.show">
-                                                        <span>[[three.title]]</span>
-                                                    </div>
-                                                    <div class="edit-content" v-show="three.show">
-                                                        <div class="edit-input">
-                                                            <div class="input-box" v-for="(threeUin,index) in three.uInput" :key="threeUin.title">
-                                                                <div class="label">
-                                                                    <span @click="goText(threeUin.title)">[[threeUin.title]]&nbsp;:&nbsp;</span>
-                                                                    <input type="text" v-model="threeUin.input" @focus="goText(threeUin.input)" @click="goText(threeUin.input)">
-                                                                    <div class="info-box">
-                                                                        <div :class="{default: threeUin.status == '-1'}" @click="threeUin.status = '-1'"></div>
-                                                                        <div :class="{ok: threeUin.status == '1'}" @click="threeUin.status = '1'"></div>
-                                                                      <el-popover trigger="click" >
-                                                                        <div style="text-align: right; margin: 0">
-                                                                          <el-button type="success" size="mini" @click="threeUin.status = '2'">新增</el-button>
-                                                                          <el-button type="warning" size="mini" @click="threeUin.status = '3'">修改</el-button>
-                                                                          <el-button type="danger" size="mini" @click="threeUin.status = '4'">删除</el-button>
-                                                                        </div>
-                                                                        <div class="add-tip" slot="reference" :class="{err: (threeUin.status != '1' && threeUin.status != '-1')}">[[textMap[threeUin.status] || '']]</div>
-                                                                      </el-popover>
-                                                                    </div>
-                                                                </div>
-                                                            </div>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </div>-->
-
                                         </div>
                                     </transition>
                                 </div>
@@ -420,7 +378,6 @@
     let winneroder_status = {{ .T.ck_winnerorder }}         //中标候选人标记
 
     $("#keyword").html({{ .T.keyword }})
-
     // 页面数据
     var pageDataMap = {
         '原文': {
@@ -436,7 +393,6 @@
             html: '{{ .T.info.filetext }}',
         },
     }
-
     //快捷键
     $(document).keydown(function (event) {
         if (!event.shiftKey) {
@@ -536,6 +492,7 @@
 
     //记录是否点击保存
     var issave = false;
+    var isEff = true
     var _id = {{ .T.did }}
     var nextid = {{ .T.nextid }}
     //基本信息
@@ -648,21 +605,21 @@
         pcl_content[k] = content
     }
     //采购意向
-    var purchasinglist_1 = {{ .T.purchasinglist_1 }}
+    var procurementlist = {{ .T.procurementlist }}
     var pcl_new_1 = {{ .T.pcl_new_1 }}
     var pcl_content_1 = [];
-    for (k in purchasinglist_1) {
+    for (k in procurementlist) {
         let c_uInput = [];
-        for (i in purchasinglist_1[k]) {
+        for (i in procurementlist[k]) {
             let tmp = {}
-            tmp.title = purchasinglist_1[k][i].descript
-            tmp.input = purchasinglist_1[k][i].value
-            tmp.key = purchasinglist_1[k][i].key
-            tmp.status = purchasinglist_1[k][i].status
+            tmp.title = procurementlist[k][i].descript
+            tmp.input = procurementlist[k][i].value
+            tmp.key = procurementlist[k][i].key
+            tmp.status = procurementlist[k][i].status
             c_uInput[i] = tmp
         }
         let content = {};
-        content.title = "标的物"
+        content.title = "采购标的物"
         content.show = true
         content.status = pcl_new_1[k]["status"]
         content.uInput = c_uInput
@@ -737,7 +694,7 @@
             pclfInput.push(tempNode)
         }
     }
-    var pclf1 = {{ .T.PurchasinglistField1 }}
+    var pclf1 = {{ .T.ProcurementlistField }}
     const pclfInput1 = [];
     for (i in pclf1) {
         for (key in pclf1[i]) {
@@ -754,7 +711,6 @@
             pclfInput1.push(tempNode)
         }
     }
-
     var wodf = {{ .T.WinnerorderField }}
     var wodfInput = []
     for (i in wodf) {
@@ -837,7 +793,7 @@
                 title: '采购意向信息',
                 show:false,
                 showCheck: true,
-                key: 'purchasinglist_1',
+                key: 'procurementlist',
                 // checkType: {{.T.ck_pkgisext}},
                 status: purchasing_status,
                 content: pcl_content_1
@@ -910,6 +866,21 @@
             mounted() {
                 // 缓存原始数据
                 this.originData = JSON.parse(JSON.stringify([].concat(this.editData)))
+                $('#group-switch-pwd').bootstrapSwitch({
+                    onText : "是",
+                    offText : "否",
+                    onColor : "success",
+                    offColor : "warning",
+                }).bootstrapSwitch('size', 'small').bootstrapSwitch('state', true);
+                $("#group-switch-pwd").bootstrapSwitch(
+                    'onSwitchChange', function (event, state){
+                        if (state===true) {
+                            isEff = true
+                        }else {
+                            isEff = false
+                        }
+                    }
+                )
             },
             methods: {
                 // 当前输入框数据与原始数据比较
@@ -1187,14 +1158,18 @@
                             break
                         }
                     }
+                    // 输入多个
+                    var count = prompt('请输入需要新增的个数')
                     // if (one.status >= "2") {
                     //     one.status = '2'
                     // }
-                    one.content.push(tempNode)
-                    this.checkOneStatus({
-                        one: one,
-                        type: true
-                    })
+                    for (let j = 0; j < count; j++) {
+                        one.content.push(JSON.parse(JSON.stringify(tempNode)))
+                        this.checkOneStatus({
+                            one: one,
+                            type: true
+                        })
+                    }
                     this.$nextTick(() => {
                         var tempN = $(".edit.one").eq(oindex).find(".edit-title")
                         var goTop = tempN.eq(tempN.length - 1).offset().top
@@ -1318,13 +1293,14 @@
                     var noTagKey = [];
                     console.log(allCheckFields)
                     this.editData.filter(function (one) {
-                        if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                        if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
                             if (allCheckFields[one.key] && 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") {
                                         noTagKey.push(u.title);
                                     }
@@ -1346,7 +1322,7 @@
                                     return u.status === '-1'
                                 }).length
                             })
-                            if ((one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
+                            if ((one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
                                 return true
                             } else {
                                 return otherOne.length
@@ -1359,7 +1335,7 @@
                         this.editData.filter(function (one) {
                             //多包信息、中标候选人信息在为标注失败的前提下检测标注状态,一个失败不能保存
                             if (otherTag < 2) {
-                                if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                                if (one.title === "标的信息" || one.title === "采购意向信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
                                     if (one.status === "-1") {//没标
                                         if (otherTag !== 1) {//前一个标注成功不用记录后一个是否未标
                                             otherTag = 0
@@ -1452,7 +1428,7 @@
                         $.ajax({
                             url: "/front/data/jyuser/mark",
                             method: "post",
-                            data: {"data": d, "s_infoid": _id, "pid": pid, "s_sourceinfo": coll, "remark": remark},
+                            data: {"data": d, "s_infoid": _id, "pid": pid, "s_sourceinfo": coll, "remark": remark, "isEff": isEff},
                             success: function (res) {
                                 if (res) {
                                     _this.$message({
@@ -1472,7 +1448,7 @@
                         $.ajax({
                             url: "/front/data/user/mark",
                             method: "post",
-                            data: {"data": d, "s_infoid": _id, "s_usertaskid": tid, "remark": remark},
+                            data: {"data": d, "s_infoid": _id, "s_usertaskid": tid, "remark": remark, "isEff": isEff},
                             success: function (res) {
                                 if (res) {
                                     _this.$message({

+ 106 - 1
src/web/templates/project/task_user_list.html

@@ -3,6 +3,43 @@
 {{include "com/header.html"}}
 <!-- Left side column. 权限菜单 -->
 {{include "com/menu.html"}}
+<div class="modal fade" id="modal-task-append" tabindex="-1" role="dialog" aria-hidden="true">
+    <div class="modal-dialog" style="width: 60%">
+        <div class="modal-content">
+            <div class="modal-header">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                    <div class="edit-info">
+                        <span class="glyphicon glyphicon-tasks" aria-hidden="true"></span>
+                        <span class="h3">任务追加数据量</span>
+                    </div>
+                    <div class="edit-form">
+                        <form id="modal-form-task" class="form-horizontal">
+                            <div class="modal-body modal-task">
+                                <div class="form-group margin-bottom" style="margin-left: 15px">
+                                    <label class="control-label form-inline h4">待分发数据总量(条):
+                                        <span id="modal-num">0</span>
+                                    </label>
+                                </div>
+                                <hr>
+                                <div class="form-group" style="margin-left: 10px">
+                                    <label class="control-label form-inline" style="margin-left: 20px">领取数据(条):
+                                        <input type="number" id="append-num" class="form-control"></label>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <input type="button" onclick="saveTask()" class="btn btn-primary" value="保存">
+                <input type="button" onclick="cancelModel()" class="btn btn-default" value="取消">
+            </div>
+        </div>
+    </div><!-- /.modal -->
+</div>
+
+{{include "com/footer.html"}}
 <div class="content-wrapper">
     <section class="content-header">
         <h1>
@@ -52,7 +89,6 @@
     </section>
 </div>
 
-{{include "com/footer.html"}}
 <script>
     menuActive("/front/user/task/list");
 
@@ -115,6 +151,7 @@
                         tmp = '<div>' +
                             '<a class="btn btn-sm btn-primary" onclick="markMethod(\'' + val + '\',\''+row.s_projectid+'\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">标注</a>&nbsp;&nbsp;' +
                             '<a class="btn btn-sm btn-primary" onclick="deliverTask(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">交付</a>&nbsp;&nbsp;' +
+                            '<a class="btn btn-sm btn-primary" onclick="appendTask(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_parentid + '\')">领取数据</a>&nbsp;&nbsp;' +
                             '</div>';
                         return tmp
                     }
@@ -154,6 +191,74 @@
         }
     }
 
+    let ctid = ""
+    let cgid = ""
+    let sourceinfo = ""
+    function appendTask(id, sinfo, gid) {
+        $.ajax({
+            url: "/front/user/task/append",
+            type: 'POST',
+            data: {"taskid": id, "s_sourceinfo": sinfo, "groupid": gid},
+            success: function (r) {
+                if (r.success) {
+                    $('#modal-num').html(r.count)
+                    $('#append-num').attr('oninput', 'if(value<0)value=0')
+
+                    ctid = id
+                    cgid = gid
+                    sourceinfo = sinfo
+                    $('#modal-task-append').modal('show')
+                } else {
+                    showTip(r.msg);
+                }
+            }
+        })
+    }
+
+    function saveTask() {
+        let val = parseInt($('#append-num').val())
+        let max = parseInt($('#modal-num').html())
+        if (val <= 0) {
+            showTip("领取数据数量有误!");
+        }
+        if (val > max) {
+            $('#append-num').val(max)
+            showConfirm("领取数据数量大于实际可领取数量,是否领取默认最大数量" + max +"条?", function () {
+                $.ajax({
+                    url: "/front/user/task/append/save",
+                    type: 'POST',
+                    data: {"taskid": ctid, "s_sourceinfo": sourceinfo, "num": max, "groupid": cgid},
+                    success: function (r) {
+                        if (r.success) {
+                            ttable.api().ajax.reload()
+                        } else {
+                            showTip(r.msg);
+                        }
+                    }
+                })
+            })
+        } else {
+            $.ajax({
+                url: "/front/user/task/append/save",
+                type: 'POST',
+                data: {"taskid": ctid, "s_sourceinfo": sourceinfo, "num": val, "groupid": cgid},
+                success: function (r) {
+                    if (r.success) {
+                        $('#modal-task-append').modal('hide')
+                        showTip(r.msg);
+                        ttable.api().ajax.reload();
+                    } else {
+                        showTip(r.msg);
+                    }
+                }
+            })
+        }
+    }
+
+    function cancelModel() {
+        $("#modal-task-append").modal('hide')
+    }
+
     function markMethod(tid, pid, sourceinfo, status) {
         if (status !== "已关闭") {
             window.location.href ="/front/user/remark/list?pid="+pid+"&tid="+tid+"&s_sourceinfo="+sourceinfo