From 71be9d86e7537d73512a7eb2c82d9e14925e1139 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Wed, 27 Jan 2021 14:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E9=97=A8=E7=BA=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/utils/request.js | 5 ++- src/views/ebiz/goodStart/Organization.vue | 39 ++++++++++++++----- .../ebiz/goodStart/PerformanceReport.vue | 4 ++ src/views/ebiz/product/HomeProduct.vue | 10 ++--- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js index 822c1e09d..d002bfc50 100644 --- a/src/assets/js/utils/request.js +++ b/src/assets/js/utils/request.js @@ -94,6 +94,8 @@ let hgb = ['/sale/order/selectHgb', '/sale/order/getHgbDetail'] let whitelist = ['/agent/white/getWhiteInfo'] +let goodStart = ['/data/performance/getComPerformance'] + let whiteList = [ '/customer/agent/getCustomersList', ...proposal, @@ -106,7 +108,8 @@ let whiteList = [ ...preserve, ...renewalManage, ...hgb, - ...whitelist + ...whitelist, + ...goodStart ] // 创建axios实例 diff --git a/src/views/ebiz/goodStart/Organization.vue b/src/views/ebiz/goodStart/Organization.vue index c7177af63..4c325a77e 100644 --- a/src/views/ebiz/goodStart/Organization.vue +++ b/src/views/ebiz/goodStart/Organization.vue @@ -11,6 +11,13 @@ {{ column.name }} + + 合计 + {{ totalYsbb }} + {{ totalYsjs }} + {{ totalBzbf }} + {{ totalCbjs }} + {{ index + 1 }} {{ value[key] | blankFilter }} @@ -56,7 +63,11 @@ export default { { name: '承保标保(万元)', key: 'bzbf' }, { name: '承保件数(件)', key: 'cbjs' } ], - values: [] + values: [], + totalYsbb: 0, + totalYsjs: 0, + totalBzbf: 0, + totalCbjs: 0 } }, watch: { @@ -90,15 +101,25 @@ export default { } } } + this.calculateTotal() }, - calculate() { - let allPrice = this.values.reduce((prevVal, currVal) => { - return prevVal + Number(currVal.cbbb) - }, 0) - this.values.map(product => { - product.percent = ((product.cbbb / allPrice) * 100).toFixed(2) - return product - }) + calculateTotal() { + this.totalYsbb = 0 + this.totalYsjs = 0 + this.totalBzbf = 0 + this.totalCbjs = 0 + for (let data of this.values) { + let ysbb = isNaN(parseFloat(data.ysbb)) ? 0 : parseFloat(data.ysbb) + let ysjs = isNaN(parseInt(data.ysjs)) ? 0 : parseInt(data.ysjs) + let bzbf = isNaN(parseFloat(data.bzbf)) ? 0 : parseFloat(data.bzbf) + let cbjs = isNaN(parseInt(data.cbjs)) ? 0 : parseInt(data.cbjs) + this.totalYsbb += ysbb + this.totalYsjs += ysjs + this.totalBzbf += bzbf + this.totalCbjs += cbjs + } + this.totalYsbb = this.totalYsbb.toFixed(2) + this.totalBzbf = this.totalBzbf.toFixed(2) } }, filters: { diff --git a/src/views/ebiz/goodStart/PerformanceReport.vue b/src/views/ebiz/goodStart/PerformanceReport.vue index b94da5f6a..951663323 100644 --- a/src/views/ebiz/goodStart/PerformanceReport.vue +++ b/src/views/ebiz/goodStart/PerformanceReport.vue @@ -480,4 +480,8 @@ span { ::v-deep .van-button { padding: 0 10px; } + +*::-webkit-scrollbar { + display: none; +} diff --git a/src/views/ebiz/product/HomeProduct.vue b/src/views/ebiz/product/HomeProduct.vue index 3b3854453..5da695e1f 100644 --- a/src/views/ebiz/product/HomeProduct.vue +++ b/src/views/ebiz/product/HomeProduct.vue @@ -62,7 +62,7 @@
- +
@@ -76,7 +76,7 @@ - @@ -91,7 +91,7 @@ - @@ -303,7 +303,7 @@ td.sticky-col:nth-of-type(1) { th.sticky-col:nth-of-type(2), td.sticky-col:nth-of-type(2) { position: sticky; - left: 59px; + left: 53px; } .home-product-container { @@ -358,7 +358,7 @@ td.sticky-col:nth-of-type(2) { border-collapse: collapse; td, th { - padding: 10px 5px; + padding: 10px 2px; background-color: #fff3f1; color: #d84535; font-size: 14px;
{{ thead }}
{{ org.cbbfMon | blankFilter }}
+ 暂无数据 {{ org.bzbf | blankFilter }}
+ 暂无数据