Browse Source

人材机反算问题。

chenshilong 5 năm trước cách đây
mục cha
commit
fcc9315784
1 tập tin đã thay đổi với 9 bổ sung4 xóa
  1. 9 4
      web/building_saas/main/js/models/calc_program.js

+ 9 - 4
web/building_saas/main/js/models/calc_program.js

@@ -528,13 +528,18 @@ let calcTools = {
             }
             else if (treeNode.data.type == rationType.gljRation){
                 let prc = 0;
-                if (treeNode.data.subType === gljType.EQUIPMENT && calcTools.inBase(baseName, 'SC_SBF'))
-                    prc = gljOprObj.getMarketPrice(treeNode)
+                // if (treeNode.data.subType === gljType.EQUIPMENT && calcTools.inBase(baseName, 'SC_SBF'))
+                //     prc = gljOprObj.getMarketPrice(treeNode)
+                // else
+                //     prc = gljOprObj.getBasePrice(treeNode);
+
+                if (baseName.includes('定额'))
+                    prc = gljOprObj.getBasePrice(treeNode)
                 else
-                    prc = gljOprObj.getBasePrice(treeNode);
+                    prc = treeNode.data.marketUnitFee ? parseFloat(treeNode.data.marketUnitFee).toDecimal(decimalObj.ration.unitPrice) : gljOprObj.getBasePrice(treeNode);
 
                 result = (prc * nodeQ).toDecimal(decimalObj.ration.unitPrice);
-            }
+            };
 
         }
         else if (treeNode.data.subType === gljType.GENERAL_MACHINE && calcTools.inBase(baseName, 'JSRGF')) {