Prechádzať zdrojové kódy

fix: 单价文件编辑器,共用工程数量统计错误

zhangweicheng 3 rokov pred
rodič
commit
bead7be2de

+ 1 - 1
modules/unit_price_file/controllers/unit_price_controller.js

@@ -44,7 +44,7 @@ module.exports={
           taxType:project.property.taxType,
           region:project.property.region,
           overWriteUrl:req.session.sessionCompilation.overWriteUrl,
-          usedTenderList:usedTenderList,
+          usedTenderList:JSON.stringify(usedTenderList),
           usedTenderString:usedTenderString,
           unitpriceList:JSON.stringify(unitpriceList),
           gljTypeMap:JSON.stringify(gljTypeMap),

+ 2 - 1
web/building_saas/unit_price_file/index.html

@@ -43,6 +43,7 @@
   let taxType = '<%- taxType %>';
   let region = '<%- region %>';
   let unitPriceList = JSON.parse(`<%- unitpriceList %>`);
+  let usedTenderList = JSON.parse(`<%- usedTenderList %>`);
   let gljTypeMap = JSON.parse(`<%- gljTypeMap %>`);
   let mixRatioMap = JSON.parse(`<%- mixRatioMap %>`);
 </script>
@@ -72,7 +73,7 @@
             <span class="text-muted px-1"></span>
              <span><i class="fa fa-puzzle-piece"></i></span>
             <span class="text-truncate" data-toggle="tooltip" data-placement="bottom" data-original-title="<%= unitFileName%>">&nbsp;<%= unitFileName%></span>
-            &nbsp;(<span class="a_color" data-toggle="tooltip" id="pop-used-list"  style="float: none;" data-original-title="" title="<%= usedTenderString%>">与<span id="used-project-count" style="float: none;">1</span>个单位工程同步</span>)
+            &nbsp;(<span class="a_color" data-toggle="tooltip" id="pop-used-list"  style="float: none;" data-original-title="" title="<%= usedTenderString%>">与<span id="used-project-count" style="float: none;"> </span>个单位工程同步</span>)
           </div>
         </nav>
     </div>

+ 2 - 0
web/building_saas/unit_price_file/index.js

@@ -587,6 +587,8 @@ function initPage(){
   unitPriceObj.showMainDatas();
   unitPriceObj.showSubDatas();
   socketObject.connect("unitPrice");
+  let usedCount = usedTenderList.length;
+  $("#used-project-count").text(usedCount);
 }
 
 unitPriceObj.setUntiPriceMap();