mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 07:36:44 +08:00
Merge branch 'feature/GFRS-315_【1230】开门红数据报表'
This commit is contained in:
10
src/api/ebiz/report/report.js
Normal file
10
src/api/ebiz/report/report.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
|
||||
export function reportList(data) {
|
||||
return request({
|
||||
url: getUrl('/data/resultsReport/queryResultsReport', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -9,4 +9,5 @@ import product from './product'
|
||||
import agentEenter from './agentEenter.js'
|
||||
import milestone from './milestone'
|
||||
import poster from './poster'
|
||||
export default [...proposal, ...sale, ...customer, ...my, ...serve, ...common, ...product, ...agentEenter, ...milestone, ...poster] //根据需要进行删减
|
||||
import report from "./report"
|
||||
export default [...proposal, ...sale, ...customer, ...my, ...serve, ...common, ...product, ...agentEenter, ...milestone, ...poster, ...report] //根据需要进行删减
|
||||
|
||||
24
src/router/ebiz/report.js
Normal file
24
src/router/ebiz/report.js
Normal file
@@ -0,0 +1,24 @@
|
||||
//数据报表 定义相关组件
|
||||
const reportList = () => import('@/views/ebiz/report/reportList')
|
||||
const reportDetail = () => import('@/views/ebiz/report/reportDetail')
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/report/reportList',
|
||||
name: 'reportList',
|
||||
component: reportList,
|
||||
meta: {
|
||||
title: '开门红数据报表',
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/report/reportDetail',
|
||||
name: 'reportDetail',
|
||||
component: reportDetail,
|
||||
meta: {
|
||||
title: '个险渠道',
|
||||
index: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
163
src/views/ebiz/report/reportDetail.vue
Normal file
163
src/views/ebiz/report/reportDetail.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<div class="report-list-container mt15">
|
||||
<div class="all">
|
||||
<table class="move-table" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<th>{{this.title | filterTitle}}</th>
|
||||
<th>当日预收件数</th>
|
||||
<th>当日预收规模保费(万元)</th>
|
||||
<th>当日承保件数</th>
|
||||
<th>当日承保规模保费(万元)</th>
|
||||
<th>当日承保标准保费(万元)</th>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in reportList" :key="index">
|
||||
<td>{{item.sellTypeName}}</td>
|
||||
<td>{{item.preItems}}</td>
|
||||
<td>{{item.prePrem}}</td>
|
||||
<td>{{item.items}}</td>
|
||||
<td>{{item.prem}}</td>
|
||||
<td>{{item.standPrem}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="l">
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="fixed-l">
|
||||
<tr>
|
||||
<th>{{this.title | filterTitle}}</th>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in reportList" :key="index">
|
||||
<td>{{item.sellTypeName}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { List, Tab, Tabs, Tag, Row, Col, Dialog, Sticky } from 'vant'
|
||||
import { reportList } from '@/api/ebiz/report/report'
|
||||
|
||||
export default {
|
||||
name: 'reportDetail',
|
||||
components: {
|
||||
[List.name]: List,
|
||||
[Tab.name]: Tab,
|
||||
[Tabs.name]: Tabs,
|
||||
[Tag.name]: Tag,
|
||||
[Row.name]: Row,
|
||||
[Col.name]: Col,
|
||||
[Sticky.name]: Sticky
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
reportList: [],
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
mounted() {
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
this.reportList = JSON.parse(localStorage.reportList)
|
||||
if (localStorage.title == '团险') {
|
||||
this.title = '健康险'
|
||||
} else if (localStorage.title == '银代') {
|
||||
this.title = '银保'
|
||||
} else {
|
||||
this.title = localStorage.title
|
||||
}
|
||||
this.reportList.map((item, index) => {
|
||||
if(item.sellTypeName == null) {
|
||||
item.sellTypeName = '其他'
|
||||
}
|
||||
})
|
||||
// 筛选按钮的点击事件
|
||||
document.title = this.title + '渠道'
|
||||
},
|
||||
filters: {
|
||||
filterTitle: function(value) {
|
||||
let text
|
||||
switch (value) {
|
||||
case '个险':
|
||||
text = '险种'
|
||||
break
|
||||
case '中介':
|
||||
text = '合作渠道'
|
||||
break
|
||||
case '网销':
|
||||
text = '数据来源'
|
||||
break
|
||||
case '健康险':
|
||||
text = '子渠道名称'
|
||||
break
|
||||
case '银保':
|
||||
text = '销售银行名称'
|
||||
break
|
||||
}
|
||||
return text
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.all {
|
||||
overflow-x: scroll;
|
||||
height: 100%;
|
||||
}
|
||||
.report-list-container {
|
||||
position: relative;
|
||||
}
|
||||
.all .move-table,
|
||||
.fixed-l {
|
||||
background-color: #ffffff;
|
||||
width: 100px;
|
||||
}
|
||||
.fixed-l th:nth-child(1),
|
||||
.fixed-l th:nth-child(2),
|
||||
.fixed-l th:nth-child(4),
|
||||
.all .move-table th:nth-child(1),
|
||||
.all .move-table th:nth-child(2),
|
||||
.all .move-table th:nth-child(4),
|
||||
.fixed-l td:nth-child(1),
|
||||
.fixed-l td:nth-child(2),
|
||||
.fixed-l td:nth-child(4),
|
||||
.all .move-table td:nth-child(1),
|
||||
.all .move-table td:nth-child(2),
|
||||
.all .move-table td:nth-child(4) {
|
||||
width: 130px;
|
||||
text-align: center;
|
||||
border: 1px solid #d7d7d7;
|
||||
min-width: 130px;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.fixed-l th,
|
||||
.all .move-table th,
|
||||
.fixed-l td,
|
||||
.all .move-table td {
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
border: 1px solid #d7d7d7;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.all .move-table th,
|
||||
.fixed-l th {
|
||||
height: 80px;
|
||||
}
|
||||
.all .move-table td,
|
||||
.fixed-l td {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.l {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
156
src/views/ebiz/report/reportList.vue
Normal file
156
src/views/ebiz/report/reportList.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<div class="report-list-container">
|
||||
<van-sticky>
|
||||
<van-tabs
|
||||
:line-width="45"
|
||||
v-model="active"
|
||||
@change="tabChange"
|
||||
sticky
|
||||
:swipe-threshold="5"
|
||||
title-active-color="#E3372F"
|
||||
>
|
||||
<van-tab name="0" title="个险"></van-tab>
|
||||
<van-tab name="1" title="中介"></van-tab>
|
||||
<van-tab name="2" title="健康险"></van-tab>
|
||||
<van-tab name="3" title="网销"></van-tab>
|
||||
<van-tab name="4" title="银保"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<van-row class="list mt50">
|
||||
<van-row class="flex justify-content-s align-items-c mh-auto">
|
||||
<van-col class="c-gray-darker fwb ml10">当日预收件数</van-col>
|
||||
<van-col class="text-center mr10 red fwb">{{list.preItems}}</van-col>
|
||||
</van-row>
|
||||
<van-row class="flex justify-content-s align-items-c mh-auto">
|
||||
<van-col class="c-gray-darker fwb ml10">当日承保件数</van-col>
|
||||
<van-col class="text-center mr10 red fwb">{{list.items}}</van-col>
|
||||
</van-row>
|
||||
<van-row class="flex justify-content-s align-items-c mh-auto">
|
||||
<van-col class="c-gray-darker fwb ml10">当日预收规模保费(万元)</van-col>
|
||||
<van-col class="text-center mr10 red fwb">{{list.prePrem}}</van-col>
|
||||
</van-row>
|
||||
<van-row class="flex justify-content-s align-items-c mh-auto">
|
||||
<van-col class="c-gray-darker fwb ml10">当日承保规模保费(万元)</van-col>
|
||||
<van-col class="text-center mr10 red fwb">{{list.prem}}</van-col>
|
||||
</van-row>
|
||||
<van-row class="flex justify-content-s align-items-c mh-auto">
|
||||
<van-col class="c-gray-darker fwb ml10">当日承保标准保费(万元)</van-col>
|
||||
<van-col class="text-center mr10 red fwb">{{list.standPrem}}</van-col>
|
||||
</van-row>
|
||||
</van-row>
|
||||
<van-button type="danger" class="bottom-btn" @click="goDetail" v-no-more-click="1000">查看明细</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { List, Tab, Tabs, Tag, Row, Col, Dialog, Sticky } from 'vant'
|
||||
import { reportList } from '@/api/ebiz/report/report'
|
||||
|
||||
export default {
|
||||
name: 'reportList',
|
||||
components: {
|
||||
[List.name]: List,
|
||||
[Tab.name]: Tab,
|
||||
[Tabs.name]: Tabs,
|
||||
[Tag.name]: Tag,
|
||||
[Row.name]: Row,
|
||||
[Col.name]: Col,
|
||||
[Sticky.name]: Sticky
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: '0',
|
||||
title: '个险',
|
||||
reportList: [], //接口数据
|
||||
list: [] //用于展示每一项的数据
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportList()
|
||||
},
|
||||
methods: {
|
||||
//初始化列表
|
||||
getReportList() {
|
||||
let data = {
|
||||
resultsName: '',
|
||||
resultsType: '0'
|
||||
}
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
reportList(data).then(res => {
|
||||
this.$toast.clear()
|
||||
if (res.result == '0') {
|
||||
console.log(res)
|
||||
this.reportList = res.content
|
||||
this.list = res.content[this.active]
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
tabChange(name, title) {
|
||||
this.active = name
|
||||
if (title == '健康险') {
|
||||
this.title = '团险'
|
||||
} else if (title == '银保') {
|
||||
this.title = '银代'
|
||||
} else {
|
||||
this.title = title
|
||||
}
|
||||
this.list = this.reportList[this.active]
|
||||
},
|
||||
goDetail() {
|
||||
let data = {
|
||||
resultsName: this.title,
|
||||
resultsType: '1'
|
||||
}
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
reportList(data).then(res => {
|
||||
this.$toast.clear()
|
||||
if (res.result == '0') {
|
||||
localStorage.reportList = JSON.stringify(res.content)
|
||||
localStorage.title = this.title
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/report/reportDetail',
|
||||
forbidSwipeBack: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/report/reportDetail'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
filters: {}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
.van-row {
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
margin-bottom: 3px;
|
||||
border-radius: 5px;
|
||||
background-color: #ffffff;
|
||||
&::after {
|
||||
display: none !important;
|
||||
clear: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user