Browse Source

bug 报表接口调整

zhangweicheng 6 years ago
parent
commit
db7cbce3bb

+ 5 - 4
modules/main/facade/project_facade.js

@@ -333,14 +333,14 @@ function getReportData(nameList,items,prjTypeNames,decimal) {
     return datas;
 
 
-    function setChildrenDatas(children,arr) {
+    function setChildrenDatas(children,arr,level = 0) {
         for(let c of children){
-            arr.push(getBillDatas(c));
-            setChildrenDatas(c.children,arr);
+            arr.push(getBillDatas(c,level));
+            setChildrenDatas(c.children,arr,level+1);
         }
     }
 
-    function getBillDatas(bills) {
+    function getBillDatas(bills,level) {
         let tem = {
             billsName:bills.name,
             billsCode:bills.code,
@@ -349,6 +349,7 @@ function getReportData(nameList,items,prjTypeNames,decimal) {
             billsPrices:[],
             billsAmounts:[],
             '技术经济指标':[],
+            billsLevel:level,
             billsMemos:bills.remark
         };
         let total = 0;

+ 1 - 2
web/building_saas/main/js/models/project_glj.js

@@ -342,7 +342,7 @@ ProjectGLJ.prototype.materialCal = function (id,dataMap) {
     doc['supplyLocation'] = supplyLocation;
     //再计算运费
     let grossWeightCoe_n = doc['grossWeightCoe_n']?doc['grossWeightCoe_n']:glj.unit_price.grossWeightCoe_n;
-    grossWeightCoe_n = scMathUtil.roundForObj(grossWeightCoe_n,unitPirceDecimal);
+    grossWeightCoe_n = scMathUtil.roundForObj(grossWeightCoe_n,process);
     let unitFreight = this.freightCalc(glj,grossWeightCoe_n,dataMap);
     doc['unitFreight'] = unitFreight+'';
     //计算场外运输损耗
@@ -909,7 +909,6 @@ ProjectGLJ.prototype.changeVvTaxFile = async function (newVvTaxFileID,callback)
 
 ProjectGLJ.prototype.addMixRatio = function(selections,callback){
     let gljList = [],allGLJ = gljOprObj.AllRecode;
-    $("#glj_tree_div").modal('hide');
     if(selections.length == 0) {
         return;
     }