Просмотр исходного кода

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

chenshilong 3 лет назад
Родитель
Сommit
3605471c4a

+ 16 - 1
web/building_saas/main/js/views/glj_view.js

@@ -1239,7 +1239,22 @@ var gljOprObj = {
     replaceProgramInfo:function(oldType,newType){
         //检查是否由混凝土替换为商品砼或者商品砂浆
         if(gljUtil.isConcreteToCommercialConcrete(oldType,newType)){
-           setTimeout(()=>{alert("请手动修改取费类别为构造物III");},300); 
+            const showCompilations1 = ['浙江养护(2005)', '内蒙古养护(2019)', '安徽养护(2018)', '山东养护(2016)'];
+            const showMsg1 = '请手动修改取费类别为构造物III';
+            const showCompilations2 = ['广西养护(2020)', '广西日常养护(2020)'];
+            const showMsg2 = '请手动修改取费类别为商混及外构件';
+            const showCompilations3 = ['河南养护(2022)', '河南日常养护(2022)'];
+            const showMsg3 = '请手动修改取费类别为商品混凝土及外构件';
+
+            if (showCompilations1.includes(compilationName)) {
+                // 隐藏,不显示
+            } else if (showCompilations2.includes(compilationName)) {
+                setTimeout(()=>{alert(showMsg2);},300); 
+            } else if (showCompilations3.includes(compilationName)) {
+                setTimeout(()=>{alert(showMsg3);},300); 
+            } else {
+                setTimeout(()=>{alert(showMsg1);},300); 
+            }
         }
     },
 

+ 7 - 5
web/building_saas/main/js/views/importBills.js

@@ -62,7 +62,8 @@ const importBills = (function () {
     //分析文件,1、工程量清单 2、清单示例表
     function getFileType(sheetData) {
         let dataTable = sheetData.data.dataTable,
-            rowCount = sheetData.rowCount;
+            // rowCount = sheetData.rowCount;
+            rowCount = sheetData.rows.length;
         for (let row = 0; row < rowCount; row++) {
             if (isGCLHead(dataTable[row], dataTable[row + 1])) {
                 return fileType.gcl;
@@ -77,7 +78,8 @@ const importBills = (function () {
     //层级由depth确定,表格里最顶层depth为0(表头里一清单),表格内容里数据的depth为空格数+1
     function extractGCLDatas(sheetData, colMapping) {
         let dataTable = sheetData.data.dataTable,
-            rowCount = sheetData.rowCount;
+            // rowCount = sheetData.rowCount;
+            rowCount = sheetData.rows.length;
         let rst = [];
         for (let row = 0; row < rowCount; row++) {
             //表格中顶层节点
@@ -219,7 +221,7 @@ const importBills = (function () {
             rowCount: 0,
         };
         const dataTable = sheetData.data.dataTable;
-        const rowCount = sheetData.rowCount;
+        const rowCount = sheetData.rows.length;
         let preRootName;
         for (let row = 0; row < rowCount; row++) {
             const rowData = dataTable[row];
@@ -256,7 +258,7 @@ const importBills = (function () {
     //提取清单示例数据
     function extractSLDatas(sheetData) {
         let dataTable = sheetData.data.dataTable,
-            rowCount = sheetData.rowCount;
+            rowCount = sheetData.rows.length;
         let rst = [];
         let curRoot = null;
         for (let row = 0; row < rowCount; row++) {
@@ -338,7 +340,7 @@ const importBills = (function () {
         let curSheetType = null;
         for (let sheetName in sheets) {
             let sheetData = sheets[sheetName];
-            if (!sheetData.data.dataTable) {
+            if (!sheetData.data.dataTable || sheetData.index !== 0) {
                 continue;
             }
             let sheetType = getFileType(sheetData);