Jelajahi Sumber

fix:当建设项目类型是“工程量清单”时,项目属性页面显示“建设项目信息-基本信息”,而不是判断单位工程的项目类型

vian 5 tahun lalu
induk
melakukan
68bbb84002

+ 5 - 4
modules/pm/controllers/pm_controller.js

@@ -222,10 +222,11 @@ module.exports = {
                 }
                 projInfo.engineeringInfo = engineeringInfo;
             }
-            //读取建设项目的基本信息
-            let basicInfo = await ProjectsData.getBasicInfo(projectID);
-            if(basicInfo !== null){
-                projInfo.property.basicInformation = basicInfo;
+            // 获取建设项目相关信息
+            const constructionProject = await pm_facade.getConstructionProject(projectID);
+            if (constructionProject) {
+                projInfo.property.basicInformation = constructionProject.property && constructionProject.property.basicInformation || null;
+                projInfo.property.projectValuationType = constructionProject.property && constructionProject.property.valuationType || null;
             }
             //获取单位工程完整目录结构
             let fullPath = await pm_facade.getFullPath(projectID);

+ 2 - 2
web/building_saas/main/js/views/project_info.js

@@ -82,8 +82,8 @@ var projectInfoObj = {
             //init decimal
             setDecimal(decimalObj, data.property.decimal);
             billsQuanDecimal.datas = data.property.billsQuantityDecimal || [billsDecimalView.angleDecimal];
-            // 工程量清单项目显示基本信息,预算项目不显示
-            if (data.property.valuationType === BUDGET) {
+            // 建设项目为工程量清单项目显示基本信息,预算项目不显示
+            if (data.property.projectValuationType === BUDGET) {
                 // 隐藏基本信息
                 $('#tab_poj-settings-basicInfo').removeClass('active');
                 $('#tab_poj-settings-basicInfo').hide();