From 6948c1962d88f0310f5a2bd6d1f6b4e8710d988d Mon Sep 17 00:00:00 2001
From: zhangdingyu <974548713@qq.com>
Date: Wed, 13 Nov 2019 10:11:26 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E8=AF=B7?=
=?UTF-8?q?=E6=AC=BE=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PurchasingCenter/FundApproval2/index.vue | 49 -------------------
.../PurchaseContractRequestFund/index.vue | 41 +++++++++++++---
2 files changed, 34 insertions(+), 56 deletions(-)
diff --git a/src/views/PurchasingCenter/FundApproval2/index.vue b/src/views/PurchasingCenter/FundApproval2/index.vue
index e766fa6b..7224ca88 100644
--- a/src/views/PurchasingCenter/FundApproval2/index.vue
+++ b/src/views/PurchasingCenter/FundApproval2/index.vue
@@ -158,55 +158,6 @@
-
diff --git a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue
index cf83fd6a..b205da00 100644
--- a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue
+++ b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue
@@ -75,7 +75,7 @@
-
+
@@ -84,12 +84,12 @@
- {{ scope.row.已付金额 }}
+ {{ parseFloat(scope.row.已付金额).toFixed(2) }}
- {{ scope.row.请款金额 }}
+ {{ parseFloat(scope.row.请款金额).toFixed(2) }}
@@ -200,17 +200,17 @@
- {{ scope.row.合同总额 ? parseInt(scope.row.合同总额 * 100)/100 : '-' }}
+ {{ scope.row.合同总额 ? (parseInt(scope.row.合同总额 * 100)/100).toFixed(2) : '-' }}
- {{ scope.row.已付金额 }}
+ {{ parseFloat(scope.row.已付金额).toFixed(2) }}
- {{ scope.row.申请中金额 }}
+ {{ parseFloat(scope.row.申请中金额).toFixed(2) }}
@@ -219,7 +219,7 @@
- 合计:元
+ 合计:元
确定请款
@@ -367,6 +367,32 @@ export default {
})
return sums
},
+ getSummaries2(param) { // 合计
+ const { columns, data } = param
+ const sums = []
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '总价'
+ return
+ } else if (index === 2 || index === 3) {
+ const values = data.map(item => Number(item[column.property]))
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ } else {
+ return prev
+ }
+ }, 0)
+ sums[index] = sums[index].toFixed(2) + ' 元'
+ } else {
+ sums[index] = 'N/A'
+ }
+ }
+ })
+ return sums
+ },
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
@@ -431,6 +457,7 @@ export default {
this.offGroup.push(val[i].采购合同流水号)
this.sumGroup.push(val[i].请款金额)
}
+ this.SUM = parseFloat(this.SUM).toFixed(2)
},
submitRequestFund() { // 确认请款
if (this.supplierValue && this.contractGroup.length !== 0) {