Explorar el Código

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

lazy hace 3 semanas
padre
commit
7f4e0a2620
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  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) {