diff --git a/src/views/PurchasingCenter/FundApproval1/index.vue b/src/views/PurchasingCenter/FundApproval1/index.vue index 9171bc17..bdc96f37 100644 --- a/src/views/PurchasingCenter/FundApproval1/index.vue +++ b/src/views/PurchasingCenter/FundApproval1/index.vue @@ -2,7 +2,7 @@

采购合同

- + - + @@ -59,58 +43,76 @@

合同明细

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -153,7 +155,6 @@ export default { row.采购合同流水号 ? check = 1 : check = 2 searchContactDetail(check, row.采购合同流水号, row.离线合同流水号).then(response => { this.contractDetail2 = response.data - // this.contractDetail1 = response.data[0].合同内容 }) }, searchOfflineContactDetail(row) { // 查询离线合同明细 @@ -186,6 +187,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 + }, fetchData() { this.searchTable1() // this.searchTable2() @@ -221,6 +248,8 @@ export default { this.searchTable2() }, searchTable01(row) { // 查看详情(请款信息包含的合同) + this.gridData1 = [] + this.contractDetail2 = [] searchRequsetFundDetail1(row.采购合同请款流水号).then(response => { this.gridData1 = response.data }) diff --git a/src/views/PurchasingCenter/FundApproval2/index.vue b/src/views/PurchasingCenter/FundApproval2/index.vue index 59ad373e..088e2ea1 100644 --- a/src/views/PurchasingCenter/FundApproval2/index.vue +++ b/src/views/PurchasingCenter/FundApproval2/index.vue @@ -2,7 +2,7 @@

采购合同

- + - + @@ -59,58 +43,77 @@

合同明细

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -286,6 +289,8 @@ export default { this.searchTable2() }, searchTable01(row) { // 查看详情(请款信息包含的合同) + this.gridData1 = [] + this.contractDetail2 = [] searchRequsetFundDetail1(row.采购合同请款流水号).then(response => { this.gridData1 = response.data }) diff --git a/src/views/PurchasingCenter/FundApproval3/index.vue b/src/views/PurchasingCenter/FundApproval3/index.vue index 7d8861ce..7f8f18b0 100644 --- a/src/views/PurchasingCenter/FundApproval3/index.vue +++ b/src/views/PurchasingCenter/FundApproval3/index.vue @@ -2,7 +2,7 @@

采购合同

- + - + @@ -59,58 +43,76 @@

合同明细

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -247,6 +249,8 @@ export default { this.searchTable2() }, searchTable01(row) { // 查看详情(请款信息包含的合同) + this.gridData1 = [] + this.contractDetail2 = [] searchRequsetFundDetail1(row.采购合同请款流水号).then(response => { this.gridData1 = response.data }) diff --git a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue index 887f6db1..43447039 100644 --- a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue @@ -15,7 +15,7 @@ 请款

请款表

- + - + @@ -113,58 +92,76 @@

合同明细

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
供应商: @@ -222,7 +219,6 @@ 合计: 确定请款 - @@ -347,8 +343,8 @@ export default { const sums = [] columns.forEach((column, index) => { if (index === 0) { - sums[index] = '总价' - } else if (index === 6) { + sums[index] = '合计' + } else if (index === 5) { const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量']))) if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => {