From c6afa4ad65f7c16f5da3fe55f9b7d6d7e54815fc Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Thu, 14 Nov 2019 09:23:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseContractSearch/index.vue | 2 +- .../PurchaseTaskAllocate/index.vue | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue index 8ee54625..ac561361 100644 --- a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue @@ -73,7 +73,7 @@ size="mini" border style="width: 100%" - height="500px" + height="300px" highlight-current-row @row-click="searchTable2"> diff --git a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue index 7949d99f..d55e39f8 100644 --- a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue +++ b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue @@ -123,17 +123,17 @@ 已采购 - + - + - + @@ -305,17 +305,17 @@ 已采购 - + - + - + @@ -472,7 +472,7 @@ {{ scope.row.零件名称 }} - + From dd40eb88dd3fa7d55ebbaa1bdf708403db8d9e18 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Thu, 14 Nov 2019 09:48:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=90=88=E5=90=8C=E8=AF=B7=E6=AC=BE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchasingCenter/PurchaseContractRequestFund/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue index b205da00..887f6db1 100644 --- a/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractRequestFund/index.vue @@ -15,7 +15,7 @@ 请款

请款表

- + - + From 0916d5922f3f280e1cf7a9990f728a4b5d3d61cf Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Thu, 14 Nov 2019 15:15:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AF=B7=E6=AC=BE?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchasingCenter/FundApproval1/index.vue | 171 ++++++++++-------- .../PurchasingCenter/FundApproval2/index.vue | 145 ++++++++------- .../PurchasingCenter/FundApproval3/index.vue | 144 ++++++++------- .../PurchaseContractRequestFund/index.vue | 152 ++++++++-------- 4 files changed, 323 insertions(+), 289 deletions(-) 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) => {