Browse Source

浙江导入导出调整

TonyKang 3 years atrás
parent
commit
c1d89dfa25

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

@@ -345,6 +345,7 @@ const projTreeObj = {
                 CommonHeader.doAfterValidateVersion(
                     () => $('#interface-import-modal').modal('show'),
                     () => alert(`${commonUtil.getVersionText()}不提供此功能。`)
+                    // () => $('#interface-import-modal').modal('show') //临时
                 );
                 // $('#interface-import-modal').modal('show');
             }

+ 4 - 0
web/building_saas/standard_interface/export/zhejiang_ninghai.js

@@ -277,6 +277,10 @@ INTERFACE_EXPORT = (() => {
       if (!calcTools.isLeafBill(node)) {
         return '1';
       }
+      // 备注:增加判断,有些目录下无子项,原则上属于叶子,但应该还是要设置成目录
+      if ( (node.data.name.indexOf('第') >= 0) && (node.data.name.indexOf('00章') >= 0) ) {
+        return '1';
+      }
       // 专项暂定
       if (node.data.specialProvisional == '专业工程') {
         return '21';

+ 4 - 2
web/building_saas/standard_interface/import/zhejiang_ninghai.js

@@ -110,7 +110,8 @@ INTERFACE_IMPORT = (() => {
       let oneSevenBills;
       let dayWorkBills;
       roots.forEach(item => {
-        const simpleName = item.name ? item.name.replace(/\s/g, '') : '';
+        // const simpleName = item.name ? item.name.replace(/\s/g, '') : '';
+        const simpleName = item.name ? item.name : ''; // 根据需求,保留所有类型的空格(空格、换行、tab缩进)
         if (item.titleType === '1' || /100章至第700章|100章至700章/.test(simpleName)) {
           oneSevenBills = item;
         } else if (item.titleType === '4' || /计日工合计|计日工/.test(simpleName)) {
@@ -138,7 +139,8 @@ INTERFACE_IMPORT = (() => {
         dayWorkBills.children = extractItemsRecur(dayWorkSrc, [[title], [detail]], (src, curField) => {
           const name = getValue(src, ['_名称']);
           const dataType = getValue(src, ['_数据类型']);
-          const simpleName = name ? name.replace(/\s/g, '') : ''
+          // const simpleName = name ? name.replace(/\s/g, '') : ''
+          const simpleName = name ? name : ''; // 根据需求,保留所有类型的空格(空格、换行、tab缩进)
           if (curField === title && (dataType === '0' || /计日工合计|计日工/.test(simpleName))) { // 计日工标题在根节点中已经提取了,不重复提取
             return null;
           }