فهرست منبع

价差取舍。

chenshilong 7 سال پیش
والد
کامیت
fd5752f625
1فایلهای تغییر یافته به همراه11 افزوده شده و 8 حذف شده
  1. 11 8
      web/building_saas/main/js/models/calc_program.js

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

@@ -209,8 +209,8 @@ let calcTools = {
                 if (priceType == priceTypes.ptDiffPrice){
                     let aprice = me.uiGLJPrice(glj["adjustPrice"]);
                     let mprice = me.uiGLJPrice(glj["marketPrice"]);
-                    temp = (me.uiGLJQty(glj["quantity"]) * mprice).toDecimal(decimalObj.ration.unitPrice) - (me.uiGLJQty(glj["quantity"]) * aprice).toDecimal(decimalObj.ration.unitPrice);
-                    temp = temp.toDecimal(decimalObj.ration.unitPrice);
+                    temp = (me.uiGLJQty(glj["quantity"]) * mprice).toDecimal(decimalObj.process) - (me.uiGLJQty(glj["quantity"]) * aprice).toDecimal(decimalObj.process);
+                    temp = temp.toDecimal(decimalObj.process);
                 }
                 else {
                     if (priceType == priceTypes.ptBasePrice){ price = me.uiGLJPrice(glj["basePrice"]);}
@@ -420,14 +420,17 @@ let calcTools = {
 
         let sum = 0;
         for (let glj of treeNode.data.gljList){
-            if (pGLJIdx[glj.GLJID]) {
-                if (compositionArr.includes(glj.type) && 1) {
-                }
-                else {
-                    sum = sum + glj.basePrice * glj.quantity;
-                };
+            // 组成物
+            if (compositionArr.includes(glj.type)) {
 
             }
+            else {
+                if (pGLJIdx[glj.GLJID]) {
+
+                }
+                sum = sum + glj.basePrice * glj.quantity;
+            };
+
         };
         sum = sum.toDecimal(decimalObj.ration.unitPrice);
         return sum;