Browse Source

fix:我的贸易修改一键计算质保金计算

lazy 6 days ago
parent
commit
60ff9e2fd2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/myTrade/settlementDocumentManagement/add.vue

+ 3 - 3
src/views/myTrade/settlementDocumentManagement/add.vue

@@ -535,9 +535,9 @@ export default {
     calculateTotal() {
       let num = 0, price = 0, buyPrice = 0;
       this.ruleForm.goodsList.forEach(item => {
-        num = Number(num) + Number(item.goodsQuantity || 0)
-        price += Number(item.goodsQuantity || 0) * Number(item.salesPrice || 0)
-        buyPrice = Number(buyPrice) + Number(item.purchaseTotalPrice || 0)
+        num = Number(num) + Number(item.goodsQuantity)
+        price += Number(item.goodsQuantity) * Number(item.salesPrice)
+        buyPrice += Number(item.goodsQuantity) * Number(item.purchasePrice)
       })
       this.ruleForm.countTheGoods = (num * 10000 / 10000).toFixed(2)
       this.ruleForm.settleTotalSalesPrice = (price * 10000 / 10000).toFixed(2)