Explorar o código

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

# Conflicts:
#	web/common/html/header.html
#	web/users/html/user-buy.html
vian %!s(int64=5) %!d(string=hai) anos
pai
achega
32c9339b56

+ 8 - 7
web/building_saas/main/js/models/calc_program.js

@@ -724,7 +724,7 @@ let calcTools = {
         };
         return result;
     },
-    partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) {
+    partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) {     // isRationPirce 为true时表示取定额价。如:甲供定额材料费
         if (!treeNode.data.gljList) return 0;
         let projectGLJ = projectObj.project.projectGLJ;
 
@@ -778,7 +778,6 @@ let calcTools = {
         let sum = 0;
         for (let glj of treeNode.data.gljList){
             let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
-            gljP = isRationPirce ? glj.basePrice : glj.marketPrice;
 
             let X = 1;    // 部分甲供系数(默认1,即完全甲供)
             let tempSGLJ = supplyGLJsIdx[glj.projectGLJID];
@@ -786,15 +785,17 @@ let calcTools = {
             if (tempSGLJ) {
                 // 处理部分甲供
                 if (baseName.includes('甲供') && (tempSGLJ.supply == supplyType.BFJG)){
-                    // let Q =  isTender ? tempSGLJ.tenderQuantity : tempSGLJ.quantity;
-                    let Q = tempSGLJ.quantity;
+                    let Q =  isTender ? tempSGLJ.tenderQuantity : tempSGLJ.quantity;
+                    // let Q = tempSGLJ.quantity;
                     Q = Q ? Q : 1;
                     X = tempSGLJ.supply_quantity / Q;
-                }
+                };
+                let gljP = isRationPirce ? glj.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(glj) : glj.marketPrice);
                 sum = (sum + gljP * gljQ * X).toDecimal(decimalObj.process);
             }
             else{   // 当前材料不是甲供材料
-                if (compT.includes(glj.type)) {   // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
+                // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
+                if (compT.includes(glj.type)) {
                     let pGLJ = projectGLJ.getDataByID(glj.projectGLJID);
                     let compositions = pGLJ.ratio_data;    // 组成物明细
                     if (compositions.length > 0){
@@ -804,7 +805,7 @@ let calcTools = {
                                 if (baseName.includes('甲供') && (c.supply == supplyType.BFJG)){
                                     X = c.supplyX;
                                 };
-                                let cP = isRationPirce ? c.basePrice : c.marketPrice;
+                                let cP = isRationPirce ? c.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(c) : c.marketPrice);
                                 sum = (sum + cP * c.consumption * gljQ * X).toDecimal(decimalObj.process);
                             }
                         }

+ 1 - 0
web/building_saas/main/js/views/sub_view.js

@@ -142,6 +142,7 @@ let subObj = {
         let tabID = "";
         if($('#qdzy').is(':visible')) tabID = "qdzy";
         if($('#qdjl').is(':visible')) tabID = "qdjl";
+        if(tabID == "") return;
         //总宽度
         let totalWidth = $('#subItems').width();
         //人材机和项目特征文本比例

+ 4 - 4
web/common/html/header.html

@@ -44,10 +44,10 @@
                 </div>
             </li>
             <% if (!versionName.includes('免费')) {%>
-                <li class="nav-item">
-                  <a href="user/buy" target="_blank"><img src="/web/building_saas/img/vip.png" data-toggle="tooltip" data-placement="bottom" data-original-title="专业版用户"></a>
-                </li> 
-                <% } %>  
+              <li class="nav-item">
+                <a href="user/buy" target="_blank"><img src="/web/building_saas/img/vip.png" data-toggle="tooltip" data-placement="bottom" data-original-title="专业版用户"></a>
+              </li> 
+             <% } %> 
             <% if (action === 'index' && controller === 'main') {%>
             <li class="nav-item dropdown">
                 <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-wrench" data-placement="bottom"></i> 工具</a>

+ 3 - 3
web/users/html/user-buy.html

@@ -76,9 +76,9 @@
                             <div class="col-sm-4 mb-5">
                                 <div class="card pro-version">
                                   <div class=" card-body">
-                                    <h3 class="card-title">
-                                        <img src="/web/building_saas/img/vip.png">
-                                        专业版
+                                    <h3 class="card-title text-white">
+                                      <img src="/web/building_saas/img/vip.png">
+                                      专业版
                                     </h3>
                                       <p class="card-text">
                                       <!--<ul class="pl-3">