Explorar o código

投资概况增加统计值显示

ellisran hai 2 meses
pai
achega
00b63372cf
Modificáronse 2 ficheiros con 21 adicións e 2 borrados
  1. 9 1
      app/public/js/budget_info.js
  2. 12 1
      app/view/budget/info.ejs

+ 9 - 1
app/public/js/budget_info.js

@@ -298,27 +298,35 @@ $(document).ready(() => {
             const huishouInfo = _.find(tree.children, function (item) {
                 return item.name.indexOf('回收金额') !== -1 && (item.gu_tp || item.gai_tp || (item.final_tp !== undefined && item.final_tp) || item.yu_tp || (item.total_price !== undefined && item.total_price))
             });
-            let total_rate = 0, total_gai_tp = 0, total_gu_tp = 0, total_yu_tp = 0, total_price = 0, total_final_tp = 0;
+            let total_rate = 0, total_gai_tp = 0, total_gu_tp = 0, total_yu_tp = 0, total_zb_tp = 0, total_price = 0, total_final_tp = 0;
             if (level1List.length > 0) {
                 if (huishouInfo) {
                     total_gai_tp = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'gai_tp')), huishouInfo.gai_tp);
                     total_final_tp = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'final_tp')), huishouInfo.final_tp);
                     total_gu_tp = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'gu_tp')), huishouInfo.gu_tp);
                     total_yu_tp = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'yu_tp')), huishouInfo.yu_tp);
+                    total_zb_tp = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'zb_tp')), huishouInfo.zb_tp);
                     total_price = ZhCalc.sub(ZhCalc.sum(_.map(level1List, 'total_price')), huishouInfo.total_price);
                     total_rate = ZhCalc.div(ZhCalc.sub(total_final_tp, total_gai_tp), total_gai_tp);
                     $('#total_gai_tp').text(total_gai_tp ? ZhCalc.div(total_gai_tp, 10000) : 0);
                     $('#total_final_tp').text(total_final_tp ? ZhCalc.div(total_final_tp, 10000) : 0);
+                    $('#total_gu_tp').text(total_gu_tp ? ZhCalc.div(total_gu_tp, 10000) : 0);
+                    $('#total_yu_tp').text(total_yu_tp ? ZhCalc.div(total_yu_tp, 10000) : 0);
+                    $('#total_zb_tp').text(total_zb_tp ? ZhCalc.div(total_zb_tp, 10000) : 0);
                     // level1List.push(huishouInfo);
                 } else {
                     total_gai_tp = ZhCalc.sum(_.map(level1List, 'gai_tp'));
                     total_final_tp = ZhCalc.sum(_.map(level1List, 'final_tp'));
                     total_gu_tp = ZhCalc.sum(_.map(level1List, 'gu_tp'));
                     total_yu_tp = ZhCalc.sum(_.map(level1List, 'yu_tp'));
+                    total_zb_tp = ZhCalc.sum(_.map(level1List, 'zb_tp'));
                     total_price = ZhCalc.sum(_.map(level1List, 'total_price'));
                     total_rate = ZhCalc.div(ZhCalc.sub(total_final_tp, total_gai_tp), total_gai_tp);
                     $('#total_gai_tp').text(total_gai_tp ? ZhCalc.div(total_gai_tp, 10000) : 0);
                     $('#total_final_tp').text(total_final_tp ? ZhCalc.div(total_final_tp, 10000) : 0);
+                    $('#total_gu_tp').text(total_gu_tp ? ZhCalc.div(total_gu_tp, 10000) : 0);
+                    $('#total_yu_tp').text(total_yu_tp ? ZhCalc.div(total_yu_tp, 10000) : 0);
+                    $('#total_zb_tp').text(total_zb_tp ? ZhCalc.div(total_zb_tp, 10000) : 0);
                 }
             }
             $('#total_rate').text((total_rate ? ZhCalc.round(ZhCalc.mul(total_rate,100), 2) : 0) + '%');

+ 12 - 1
app/view/budget/info.ejs

@@ -42,7 +42,7 @@
                 <div class="col-4 px-0">
                     <div class="card ml-3">
                         <div class="card-header card-white d-flex justify-content-between">
-                            <div class="card-big-htext"><span class="card-icon mr-2"></span>增减幅度</div>
+                            <div class="card-big-htext"><span class="card-icon mr-2"></span>费用统计</div>
                             <div class="mt-1">万元</div></div>
                         <div class="card-body p-0">
                             <style>
@@ -77,6 +77,17 @@
                                 <div class="canyu-band">
                                     <h1 id="total_rate" class="">0%</h1>
                                     <h3 class="text-muted">增减幅度</h3>
+                                    <div class="row my-4 mx-0">
+                                        <div class="col-4 text-center text-muted p-0">
+                                            <h5><b id="total_gu_tp"></b></h5> <h6>投资估算</h6>
+                                        </div>
+                                        <div class="col-4 text-center text-muted p-0">
+                                            <h5><b id="total_yu_tp"></b></h5> <h6>施工图预算</h6>
+                                        </div>
+                                        <div class="col-4 text-center text-muted p-0">
+                                            <h5><b id="total_zb_tp"></b></h5> <h6>招标预算</h6>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>