Browse Source

no message

Jianghan 3 years ago
parent
commit
78e1e609a6
2 changed files with 13 additions and 16 deletions
  1. 5 8
      src/front/remark.go
  2. 8 8
      src/web/templates/project/remark_detail.html

+ 5 - 8
src/front/remark.go

@@ -242,8 +242,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["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := tmppack["isnew"].(bool)
 				status := "-1"
 				if tmppack["package_son"] != nil {
 					status = "1"
@@ -332,19 +331,18 @@ func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]
 	purchasinglist, _ := util.BiaoZhu["purchasinglist"].([]interface{})
 	var purchasinglists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的
-	isNewAndStatus := []map[string]interface{}{}
+	var isNewAndStatus []map[string]interface{}
 	if tmpcls, ok := info["purchasinglist"].([]interface{}); ok {
 		for _, v := range tmpcls {
 			if pcl, ok := v.(map[string]interface{}); ok {
-				//isNew, _ := pcl["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := pcl["isnew"].(bool)
 				status := "-1"
 				if pcl["purchasinglist_son"] != nil {
 					status = "1"
 				}
 				//isNewPcl = append(isNewPcl, isNew)
 				isNewAndStatus = append(isNewAndStatus, map[string]interface{}{"isnew": isNew, "status": status})
-				pcls := []interface{}{}
+				var pcls []interface{}
 				for _, ps := range purchasinglist {
 					ps, _ := ps.(map[string]interface{})
 					value := pcl[qu.ObjToString(ps["key"])]
@@ -380,8 +378,7 @@ func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]inte
 	if tmpwds, ok := info["winnerorder"].([]interface{}); ok {
 		for _, v := range tmpwds {
 			if wd, ok := v.(map[string]interface{}); ok {
-				//isNew, _ := wd["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := wd["isnew"].(bool)
 				status := "-1"
 				if wd["winnerorder_son"] != nil {
 					status = "1"

+ 8 - 8
src/web/templates/project/remark_detail.html

@@ -529,7 +529,6 @@
     var nextid = {{ .T.nextid }}
     //基本信息
     var common = {{ .T.common }}
-    console.log(common)
     var uInput = [];
     for (k in common) {
         var tmp = {}
@@ -607,7 +606,7 @@
         content.show = true
         content.status = worder_new[k]["status"]
         content.uInput = c_uInput
-        content.ck_isnew = worder_new[k]["isnew"] || false
+        content.isnew = worder_new[k]["isnew"] || false
         content.content = []
         c_content[k] = content
     }
@@ -636,7 +635,7 @@
         content.show = true
         content.status = pcl_new[k]["status"]
         content.uInput = c_uInput
-        content.ck_isnew = pcl_new[k]["isnew"] || false
+        content.isnew = pcl_new[k]["isnew"] || false
         content.content = []
         pcl_content[k] = content
     }
@@ -684,7 +683,7 @@
         content.show = true;
         content.status = packs[k]["packstatus"];
         content.uInput = uInputs;
-        content.ck_isnew = pkg_new[k] || false
+        content.isnew = pkg_new[k] || false
         content.num = packskey[k];
         p_content[k] = content;
 
@@ -1005,7 +1004,7 @@
                 delNewTwo: function (one, index, two) {
                     //two.ck_isnew = false //目前点删除按钮页面直接不显示,但是集合索引位置不变,所以加了此代码
                     //two.show = false
-                    if (two.ck_isnew) {
+                    if (two.isnew) {
                         one.content.splice(index, 1)
                     } else {
                         two.show = false
@@ -1091,7 +1090,7 @@
                             tempNode = {
                                 //content: [],
                                 show: true,
-                                ck_isnew: true,
+                                isnew: true,
                                 status: 2,
                                 title: "标的物",
                                 uInput: JSON.parse(JSON.stringify(pclfInput))
@@ -1103,7 +1102,7 @@
                                 //content: [],
                                 show: true,
                                 status: 2,
-                                ck_isnew: true,
+                                isnew: true,
                                 title: "子包",
                                 uInput: JSON.parse(JSON.stringify(pfInput))
                             }
@@ -1114,7 +1113,7 @@
                                 //content: [],
                                 show: true,
                                 status: 2,
-                                ck_isnew: true,
+                                isnew: true,
                                 title: "候选人",
                                 uInput: JSON.parse(JSON.stringify(wodfInput))
                             }
@@ -1376,6 +1375,7 @@
                     var d = JSON.stringify(this.editData);
                     console.log(d)
                     var _this = this
+                    return;
                     $.ajax({
                         url: "/front/data/mark",
                         method: "post",