|
@@ -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)
|