Forráskód Böngészése

fix:修改融资管理、结算单管理货物合计单位

lazy 2 hete%!(EXTRA string=óta)
szülő
commit
6d493e8cbc

+ 10 - 6
src/views/financingManage/components/ApplyFinancing.vue

@@ -521,11 +521,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)
     },
     // 底层信息计算
     getReceivableCalc(list) {
@@ -537,9 +541,9 @@ export default {
       list.forEach(item => {
         const { numTotal, accountsTotal, netAccounts } = this.bottomInfoCalc
         this.bottomInfoCalc = {
-          numTotal: (Number(numTotal) + Number(item.goodsQuantity)).toFixed(4),
-          accountsTotal: (Number(accountsTotal) + Number(item.accountsReceivableAmount)).toFixed(4),
-          netAccounts: (Number(netAccounts) + Number(item.netAccountsReceivableAmount)).toFixed(4)
+          numTotal: (Number(numTotal) + Number(item.goodsQuantity)).toFixed(2),
+          accountsTotal: (Number(accountsTotal) + Number(item.accountsReceivableAmount)).toFixed(2),
+          netAccounts: (Number(netAccounts) + Number(item.netAccountsReceivableAmount)).toFixed(2)
         }
       })
     },

+ 1 - 1
src/views/settlementManagement/components/add.vue

@@ -358,7 +358,7 @@ export default {
   },
   computed: {
     changeNum1() {
-      return fourMoney(this.ruleForm.countTheGoods)
+      return formatMoney(this.ruleForm.countTheGoods)
     },
     changeNum2() {
       return handleMoney(this.ruleForm.settleTotalSalesPrice)

+ 1 - 1
src/views/settlementManagement/components/edit.vue

@@ -172,7 +172,7 @@ export default {
   },
   computed: {
     changeNum1() {
-      return fourMoney(this.ruleForm.countTheGoods)
+      return formatMoney(this.ruleForm.countTheGoods)
     },
     changeNum2() {
       return handleMoney(this.ruleForm.settleTotalSalesPrice)