Sfoglia il codice sorgente

feat:当建设项目类型是“工程量清单”时,项目属性页面显示“建设项目信息-基本信息”

vian 5 anni fa
parent
commit
8062a2b29e

+ 4 - 4
web/building_saas/main/html/main.html

@@ -692,8 +692,8 @@
                     <div class="row">
                         <div class="col-3">
                             <ul class="nav flex-column nav-pills" role="tablist">
-                                <!--<li class="nav-item"><a class="nav-link active" data-toggle="pill" href="#poj-settings-basicInfo" role="tab" id="tab_poj-settings-basicInfo">建设项目基本信息</a></li>-->
-                                <li class="nav-item"><a class="nav-link active" data-toggle="pill" href="#poj-settings-projFeature" id="tab_poj-settings-projFeature" role="tab">工程特征</a></li>
+                                <li class="nav-item"><a class="nav-link active" data-toggle="pill" href="#poj-settings-basicInfo" role="tab" id="tab_poj-settings-basicInfo">建设项目基本信息</a></li>
+                                <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-projFeature" id="tab_poj-settings-projFeature" role="tab">工程特征</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-indicativeInfo" id="tab_poj-settings-indicativeInfo" role="tab">指标信息</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-4" id="about-calc" role="tab">关于计算</a></li>
                                 <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#poj-settings-billsQuanDecimal" id="tab_poj-settings-bqDecimal" role="tab">清单工程量精度</a></li>
@@ -706,12 +706,12 @@
                         <div class="col-9">
                             <div class="tab-content">
                                 <!--基本信息-->
-                                <div class="tab-pane fade" id="poj-settings-basicInfo" role="tabpanel">
+                                <div class="tab-pane fade show active" id="poj-settings-basicInfo" role="tabpanel">
                                     <div class="modal-auto-height" style="overflow: hidden;" id="basicInfoSpread">
                                     </div>
                                 </div>
                                 <!--工程特征-->
-                                <div class="tab-pane fade show active" id="poj-settings-projFeature" role="tabpanel">
+                                <div class="tab-pane fade" id="poj-settings-projFeature" role="tabpanel">
                                     <div class="modal-auto-height" style="overflow: hidden" id="projFeatureSpread">
                                     </div>
                                 </div>

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

@@ -2,6 +2,10 @@
  * Created by Mai on 2017/6/21.
  */
 
+const { 
+    ValuationType: { BUDGET, BOQ },
+} = window.commonConstants;
+
 var projectInfoObj = {
     // 头部同时编辑的用户头像
     handleAvatarList: function (users) {
@@ -74,10 +78,22 @@ var projectInfoObj = {
             }
 
             //打开预算项目时,右侧“清单规则”显示为“项目表”,打开工程量清单项目时,右侧“清单规则”显示为“清单范本”。
-            $('#stdBillsGuidanceTab').text(data.property.valuationType === 'bill' ? '项目表' : '清单范本');
+            $('#stdBillsGuidanceTab').text(data.property.valuationType === BUDGET ? '项目表' : '清单范本');
             //init decimal
             setDecimal(decimalObj, data.property.decimal);
             billsQuanDecimal.datas = data.property.billsQuantityDecimal || [billsDecimalView.angleDecimal];
+            // 工程量清单项目显示基本信息,预算项目不显示
+            if (data.property.valuationType === BUDGET) {
+                // 隐藏基本信息
+                $('#tab_poj-settings-basicInfo').removeClass('active');
+                $('#tab_poj-settings-basicInfo').hide();
+                $('#poj-settings-basicInfo').removeClass('show');
+                $('#poj-settings-basicInfo').removeClass('active');
+                // 显示工程特征
+                $('#tab_poj-settings-projFeature').addClass('active');
+                $('#poj-settings-projFeature').addClass('show');
+                $('#poj-settings-projFeature').addClass('active');
+            }
             basicInfoView.orgDatas = data.property.basicInformation ? basicInfoView.toViewDatas(data.property.basicInformation) : [];
             projFeatureView.orgDatas = data.property.projectFeature ? projFeatureView.toViewDatas(data.property.projectFeature) : [];
             $('#fullpath').html(this.getFullPathHtml(data));
@@ -88,7 +104,7 @@ var projectInfoObj = {
             });
             SHARE_TO.handleEventListener();
             $("[data-toggle='tooltip']").tooltip();
-            if (data.property.valuationType == 'bill') {
+            if (data.property.valuationType == BUDGET) {
                 $("#tab_tender_price").css('display', 'none');
             } else {
                 $("#about-calc").css('display', 'none');

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

@@ -474,7 +474,7 @@ let basicInfoView = {
 
 $(document).ready(function () {
     //暂时隐藏
-   /* $('#poj-set').on('shown.bs.modal', function (e) {
+   $('#poj-set').on('shown.bs.modal', function (e) {
         //init Spread
         basicInfoView.initDatas(basicInfoView.orgDatas);
         basicInfoView.buildSheet();
@@ -495,7 +495,7 @@ $(document).ready(function () {
 
     $('#tab_poj-settings-basicInfo').on('shown.bs.tab', function () {
         basicInfoView.workBook.refresh();
-    });*/
+    });
     $('#openProjSet').click(function () {
         $('[data-toggle="tooltip"]').tooltip('hide');
         $('#poj-set').modal('show');