Forráskód Böngészése

debug

1.定位在空白处无焦点行时,鼠标右键“导入建设项目”亮显,默认导入建设项目文件排序定位在第一位
2.造价书右侧定额库,定额名称最前应去掉章节名称中已有的重复部分
3.内蒙古费用定额,新建建设项目页面隐藏“文件类型:投标、招标”
vian 5 éve
szülő
commit
a96c5916f9

+ 1 - 1
modules/main/models/project.js

@@ -143,7 +143,7 @@ Project.prototype.getDataSync = function(projectID){
                         const endTime = +new Date();
                         console.log(moduleName+'---------------'+(endTime - startTime));
                         cb(err, {moduleName: moduleName, data: data})
-                    }, true);
+                    }, true); // true 返回调价后的数据
                 }
             })(itemName))
         }

+ 1 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -558,7 +558,7 @@ let MainTreeCol = {
         }
         return tips
     },
-    // 字体颜色
+    // 字体颜色w
     foreColor: {
         // 清单综合单价>最高限价时,标红显示
         'feesIndex.common.unitFee': function (node) {

+ 10 - 9
web/building_saas/main/js/views/std_ration_lib.js

@@ -205,14 +205,15 @@ var rationLibObj = {
                 return;
             }
             //提取需要匹配的章节名称
-            //去掉前缀
-            let toMatchArr = sectionName.split(' '),
-                toMatchStr = toMatchArr[toMatchArr.length - 1];
-            //去掉后缀
-            let sectionReg = /\(\w{9,}\)/g,
-                regMatch = toMatchStr.match(sectionReg);
-            if (regMatch) {
-                toMatchStr = toMatchStr.replace(regMatch[regMatch.length - 1], '');
+            // 去掉后缀
+            const suffixReg = /[((]编码[::]\d+[))]/;
+            const tempName = sectionName.split(suffixReg)[0];
+            // 获取第一个空格后的内容
+            const sReg = /\s(.+)/;
+            const tempTarget = tempName.match(sReg);
+            const target = tempTarget ? tempTarget[1] : null;
+            if (!target) {
+                return;
             }
             //简化匹配到的定额名称
             for (let data of datas) {
@@ -225,7 +226,7 @@ var rationLibObj = {
                     continue;
                 }
                 let matchName = nameArr[0];
-                if (matchName === toMatchStr) {
+                if (matchName === target) {
                     nameArr.shift();
                     data.name = nameArr.join(' ');
                 }

+ 2 - 2
web/building_saas/pm/html/project-management.html

@@ -250,7 +250,7 @@
                         </div>
                     </div>
                     <span class="form-text text-danger" id="proj-valuation-info" style="display: none;">请选择计价规则</span>
-                    <div class="form-group row">
+                    <div class="form-group row" id="project-dialog-fileKind">
                         <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">文件类型</label>
                         <div class="col">
                             <div class="custom-control custom-radio custom-control-inline">
@@ -355,7 +355,7 @@
                             </div>
                         </div>
                         <span class="form-text text-danger" id="valuation-info" style="display: none;">请选择计价规则</span>
-                        <div class="form-group row">
+                        <div class="form-group row" id="tender-dialog-fileKind">
                             <label for="staticEmail" class="col-auto col-form-label col-form-label-sm">文件类型</label>
                             <div class="col">
                                 <div class="custom-control custom-radio custom-control-inline">

+ 19 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -464,6 +464,8 @@ const projTreeObj = {
                             if(selectedItem.children[0] .projType === projectType.project ) return false;//如果文件夹有子项,并且是建设项目,可用
                         }
                     }
+                } else {
+                    return false;
                 }
                 return true;
             },
@@ -1647,6 +1649,9 @@ const projTreeObj = {
             parent = selectNode.parent;
             next = selectNode.nextSibling;
             updateData["update"] = {query:{ID:selectNode.id()}}
+        } else if (!selectNode) { // 默认在第一位
+            parent = selectNode ? selectNode.parent : projTreeObj.tree._root;
+            next = selectNode ? selectNode.nextSibling : projTreeObj.tree.firstNode();
         }
         updateData["self"] ={ParentID:parent.id(),NextSiblingID:next?next.id():-1};
         return updateData;
@@ -1850,12 +1855,26 @@ $(document).ready(function() {
         folderDialog.on('shown.bs.modal', function () {
             $('#folder-name').focus();
         });
+        projDialog.on('show.bs.modal', function () {
+            // 内蒙古费用定额,新建建设项目页面隐藏“文件类型:投标、招标”
+            const filterCompilationNames = ['内蒙古定额(2017)'];
+            if (filterCompilationNames.includes(compilationData.name)) {
+                $('#project-dialog-fileKind').hide();
+            }
+        });
         projDialog.on('shown.bs.modal', function () {
             $('#project-name').focus();
         });
         engDialog.on('shown.bs.modal', function () {
             $('#engineering-name').focus();
         });
+        tenderDialog.on('show.bs.modal', function () {
+            $('#tender-name').focus();
+            const filterCompilationNames = ['内蒙古定额(2017)'];
+            if (filterCompilationNames.includes(compilationData.name)) {
+                $('#tender-dialog-fileKind').hide();
+            }
+        });
         tenderDialog.on('shown.bs.modal', function () {
             $('#tender-name').focus();
         });