Преглед изворни кода

fix: 报表汇总类型,新增4项目对比

lishihao пре 5 дана
родитељ
комит
7c667f3641
2 измењених фајлова са 48 додато и 45 уклоњено
  1. 1 0
      web/maintain/report/html/rpt_tpl_dtl_info.html
  2. 47 45
      web/maintain/report/js/rpt_tpl_main.js

+ 1 - 0
web/maintain/report/html/rpt_tpl_dtl_info.html

@@ -143,6 +143,7 @@
                         <option value="compareConstruct">对比建设项目</option>
                         <option value="compareBusinessUnit">对比业务项目(平台可弹窗)</option>
                         <option value="compareAndStageContrast">阶段对比审核表</option>
+                        <option value="changeCompare">阶段对比审核表(4个建设项目,多对多对多对多)</option>
                     </select>
                     <label class="form-check-label" id="outputDesignDataBar" style="display: none;">
                         <input onchange="zTreeOprObj.onChangeFlag('outputDesignData', this)"  id="outputDesignData" type="checkbox">输出设计清单

+ 47 - 45
web/maintain/report/js/rpt_tpl_main.js

@@ -57,7 +57,7 @@ let zTreeOprObj = {
         for (let item of result) {
           // if (item.is_release) {
           $("#compilations").append(
-            "<option value='" + item._id + "'>" + item.name + "</option>"
+            "<option value='" + item._id + "'>" + item.name + "</option>",
           );
           // }
         }
@@ -65,7 +65,7 @@ let zTreeOprObj = {
         me.getReportTemplateTreeEx($("#compilations").get(0));
       },
       null,
-      null
+      null,
     );
   },
   refreshNodes: function () {
@@ -105,7 +105,7 @@ let zTreeOprObj = {
       isAsync,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   copyReportTemplate: function (orgID, newID, isAsync, callback, failCallback) {
@@ -119,7 +119,7 @@ let zTreeOprObj = {
       isAsync,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   updateTreeRootNode: function (rawNode, isAsync, callback, failCallback) {
@@ -132,7 +132,7 @@ let zTreeOprObj = {
       isAsync,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   updateTopNodeName: function (topNode, isAsync, callback, failCallback) {
@@ -148,7 +148,7 @@ let zTreeOprObj = {
       isAsync,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   updateSubNode: function (topNode, subNode, isAsync, callback, failCallback) {
@@ -164,7 +164,7 @@ let zTreeOprObj = {
       isAsync,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   createIniNode: function () {
@@ -311,7 +311,7 @@ let zTreeOprObj = {
                       treeNode,
                       insertIdx,
                       newNodes,
-                      isSilent
+                      isSilent,
                     );
                   } else {
                     me.treeObj.addNodes(treeNode, 0, newNodes, isSilent);
@@ -320,7 +320,7 @@ let zTreeOprObj = {
                   alert("后台创建失败,请确认是否有重复类型跟节点!");
                 }
               },
-              null
+              null,
             );
           } else {
             alert("有重复编办!");
@@ -358,7 +358,7 @@ let zTreeOprObj = {
               me.treeObj.addNodes(treeNode, insertIdx, newNodes, isSilent);
               let tn = me.getParentNodeByNodeLevel(
                 treeNode,
-                NODE_LEVEL_COMPILATION_NEW
+                NODE_LEVEL_COMPILATION_NEW,
               );
               let newTopNode = me.buildRootNodeDoc(tn);
               me.updateTreeRootNode(
@@ -370,7 +370,7 @@ let zTreeOprObj = {
                   }
                   me.refreshNodes();
                 },
-                null
+                null,
               );
             }
           });
@@ -400,7 +400,7 @@ let zTreeOprObj = {
               me.treeObj.addNodes(treeNode, -1, newNodes, isSilent);
               let tn = me.getParentNodeByNodeLevel(
                 treeNode,
-                NODE_LEVEL_COMPILATION_NEW
+                NODE_LEVEL_COMPILATION_NEW,
               );
               let topNode = me.buildRootNodeDoc(tn);
               me.updateTreeRootNode(
@@ -412,7 +412,7 @@ let zTreeOprObj = {
                   }
                   me.refreshNodes();
                 },
-                null
+                null,
               );
             });
           }
@@ -437,14 +437,14 @@ let zTreeOprObj = {
       true,
       callback,
       failCallback,
-      null
+      null,
     );
   },
   onCheck: function (event, treeId, treeNode) {
     let me = zTreeOprObj;
     let topPNode = me.getParentNodeByNodeLevel(
       treeNode,
-      NODE_LEVEL_COMPILATION_NEW
+      NODE_LEVEL_COMPILATION_NEW,
     );
     let newTopNode = me.buildRootNodeDoc(topPNode);
     me.updateTreeRootNode(newTopNode, true, function (rst) {
@@ -469,11 +469,11 @@ let zTreeOprObj = {
     let srcNode = treeNodes[0];
     let sourceTopNode = me.getParentNodeByNodeLevel(
       srcNode,
-      NODE_LEVEL_COMPILATION_NEW
+      NODE_LEVEL_COMPILATION_NEW,
     );
     let targetTopNode = me.getParentNodeByNodeLevel(
       targetNode,
-      NODE_LEVEL_COMPILATION_NEW
+      NODE_LEVEL_COMPILATION_NEW,
     );
     me.moveSrcTopNode = null;
     if (moveType === "inner") {
@@ -525,7 +525,7 @@ let zTreeOprObj = {
     }
     let targetTopNode = me.getParentNodeByNodeLevel(
       targetNode,
-      NODE_LEVEL_COMPILATION_NEW
+      NODE_LEVEL_COMPILATION_NEW,
     );
     let newTopNode = null;
     let canContinue = false;
@@ -552,7 +552,7 @@ let zTreeOprObj = {
               displayMessage("更新模板节点失败!", "red", 2000);
               // console.log(badRst.toString());
               console.log(badRst);
-            }
+            },
           );
         } else {
           treeNodes[0].refId = newNodeID;
@@ -582,14 +582,14 @@ let zTreeOprObj = {
                   displayMessage("更新模板节点失败!", "red", 2000);
                   // console.log(badRst.toString());
                   console.log(badRst);
-                }
+                },
               );
             },
             function (badResult) {
               displayMessage("Copy请求失败!", "red", 2000);
               // console.log(badResult.toString());
               console.log(badResult);
-            }
+            },
           );
         }
       });
@@ -609,7 +609,7 @@ let zTreeOprObj = {
           displayMessage("移动请求失败!", "red", 2000);
           console.log(badResult.toString());
           canContinue = false;
-        }
+        },
       );
       if (canContinue && !isCopy && me.moveSrcTopNode) {
         let newSrcTopNode = me.buildRootNodeDoc(me.moveSrcTopNode);
@@ -622,7 +622,7 @@ let zTreeOprObj = {
           function (badResult) {
             displayMessage("移动请求失败!", "red", 2000);
             canContinue = true;
-          }
+          },
         );
       }
       me.moveSrcTopNode = null;
@@ -656,8 +656,8 @@ let zTreeOprObj = {
               item1.engineerId > item2.engineerId
                 ? 1
                 : item1.engineerId < item2.engineerId
-                ? -1
-                : 0;
+                  ? -1
+                  : 0;
           } else {
             if (item1.userId === "-100") {
               rst = 1;
@@ -726,7 +726,7 @@ let zTreeOprObj = {
         }
       },
       null,
-      null
+      null,
     );
   },
   chkAndSetDupRefTplIds: function (tplNodes, selectedRefId) {
@@ -841,7 +841,7 @@ let zTreeOprObj = {
                   refId: "",
                 });
                 allTopTplNodes[allTopTplNodes.length - 1].items.push(
-                  result[itemIdx]
+                  result[itemIdx],
                 );
                 break;
               }
@@ -851,7 +851,7 @@ let zTreeOprObj = {
             allTopTplNodes,
             setting,
             "rptTplTree",
-            me
+            me,
           );
           let topNodes = me.treeObj.getNodes();
           me.chkAndSetDupRefTplIds(topNodes, null);
@@ -883,7 +883,7 @@ let zTreeOprObj = {
         });
       },
       null,
-      null
+      null,
     );
   },
   getNewNodeID: function (scope, callback) {
@@ -896,7 +896,7 @@ let zTreeOprObj = {
       true,
       callback,
       null,
-      null
+      null,
     );
   },
   chkIfDupCompilationNode: function (rawNode, parentUserNode) {
@@ -946,7 +946,7 @@ let zTreeOprObj = {
       let me = zTreeOprObj,
         topPNode = me.getParentNodeByNodeLevel(
           treeNode,
-          NODE_LEVEL_COMPILATION_NEW
+          NODE_LEVEL_COMPILATION_NEW,
         );
       let rawNode = me.buildRootNodeDoc(topPNode, treeNode);
       if (treeNode.level === NODE_LEVEL_COMPILATION_NEW) {
@@ -1001,7 +1001,7 @@ let zTreeOprObj = {
       } else {
         let subTopNode = me.getParentNodeByNodeLevel(
           treeNode,
-          NODE_LEVEL_COMPILATION_NEW + 1
+          NODE_LEVEL_COMPILATION_NEW + 1,
         );
         let topPNode = subTopNode.getParentNode();
         let rawNode = me.buildSubRootNodeDoc(subTopNode);
@@ -1038,7 +1038,7 @@ let zTreeOprObj = {
 
       let subTopNode = me.getParentNodeByNodeLevel(
         me.currentNode,
-        NODE_LEVEL_COMPILATION_NEW + 1
+        NODE_LEVEL_COMPILATION_NEW + 1,
       );
       let topPNode = subTopNode.getParentNode();
       let rawNode = me.buildSubRootNodeDoc(subTopNode);
@@ -1059,7 +1059,7 @@ let zTreeOprObj = {
       me.currentNode.flags[flagProp] = flagDom[0].value.split(",");
       let subTopNode = me.getParentNodeByNodeLevel(
         me.currentNode,
-        NODE_LEVEL_COMPILATION_NEW + 1
+        NODE_LEVEL_COMPILATION_NEW + 1,
       );
       let topPNode = subTopNode.getParentNode();
       let rawNode = me.buildSubRootNodeDoc(subTopNode);
@@ -1084,11 +1084,11 @@ let zTreeOprObj = {
       me.currentNode.refId = me.currentNode.ID;
       let subTopNode = me.getParentNodeByNodeLevel(
         me.currentNode,
-        NODE_LEVEL_COMPILATION_NEW + 1
+        NODE_LEVEL_COMPILATION_NEW + 1,
       );
       let topPNode = me.getParentNodeByNodeLevel(
         subTopNode,
-        NODE_LEVEL_COMPILATION_NEW
+        NODE_LEVEL_COMPILATION_NEW,
       );
       let rawNode = me.buildSubRootNodeDoc(subTopNode);
       params.compilationId = topPNode.compilationId;
@@ -1110,7 +1110,7 @@ let zTreeOprObj = {
           }
         },
         null,
-        null
+        null,
       );
     }
   },
@@ -1244,7 +1244,7 @@ let zTreeOprObj = {
                   for (let i = 0; i < vType.length; i++) {
                     $("#valuationSelector_" + vType[i]).addClass("checked");
                     valuationTypeStrList.push(
-                      valuationSelectorMap["valuationSelector_" + vType[i]]
+                      valuationSelectorMap["valuationSelector_" + vType[i]],
                     );
                   }
                   valuationTypeStr = valuationTypeStrList.join(",");
@@ -1316,6 +1316,8 @@ let zTreeOprObj = {
                   $("#element_sumLv_flags")[0].selectedIndex = 21;
                 else if (sumLvType === "compareAndStageContrast")
                   $("#element_sumLv_flags")[0].selectedIndex = 22;
+                else if (sumLvType === "changeCompare")
+                  $("#element_sumLv_flags")[0].selectedIndex = 23;
                 else {
                   $("#element_sumLv_flags")[0].selectedIndex = 0;
                 }
@@ -1461,7 +1463,7 @@ let zTreeOprObj = {
             }
           },
           null,
-          null
+          null,
         );
         // 获取含量指标模板列表
         CommonAjax.postEx(
@@ -1472,12 +1474,12 @@ let zTreeOprObj = {
           function (result) {
             $("#select_aid_report_data_select").empty();
             $("#select_aid_report_data_select").append(
-              `<option value=""> </option>`
+              `<option value=""> </option>`,
             );
             result.forEach((i) => {
               if (i.aidReportID) {
                 $("#select_aid_report_data_select").append(
-                  `<option value="${i.aidReportID}">${i.aidReportName}</option>`
+                  `<option value="${i.aidReportID}">${i.aidReportName}</option>`,
                 );
               }
             });
@@ -1487,7 +1489,7 @@ let zTreeOprObj = {
             }
           },
           null,
-          null
+          null,
         );
       } else {
         me.currentNode.rptTpl[JV.NODE_MAIN_INFO][JV.NODE_MAIN_INFO_RPT_NAME] =
@@ -1540,7 +1542,7 @@ let zTreeOprObj = {
     }
     if (rptTpl[JV.NODE_FLOW_INFO]) {
       rptTpl[JV.NODE_FLOW_INFO][JV.PROP_MULTI_COLUMN] = parseInt(
-        $("#rptTplMultiCols")[0].value
+        $("#rptTplMultiCols")[0].value,
       );
       rptTpl[JV.NODE_FLOW_INFO][JV.PROP_ERASE_BLANK_ROWS] =
         $("#rptTplEraseBlankRows").get(0).checked || false;
@@ -1619,7 +1621,7 @@ let userListObj = {
         }
       },
       null,
-      null
+      null,
     );
   },
 };
@@ -1667,7 +1669,7 @@ $(".mutiSelector")
     $("#element_prjFlags_select").val(resultIDList);
     zTreeOprObj.onMutiChangeFlag(
       "valuationType",
-      $("#element_prjFlags_select")
+      $("#element_prjFlags_select"),
     );
     return false;
   });