Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

yuanrf 3 days ago
parent
commit
0db61562d5
1 changed files with 11 additions and 8 deletions
  1. 11 8
      src/components/Finance/ConferenceCost.vue

+ 11 - 8
src/components/Finance/ConferenceCost.vue

@@ -368,7 +368,7 @@ export default {
                 priceName: '',//费用名称
                 costPrice: 0,//成本费用
                 currency: 836,//币种
-                rate: 0,//当时汇率
+                rate: 1,//当时汇率s
                 count: 0,//数量333
                 unit: '',//单位
                 coefficient: 0,//系数
@@ -396,23 +396,26 @@ export default {
         },
 
         updateTotals() {
-            // Calculate cost total
+            // 计算成本总计
             this.conferenceAffairsCost.costAll = this.tableDatas.reduce((sum, item) => {
+                console.log(item);
+                console.log(sum);
+                
                 if (this.rateStatistics.length > 1) {
-                    return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0);
+                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0))+((Number(item.rate) || 0) * (Number(item.addedValue) || 0));
                 } else {
-                    return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0);
+                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0))+(Number(item.addedValue) || 0);
                 }
             }, 0).toFixed(2);
 
-            // Calculate quotation total
+            // 计算报价总计
             this.conferenceAffairsCost.baoJiaAll = this.tableDatas.reduce((sum, item) => {
                 if (this.rateStatistics.length > 1) {
-                    return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0) * (Number(item.coefficient) || 0);
+                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0) * (Number(item.coefficient) || 0))+((Number(item.rate) || 0) * (Number(item.addedValue) || 0));
                 } else {
-                    return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.coefficient) || 0);
+                    return sum + ((Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.coefficient) || 0))+(Number(item.addedValue) || 0);
                 }
-                // return sum + (Number(item.baoJiaPrice) || 0);
+ 
             }, 0).toFixed(2);
         },
         //分配HUI率切换