Преглед изворни кода

fix:修改融资管理底层货物销售总价计算规则

lazy пре 3 недеља
родитељ
комит
7f4e0a2620
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7 3
      src/views/myFinancing/applyFinancing/index.vue

+ 7 - 3
src/views/myFinancing/applyFinancing/index.vue

@@ -667,11 +667,15 @@ export default {
       list.forEach(item => {
         const { numTotal, salesTotal, purchaseTotal } = this.bottomCalc
         this.bottomCalc = {
-          numTotal: (Number(numTotal) + Number(item.goodsQuantity)).toFixed(4),
-          salesTotal: (Number(salesTotal) + Number(item.salesTotalPrice)).toFixed(4),
-          purchaseTotal: (Number(purchaseTotal) + Number(item.purchaseTotalPrice)).toFixed(4)
+          numTotal: (Number(numTotal) + Number(item.goodsQuantity)),
+          salesTotal: (Number(salesTotal) + (Number(item.goodsQuantity) * Number(item.salesPrice))),
+          purchaseTotal: (Number(purchaseTotal) + Number(item.purchaseTotalPrice))
         }
       })
+
+      this.bottomCalc.numTotal = this.bottomCalc.numTotal.toFixed(2)
+      this.bottomCalc.salesTotal = this.bottomCalc.salesTotal.toFixed(2)
+      this.bottomCalc.purchaseTotal = this.bottomCalc.purchaseTotal.toFixed(2)
     },
     // 生成底层
     getReceivable(list) {