Jianghan 2 anni fa
parent
commit
e2996f9c42

+ 62 - 20
exportData/main.go

@@ -122,8 +122,13 @@ func main() {
 					}
 					row.AddCell().SetValue(str)
 				} else if v == "id" {
-					id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-					row.AddCell().SetValue(id)
+					if tmp["id"] != nil {
+						id := SE.EncodeString(util.ObjToString(tmp["id"]))
+						row.AddCell().SetValue(id)
+					} else {
+						id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+						row.AddCell().SetValue(id)
+					}
 				} else {
 					row.AddCell().SetValue(baseInfo[v])
 				}
@@ -160,8 +165,13 @@ func main() {
 									}
 									row.AddCell().SetValue(str)
 								} else if v == "id" {
-									id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-									row.AddCell().SetValue(id)
+									if tmp["id"] != nil {
+										id := SE.EncodeString(util.ObjToString(tmp["id"]))
+										row.AddCell().SetValue(id)
+									} else {
+										id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+										row.AddCell().SetValue(id)
+									}
 								} else {
 									row.AddCell().SetValue(baseInfo[v])
 								}
@@ -179,8 +189,13 @@ func main() {
 								}
 								row.AddCell().SetValue(str)
 							} else if v == "id" {
-								id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-								row.AddCell().SetValue(id)
+								if tmp["id"] != nil {
+									id := SE.EncodeString(util.ObjToString(tmp["id"]))
+									row.AddCell().SetValue(id)
+								} else {
+									id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+									row.AddCell().SetValue(id)
+								}
 							} else {
 								row.AddCell().SetValue(baseInfo[v])
 							}
@@ -198,8 +213,13 @@ func main() {
 							}
 							row.AddCell().SetValue(str)
 						} else if v == "id" {
-							id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-							row.AddCell().SetValue(id)
+							if tmp["id"] != nil {
+								id := SE.EncodeString(util.ObjToString(tmp["id"]))
+								row.AddCell().SetValue(id)
+							} else {
+								id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+								row.AddCell().SetValue(id)
+							}
 						} else {
 							row.AddCell().SetValue(baseInfo[v])
 						}
@@ -247,8 +267,13 @@ func main() {
 							}
 							row.AddCell().SetValue(str)
 						} else if v == "id" {
-							id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-							row.AddCell().SetValue(id)
+							if tmp["id"] != nil {
+								id := SE.EncodeString(util.ObjToString(tmp["id"]))
+								row.AddCell().SetValue(id)
+							} else {
+								id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+								row.AddCell().SetValue(id)
+							}
 						} else {
 							row.AddCell().SetValue(baseInfo[v])
 						}
@@ -266,8 +291,13 @@ func main() {
 						}
 						row.AddCell().SetValue(str)
 					} else if v == "id" {
-						id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-						row.AddCell().SetValue(id)
+						if tmp["id"] != nil {
+							id := SE.EncodeString(util.ObjToString(tmp["id"]))
+							row.AddCell().SetValue(id)
+						} else {
+							id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+							row.AddCell().SetValue(id)
+						}
 					} else {
 						row.AddCell().SetValue(baseInfo[v])
 					}
@@ -275,8 +305,8 @@ func main() {
 			}
 		case 3:
 			// 标的物 采购意向数据拆分
-			if baseInfo["purchasinglist"] != nil {
-				plist := baseInfo["purchasinglist"].([]interface{})
+			if baseInfo["procurementlist"] != nil {
+				plist := baseInfo["procurementlist"].([]interface{})
 				for _, p := range plist {
 					row := sheet.AddRow()
 					m := make(map[string]interface{})
@@ -297,9 +327,15 @@ func main() {
 							row.AddCell().SetValue(str)
 							m[v] = str
 						} else if v == "id" {
-							id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-							row.AddCell().SetValue(id)
-							m[v] = id
+							if tmp["id"] != nil {
+								id := SE.EncodeString(util.ObjToString(tmp["id"]))
+								row.AddCell().SetValue(id)
+								m[v] = id
+							} else {
+								id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+								row.AddCell().SetValue(id)
+								m[v] = id
+							}
 						} else {
 							row.AddCell().SetValue(baseInfo[v])
 							m[v] = baseInfo[v]
@@ -321,9 +357,15 @@ func main() {
 						row.AddCell().SetValue(str)
 						m[v] = str
 					} else if v == "id" {
-						id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
-						row.AddCell().SetValue(id)
-						m[v] = id
+						if tmp["id"] != nil {
+							id := SE.EncodeString(util.ObjToString(tmp["id"]))
+							row.AddCell().SetValue(id)
+							m[v] = id
+						} else {
+							id := SE.EncodeString(mongodb.BsonIdToSId(tmp["_id"]))
+							row.AddCell().SetValue(id)
+							m[v] = id
+						}
 					} else {
 						row.AddCell().SetValue(baseInfo[v])
 						m[v] = baseInfo[v]

+ 24 - 0
src/config.json

@@ -366,6 +366,30 @@
             {
                 "key": "contract_guarantee",
                 "descript": "是否支持保函"
+            },
+            {
+                "key": "buyerperson",
+                "descript": "采购单位联系人"
+            },
+            {
+                "key": "buertel",
+                "descript": "采购单位联系方式"
+            },
+            {
+                "key": "agencyperson",
+                "descript": "代理机构联系人"
+            },
+            {
+                "key": "agencytel",
+                "descript": "代理机构联系方式"
+            },
+            {
+                "key": "winnerperson",
+                "descript": "采购单位联系人"
+            },
+            {
+                "key": "winnertel",
+                "descript": "采购单位联系电话"
             }
         ]
     }

+ 22 - 7
src/front/remark.go

@@ -1067,9 +1067,11 @@ func (f *Front) CheckSave() {
 				MarkTimePlace(content, tagSet, baseSet, baseUnset)
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //多包
+			} else if j == 3 { //采购意向
+				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 4 { //候选人
+			} else if j == 5 { //候选人
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
 			} else { //其余信息
 				MarkOther(content, tagSet, baseSet, baseUnset)
@@ -1652,6 +1654,7 @@ func (f *Front) JyUserDataMark() {
 	obj := []map[string]interface{}{}
 	infoId := f.GetString("s_infoid")
 	sourceInfo := f.GetString("s_sourceinfo")
+	remark := f.GetString("remark")
 	pid := f.GetString("pid")
 	qu.Debug("Data ID:", infoId)
 	data := f.GetString("data")
@@ -1702,9 +1705,11 @@ func (f *Front) JyUserDataMark() {
 				MarkTimePlace(content, tagSet, baseSet, baseUnset)
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //多包
+			} else if j == 3 { //采购意向
+				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 4 { //候选人
+			} else if j == 5 { //候选人
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
 			} else { //其余信息
 				MarkOther(content, tagSet, baseSet, baseUnset)
@@ -1765,6 +1770,10 @@ func (f *Front) JyUserDataMark() {
 		for field, _ := range baseUnset {           //删除基本字段
 			baseUnsetResult["v_baseinfo."+field] = ""
 		}
+		// todo
+		if remark != "" {
+			setResult["v_taginfo.reamrk"] = remark
+		}
 		set := map[string]interface{}{
 			"$set": setResult,
 		}
@@ -1802,7 +1811,7 @@ func (f *Front) UserDataMark() {
 	username := qu.ObjToString(user["s_login"]) //当前登录用户
 	userId := qu.ObjToString(user["id"])        //当前登录用户标识
 	userRole := qu.ObjToString(user["i_role"])  //当前登录用户权限
-
+	remark := f.GetString("remark")
 	obj := []map[string]interface{}{}
 	infoId := f.GetString("s_infoid")
 	userTaskId := f.GetString("s_usertaskid")
@@ -1856,9 +1865,11 @@ func (f *Front) UserDataMark() {
 				MarkTimePlace(content, tagSet, baseSet, baseUnset)
 			} else if j == 2 { //标的物
 				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
-			} else if j == 3 { //多包
+			} else if j == 3 { //采购意向
+				MarkPurchasinglist(content, tagSet, baseSet, baseUnset, istag, status)
+			} else if j == 4 { //多包
 				MarkPackage(content, tagSet, baseSet, baseUnset, status)
-			} else if j == 4 { //候选人
+			} else if j == 5 { //候选人
 				MarkWonderorder(content, tagSet, baseSet, baseUnset, status)
 			} else { //其余信息
 				MarkOther(content, tagSet, baseSet, baseUnset)
@@ -1927,6 +1938,10 @@ func (f *Front) UserDataMark() {
 			setResult["s_excp"] = ex
 			setResult["s_excp_info"] = exp
 		}
+		// todo
+		if remark != "" {
+			setResult["v_taginfo.reamrk"] = remark
+		}
 		set := map[string]interface{}{
 			"$set": setResult,
 		}

+ 1 - 1
src/web/templates/project/project_list.html

@@ -810,7 +810,7 @@
                     if (r.success) {
                         $("#modal-add_data").modal('hide')
                         let msg = r.msg + "<br>"+"导入数据:"+r.importnum+"条;成功:"+r.successnum+"条;失败:"+r.failnum+"条。"
-                        showMsg(msg, 1500);
+                        showTip(msg, 1500);
                         ttable.api().ajax.reload();
                     } else {
                         showMsg(r.msg, 2000)

+ 7 - 2
src/web/templates/project/remark_detail.html

@@ -206,6 +206,9 @@
             <!--edit-box-->
             <div class="edit-box">
                 <!--edit-->
+                <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>
+                </div>
                 <div class="edit one" v-for="(one,oindex) in editData" :key="oindex">
                     <!--one-->
                     <div class="edit-title" @click="one.show = !one.show">
@@ -1437,12 +1440,14 @@
                 //保存事件
                 upChange: function (stype) {
                     var d = JSON.stringify(this.editData);
+                    console.log(this.editData)
+                    let remark = $('#remark').val()
                     var _this = this
                     if (tid === "") {
                         $.ajax({
                             url: "/front/data/jyuser/mark",
                             method: "post",
-                            data: {"data": d, "s_infoid": _id, "pid": pid, "s_sourceinfo": coll},
+                            data: {"data": d, "s_infoid": _id, "pid": pid, "s_sourceinfo": coll, "remark": remark},
                             success: function (res) {
                                 if (res) {
                                     _this.$message({
@@ -1462,7 +1467,7 @@
                         $.ajax({
                             url: "/front/data/user/mark",
                             method: "post",
-                            data: {"data": d, "s_infoid": _id, "s_usertaskid": tid},
+                            data: {"data": d, "s_infoid": _id, "s_usertaskid": tid, "remark": remark},
                             success: function (res) {
                                 if (res) {
                                     _this.$message({