Merge branch 'feature/【机构人力排名】' into release/0807

This commit is contained in:
heweijie
2020-08-07 18:27:06 +08:00
19 changed files with 1426 additions and 999 deletions

BIN
public/images/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,31 @@
import config from '@/config'
export default {
refreshImg() {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: config.mainUrl + '/images/refresh.png',
route: {
flag: '',
extra: {}
}
}
]
})
},
closeBtn(that) {
if (window.WebViewJavascriptBridge) {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: that.$assetsUrl + 'images/del-close.png',
route: {
flag: '',
extra: {}
}
}
]
})
}
}
}

View File

@@ -141,7 +141,7 @@
}
.flex-direction-colunm {
flex-direction: column
flex-direction: column;
}
// 字体颜色
@@ -152,7 +152,9 @@
.red {
color: $red !important;
}
.red1 {
color: $red1 !important;
}
.yellow {
color: $yellow !important;
}
@@ -212,7 +214,7 @@
}
.text-left {
text-align: left !important
text-align: left !important;
}
.text-underline {
@@ -257,13 +259,15 @@
.bg-red {
background: $red !important;
}
.bg-red1 {
background: $red1 !important;
}
.bg-green-base {
background: #ddf2ef !important;
}
.bg-green-dark {
background: #E9332E !important;
background: #e9332e !important;
}
.bg-blue-dark {
@@ -290,7 +294,7 @@
position: absolute;
// z-index: 99;
box-sizing: border-box;
content: ' ';
content: " ";
pointer-events: none;
right: 0;
bottom: 0;
@@ -320,17 +324,17 @@
line-height: 28px;
}
.redRadioCheckbox{
.van-checkbox__icon .van-icon{
border-color: #E9332E;
.redRadioCheckbox {
.van-checkbox__icon .van-icon {
border-color: #e9332e;
}
.van-checkbox__label{
color: #E9332E;
.van-checkbox__label {
color: #e9332e;
}
.van-radio__icon .van-icon{
border-color: #E9332E;
.van-radio__icon .van-icon {
border-color: #e9332e;
}
.van-radio__label{
color: #E9332E;
.van-radio__label {
color: #e9332e;
}
}
}

View File

@@ -1,7 +1,8 @@
//颜色
$white: #fff !default;
$green: #E9332E !default;
$green: #e9332e !default;
$red: #f56123 !default;
$red1: #ee0a24 !default;
$yellow: #f56123 !default;
$orange: #dd9c56 !default;
$gray: #b1b1b1 !default;
@@ -19,31 +20,15 @@ $font-size-xl: 18px !default;
$font-size-xll: 26px !default;
// 宽度列表
$width-list:2 8 10 12 15 18 20 35 40 41 45 50 60 70 80 86 90 100 105 110 120 130 140 150 155 160 165 180 192 200 220 240 250 260 280 300 315 325 345 350 365 400 440 445 450 550 700 1340;
$width-list: 2 8 10 12 15 18 20 35 40 41 45 50 60 70 80 86 90 100 105 110 120 130 140 150 155 160 165 180 192 200 220
240 250 260 280 300 315 325 345 350 365 400 440 445 450 550 700 1340;
// 内外边距列表
$distance-list: -25 0 1 2 5 6 7 8 9 10 12 15 20 25 30 35 40 45 50 60 70 80 86 90 100 145 150 165 185 210 250;
$distance-class-list: m,
mv,
mh,
mt,
ml,
mr,
mb,
p,
pv,
ph,
pt,
pl,
pr,
pb,
top,
left,
right,
bottom;
$distance-class-list: m, mv, mh, mt, ml, mr, mb, p, pv, ph, pt, pl, pr, pb, top, left, right, bottom;
//圆角弧度
$radius: 1 2 3 4 5 6 7 8 9 10 12 15 18 20 50 100;
//透明度
$opacity: 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9;
$opacity: 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9;

View File

@@ -7,8 +7,10 @@ const GroupOffice = () => import('@/views/ebiz/institutionalPerform/GroupOffice'
const PersonalOffice = () => import('@/views/ebiz/institutionalPerform/PersonalOffice')
const ServiceDepartOffice = () => import('@/views/ebiz/institutionalPerform/ServiceDepartOffice')
const RegionalOffice = () => import('@/views/ebiz/institutionalPerform/RegionalOffice')
const InstitutionalManpower = () => import('@/views/ebiz/institutionalPerform/InstitutionalManpower')
export default [
// 分公司
// 分公司
{
path: '/institutionalPerform/BranchOffice',
name: 'BranchOffice',
@@ -27,7 +29,7 @@ export default [
title: '机构业绩',
index: 1
}
},
},
// 营销服务部 03
{
path: '/institutionalPerform/serviceDepartOffice',
@@ -37,7 +39,7 @@ export default [
title: '机构业绩',
index: 1
}
},
},
// 区公司 04
{
path: '/institutionalPerform/districtOffice',
@@ -87,5 +89,22 @@ export default [
title: '机构业绩',
index: 1
}
},
{
//活动人力
path: '/institutionalPerform/institutionalManpower/:manageLv/:manageCode',
name: 'InstitutionalManpower',
component: InstitutionalManpower,
meta: {
title: '机构业绩',
index: 1
}
// children: [
// {
// path: '/:manageCode',
// component: InstitutionalManpower,
// name: 'InstitutionalManpower1'
// }
// ]
}
]

View File

@@ -7,6 +7,11 @@ import Ebiz from './ebiz'
Vue.use(Router)
//解决路由重复的报错
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
const constantRouterMap = [...App, ...Example, ...Ebiz] //后续可以删减模块
export default new Router({

View File

@@ -13,7 +13,7 @@
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -24,21 +24,16 @@
</van-col>
<van-col class="fs14 mp2" span="9">
<span v-if="showText">截至</span>
{{timeVal}}
{{ timeVal }}
</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -66,68 +61,62 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<!-- <div class="slide-box"> -->
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 14.5em;">
<!-- <thead> -->
<tr v-if="curMainType=='01'" class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2" style="height: 1.2em;width:8.6em">机构</th>
<th>预收标保</th>
<th>承保标保</th>
<th>承保保费</th>
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr v-if="curMainType=='02'" class="title">
<th class="td-1">排名</th>
<th class="td-2">机构</th>
<th>活动人力</th>
<th>合格人力</th>
<th>桂冠人力</th>
<th>新增人力</th>
<th>操作</th>
</tr>
<!-- </thead>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 14.5em;">
<!-- <thead> -->
<tr v-if="curMainType == '01'" class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2" style="height: 1.2em;width:8.6em">机构</th>
<th>预收标保</th>
<th>承保标保</th>
<th>承保保费</th>
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr v-if="curMainType == '02'" class="title">
<th class="td-1">排名</th>
<th class="td-2">机构</th>
<th>活动人力</th>
<th>合格人力</th>
<th>桂冠人力</th>
<th>新增人力</th>
<th>操作</th>
</tr>
<!-- </thead>
<tbody>-->
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-show="curMainType=='01'" v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<!-- 分公司 -->
<span @click="toZhi(item.code)" class="red">查看</span>
</td>
</tr>
<!-- <tr v-show="curMainType=='02'" v-for="(item,index) in personalDate" :key="index">
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ ysbbTotal.toFixed(2) }}</th>
<th>{{ bzbfTotol.toFixed(2) }}</th>
<th>{{ cbbfTotal.toFixed(2) }}</th>
<th>{{ ysjsTotal }}</th>
<th>{{ cbjsTotal }}</th>
</tr>
<tr v-show="curMainType == '01'" v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<!-- 分公司 -->
<span @click="toZhi(item.code)" class="red">查看</span>
</td>
</tr>
<!-- <tr v-show="curMainType=='02'" v-for="(item,index) in personalDate" :key="index">
<td class="td-1">{{index+1}}</td>
<td>{{item.name}}</td>
<td>{{item.hdrl}}</td>
@@ -138,10 +127,10 @@
<span @click="toZhi(item.code)" class="red">查看</span>
</td>
</tr>-->
<!-- </tbody> -->
</table>
<!-- </tbody> -->
</table>
</div>
</div>
</div>
</div>
</template>
@@ -157,7 +146,7 @@ export default {
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
@@ -170,8 +159,8 @@ export default {
currentDate: new Date(),
sortType: '2',
// 业绩总和
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
ysjsTotal: 0,
ysbbTotol: 0,
cbjsTotal: 0,
@@ -208,7 +197,7 @@ export default {
dateVal: '',
curTab: '',
shitimeVal: '',
showText: true,
showText: true
}
},
methods: {
@@ -226,15 +215,7 @@ export default {
}
return val
},
onClickMain(name) {
console.log(name)
if (name == 1) {
this.curMainType = '02'
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
if (name == 1) {
@@ -261,8 +242,8 @@ export default {
query: {
manageCode: manageCode,
timeVal: this.timeVal,
showText: this.showText,
},
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -379,7 +360,7 @@ export default {
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
type: this.curMainType,
type: this.curMainType
}
// 去除对象里面是空的属性
for (var key in data) {
@@ -388,7 +369,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list1 ? res.content.list1 : res.content.list
@@ -398,12 +379,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -411,7 +392,7 @@ export default {
$this.bzbfTotal = Number($this.bzbfTotal) + Number(val.bzbf)
})
// 人力排名的总计计算
$this.personalDate.map(function (val) {
$this.personalDate.map(function(val) {
$this.hdrlTotal = Number($this.hdrlTotal) + Number(val.hdrl)
$this.hgrlTotol = Number($this.hgrlTotol) + Number(val.hgrl)
$this.ggrlTotal = Number($this.ggrlTotal) + Number(val.ggrl)
@@ -419,8 +400,8 @@ export default {
})
}
})
.catch((err) => {})
},
.catch(err => {})
}
},
created() {
setTimeout(() => {
@@ -432,11 +413,11 @@ export default {
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
url: location.origin + '/#/institutionalPerform/BranchOffice'
}
}
}
]
})
}, 1000)
},
@@ -444,7 +425,7 @@ export default {
this.getCurrentDate()
setInterval(this.getCurrentDate, 1000 * 60)
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@@ -515,37 +496,38 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1{
position: absolute;
left: 0;
z-index: 2;
width: 3em;
}
.td-2{
position: absolute;
left: 4.6em;
z-index: 2;
width: 10em;
padding: 0;
height: 2.3em;
}
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;
width: 3em;
}
.td-2 {
position: absolute;
left: 4.6em;
z-index: 2;
width: 10em;
padding: 0;
height: 2.3em;
}
}
</style>

View File

@@ -6,14 +6,14 @@
</template>-->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs>-->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -24,21 +24,16 @@
</van-col>
<van-col class="fs14 mp2" span="9">
<span v-if="showText">截至</span>
{{timeVal}}
{{ timeVal }}
</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -66,13 +61,7 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
@@ -91,26 +80,26 @@
<th>操作</th>
</tr>
<tr>
<th class="white td-1" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
@@ -126,12 +115,13 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
@@ -171,7 +161,7 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal: '',
shitimeVal: ''
}
},
methods: {
@@ -190,13 +180,14 @@ export default {
return val
},
onClickMain(name) {
console.log(name)
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -224,8 +215,8 @@ export default {
query: {
manageCode: manageCode,
timeVal: this.timeVal,
showText: this.showText,
},
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -330,7 +321,7 @@ export default {
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
type: this.curMainType,
type: this.curMainType
}
// 去除对象里面是空的属性
for (var key in data) {
@@ -339,7 +330,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -352,7 +343,7 @@ export default {
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
@@ -364,45 +355,32 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.timeVal = this.$route.query.timeVal || ''
this.showText = this.$route.query.showText
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.department-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -428,13 +406,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -443,6 +421,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="destrict-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -86,33 +75,33 @@
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
</td>
</tr>
</table>
</div>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
@@ -123,17 +112,18 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
//01保费排行 02人力排行
curMainType:"01",
//01保费排行 02人力排行
curMainType: '01',
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -147,8 +137,8 @@ export default {
cbjsTotal: 0,
cbbfTotal: 0,
bzbfTotal: 0,
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
tableData: [],
timeVal: '',
sortTypeText: '预收标保',
@@ -168,8 +158,8 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:"",
showText:true
shitimeVal: '',
showText: true
}
},
methods: {
@@ -188,13 +178,14 @@ export default {
return val
},
onClickMain(name) {
console.log(name)
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -202,18 +193,18 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
toDetail(manageCode) {
@@ -221,9 +212,9 @@ export default {
path: '/institutionalPerform/regionalOffice',
query: {
manageCode: manageCode,
timeVal:this.timeVal,
showText:this.showText
},
timeVal: this.timeVal,
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -255,7 +246,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -265,8 +256,8 @@ export default {
return year + '-' + this.add0(month) + '-' + this.add0(day)
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
// 点击确定那么文字“截至”就隐藏
this.showText = false
if (this.curTab == 1) {
// now当前 y:年 m:月 d:日
// 日
@@ -274,24 +265,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -317,19 +305,19 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: this.$route.query.manageCode,
manageLv: "04",
manageLv: '04',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
type: this.curMainType,
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
for (var key in data) {
@@ -338,7 +326,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -348,12 +336,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -363,47 +351,34 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.getlComPremDetil()
this.timeVal=this.$route.query.timeVal||""
console.log(this.timeVal)
this.showText=this.$route.query.showText
},
this.timeVal = this.$route.query.timeVal || ''
console.log(this.timeVal)
this.showText = this.$route.query.showText
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.destrict-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -429,13 +404,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -444,6 +419,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -458,25 +436,26 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="group-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -86,32 +75,32 @@
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
</td>
</tr>
</table>
</div>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
@@ -123,17 +112,18 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
curMainType:"01",
showText:true,
curMainType: '01',
showText: true,
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -142,8 +132,8 @@ export default {
currentDate: new Date(),
sortType: '2',
// 总和
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
ysjsTotal: 0,
ysbbTotol: 0,
cbjsTotal: 0,
@@ -168,7 +158,7 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:""
shitimeVal: ''
}
},
methods: {
@@ -187,13 +177,14 @@ export default {
return val
},
onClickMain(name) {
console.log(name)
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -201,18 +192,18 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
toDetail(manageCode) {
@@ -220,9 +211,9 @@ export default {
path: '/institutionalPerform/personalOffice',
query: {
manageCode: manageCode,
timeVal:this.timeVal,
showText:this.showText
},
timeVal: this.timeVal,
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -254,7 +245,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -264,8 +255,8 @@ export default {
return year + '-' + this.add0(month) + '-' + this.add0(day)
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
// 点击确定那么文字“截至”就隐藏
this.showText = false
console.log(this.curTab)
console.log(value)
if (this.curTab == 1) {
@@ -275,24 +266,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -318,19 +306,19 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: this.$route.query.manageCode,
manageLv: "07",
manageLv: '07',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
type: this.curMainType,
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
for (var key in data) {
@@ -339,7 +327,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -349,12 +337,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -364,45 +352,32 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.timeVal=this.$route.query.timeVal||""
this.showText=this.$route.query.showText
this.timeVal = this.$route.query.timeVal || ''
this.showText = this.$route.query.showText
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.group-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -428,13 +403,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -443,6 +418,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -457,25 +435,26 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;

View File

@@ -0,0 +1,115 @@
<template>
<div class="p10 pl40 pr40">
<van-row>
<van-col span="3">
<img :src="require('@/assets/images/ebiz/calendar.png')" />
</van-col>
<van-col class="fs14 mp2" span="9" @click="showMonthPicker = true">{{ timeVal }}</van-col>
<van-col span="3">
<img style="margin-top: 2px;" :src="require('@/assets/images/ebiz/point.png')" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- -->
<van-popup v-model="showMonthPicker" position="bottom">
<van-datetime-picker
v-model="currentMonthDate"
type="year-month"
:min-date="minDate"
:max-date="maxDate"
:formatter="formatter"
@confirm="onConfirmDate"
@cancel="showMonthPicker = false"
/>
</van-popup>
</van-row>
</div>
</template>
<script>
let newArr = []
import Vue from 'vue'
import util from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util'
export default {
data() {
return {
timeVal: '',
sortTypeText: '活动人力',
showPicker: false,
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
currentMonthDate: new Date(),
showMonthPicker: false
}
},
components: {},
name: 'Selectors',
props: {
queryColumns: {
type: Array,
default: ''
}
},
created() {
this.getTimeVal()
},
methods: {
formatter(type, val) {
if (type === 'year') {
return `${val}`
} else if (type === 'month') {
return `${val}`
}
return val
},
//修改月、天的格式,保持两位数显示
add0(m) {
return m < 10 ? '0' + m : m
},
dateFormat(time) {
// 时间格式化 2019-09-08
let year = time.getFullYear()
let month = time.getMonth() + 1
let day = util.getLastDay(year, time.getMonth())
return year + '-' + this.add0(month) + '-' + this.add0(day)
},
onConfirm(value, index) {
this.sortTypeText = value
// switch (value) {
// case this.queryColumns[0]:
// this.sortType = '1'
// break
// case this.queryColumns[1]:
// this.sortType = '2'
// break
// case this.queryColumns[2]:
// this.sortType = '3'
// break
// case this.queryColumns[3]:
// this.sortType = '4'
// break
// }
this.$emit('getSortType', index + 1)
this.showPicker = false
},
getTimeVal() {
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal = this.dateVal.substring(0, 7)
},
onConfirmDate(value, index) {
// 月
this.getTimeVal()
this.$emit('getDateVal', this.dateVal)
this.showMonthPicker = false
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,32 @@
import getApp from '@/assets/js/utils/getApp'
const myMixin = {
methods: {
onClickMain(name) {
if (name == 1) {
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
},
//页面返回服务页
appCallBack(data) {
if (data.trigger == 'right_button_click') {
this.$jump({
flag: 'service'
})
}
}
},
created() {
var that = this
console.log(this)
setTimeout(() => {
getApp.closeBtn(that)
window.appCallBack = that.appCallBack
}, 400)
}
}
export default myMixin

View File

@@ -0,0 +1,15 @@
export default {
add0(m) {
return m < 10 ? '0' + m : m
},
getLastDay(y, m) {
y = y || new Date().getFullYear()
m = m || new Date().getMonth()
return new Date(y, m + 1, 0).getDate()
},
getMonthLastDay(y, m) {
y = y || new Date().getFullYear()
m = m || new Date().getMonth()
return y + '-' + this.add0(m + 1) + '-' + new Date(y, m + 1, 0).getDate()
}
}

View File

@@ -0,0 +1,8 @@
.van-row {
line-height: 1.6rem;
}
.van-tabs__nav--card .van-tab {
&:last-child {
border-right: none !important;
}
}

View File

@@ -0,0 +1,357 @@
<template>
<div v-cloak class="container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack">
<template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
</van-nav-bar>
<!-- 业绩和人力 -->
<van-tabs @click="onClickMain" v-model="active" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs>
<Selectors @getDateVal="getDateVal" @getSortType="getSortType" :queryColumns="queryColumns"></Selectors>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layout:fixed;padding-left: 4.1em;">
<tr class="title">
<th class="td-1" style="height: 1.3em;">排名</th>
<th class="td-2">机构</th>
<th>{{ queryColumns[0] }}</th>
<th>{{ queryColumns[1] }}</th>
<th>{{ queryColumns[2] }}</th>
<!-- <th>{{ queryColumns[3] }}</th> -->
<th>{{ queryColumns[3] }}</th>
<th>{{ queryColumns[4] }}</th>
<th v-if="manageLv != '07'">操作</th>
</tr>
<tr >
<td class="td-1 white" style="width:3.2em;height: 1.3em;">1</td>
<td class="td-2">合计</td>
<td>{{ items[0] }}</td>
<td>{{ items[1] }}</td>
<td>{{ items[2] }}</td>
<td>{{ items[3] }}</td>
<td>{{ items[4] }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1"><div>{{ index + 1 }}</div></td>
<td >
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.hdrl }}</td>
<td>{{ item.hgrl }}</td>
<td>{{ item.ggrl }}</td>
<td>{{ item.xzrl }}</td>
<td>{{ item.zcrl }}</td>
<td v-if="manageLv != '07'">
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
<script>
// import { XTable } from 'vux'
import Selectors from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors'
import util from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util'
import { branchOfficeApi } from '@/api/ebiz/branchOffice/branchOffice'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins';
import { Tabs, Tab } from 'vant'
export default {
name: 'InstitutionalManpower',
components: {
Selectors,
[Tabs.name]: Tabs,
[Tab.name]: Tab
},
mixins: [MinXin],
data() {
return {
sortType: '1',
manageCode: '8645',
manageLv: '02',
tableData: [],
items: [],
bzbfTotol: 0,
queryColumns: ['活动人力', '合格人力', '桂冠人力', '新增人力','在册人力'],
active: 1,
// 当前的机构编码
curCode: '',
dateType: 'm',
dateVal: '',
curTab: '',
shitimeVal: '',
curMainType: '02'
}
},
watch: {
tableData(value) {
if (value.length == 0) {
this.items=[]
this.queryColumns.forEach(() => {
this.items.push('0')
})
} else {
let sum1 = 0
let sum2 = 0
let sum3 = 0
let sum4 = 0
let sum5 = 0
this.tableData.forEach(item => {
sum1 = Number(sum1) + Number(item.hdrl)
sum2 = Number(sum2) + Number(item.hgrl)
sum3 = Number(sum3) + Number(item.ggrl)
sum4 = Number(sum4) + Number(item.xzrl)
sum5 = Number(sum5) + Number(item.zcrl)
this.items = [sum1, sum2, sum3, sum4,sum5]
})
this.items = this.items.map(item => {
return item
})
}
}
},
methods: {
formatterYear(type, val) {
if (type === 'year') {
return val + '年'
}
return val
},
onClickMain(name) {
if (name == 0) {
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/UnderOffice'
})
}
},
toDetail(manageCode) {
let manageLv = '0' + (Number(this.manageLv) + 1)
// this.manageCode = manageCode
console.log(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`)
this.$router.push(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`) ;
this.manageLv=this.$route.params.manageLv;
this.manageCode=this.$route.params.manageCode
console.log('this.manageLv',this.manageLv)
this.getlComPremDetil()
},
getCurrentDate() {
var timeStr = ''
var curDate = new Date()
var curMonth = curDate.getMonth() + 1 //获取当前月份(0-11,0代表1月)
var curDay = curDate.getDate() //获取当前日(1-31)
var curHour = curDate.getHours() //获取当前小时数(0-23)
var curMinute = curDate.getMinutes() // 获取当前分钟数(0-59)
var curSec = curDate.getSeconds() //获取当前秒数(0-59)
if (curHour < 10) {
if (curMinute < 10) {
timeStr += ' 0' + curHour + ':0' + curMinute
} else {
timeStr += ' 0' + curHour + ':' + curMinute
}
} else {
if (curMinute < 10) {
timeStr += ' ' + curHour + ':0' + curMinute
} else {
timeStr += ' ' + curHour + ':' + curMinute
}
}
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal = this.shitimeVal
},
onBack() {
this.$router.go(-1)
},
getSortType(value) {
console.log(value, 'value')
this.sortType = value.toString()
this.getlComPremDetil()
},
getDateVal(value) {
this.dateVal = value
this.getlComPremDetil()
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageLv: this.manageLv,
manageCode: this.manageCode,
sortType: this.sortType,
queryType: 'm',
date: this.dateVal, // 2020-07-31
type: '02'
}
// 去除对象里面是空的属性
for (var key in data) {
if (data[key] === '') {
delete data[key]
}
}
branchOfficeApi(data)
.then(res => {
if (res.result == 0) {
//console.log(res.content.list)
$this.tableData = res.content.listRL
}
})
.catch(err => {})
},
},
mounted() {
// this.timeVal=this.$route.query.timeVal||""
// this.showText=this.$route.query.showText
// this.getCurrentDate()
// setInterval(this.getCurrentDate, 1000 * 60)
this.dateVal = util.getMonthLastDay()
this.manageLv=this.$route.params.manageLv;
this.manageCode=this.$route.params.manageCode
this.getlComPremDetil()
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.container {
.van-row{
line-height: 25px;
}
.van-tabs__nav--card .van-tab {
background-color: #fff;
border-right: 1px solid #fff;
}
.van-tabs__nav--card .van-tab.van-tab--active {
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
color: #232020;
}
.slide-box {
display: -webkit-box;
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
}
table.gridtable {
font-family: verdana, arial, sans-serif;
font-size: 11px;
color: #333333;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
}
table .title th {
padding: 5px 10px;
}
table td {
text-align: right;
padding:8px;
&:nth-child(2){
text-align: center;
}
}
table .title th {
color: #fff;
padding: 5px 10px;
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table {
border: 0;
}
.title .van-tabs__nav--card {
margin: 0;
border: 1px solid #bdbdbd;
border-left: none;
border-right: none;
}
.title .van-tabs__nav--card .van-tab {
background-color: transparent;
}
// 固定表头
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
padding: 2.13333vw;
left: 0;
z-index: 2;
width: 3em;
height: 2.57em;
div{
position: absolute;
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
}
}
.td-2 {
}
}
</style>

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="personal-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -85,29 +74,29 @@
<th>承保保费</th>
<th>预收件数</th>
<th>承保件数</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
</tr>
</table>
</div>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
</tr>
</table>
</div>
</div>
</div>
</template>
@@ -119,16 +108,17 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
showText:true,
showText: true,
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -143,8 +133,8 @@ export default {
cbbfTotal: 0,
bzbfTotal: 0,
tableData: [],
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
timeVal: '',
sortTypeText: '预收标保',
queryColumns: ['预收件数', '预收标保', '承保件数', '承保标保', '承保标保'],
@@ -163,8 +153,8 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:"",
curMainType:"01"
shitimeVal: '',
curMainType: '01'
}
},
methods: {
@@ -183,13 +173,14 @@ export default {
return val
},
onClickMain(name) {
console.log(name)
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -197,21 +188,21 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
//修改月、天的格式,保持两位数显示
add0(m) {
return m < 10 ? '0' + m : m
@@ -241,7 +232,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -252,7 +243,7 @@ export default {
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
this.showText = false
if (this.curTab == 1) {
// now当前 y:年 m:月 d:日
// 日
@@ -260,24 +251,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -303,19 +291,19 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: this.$route.query.manageCode,
manageLv: "08",
manageLv: '08',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
type: this.curMainType,
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
for (var key in data) {
@@ -324,7 +312,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -334,12 +322,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -349,45 +337,32 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.timeVal=this.$route.query.timeVal||""
this.showText=this.$route.query.showText
this.timeVal = this.$route.query.timeVal || ''
this.showText = this.$route.query.showText
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.personal-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -413,13 +388,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -428,6 +403,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -442,25 +420,26 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="regional-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -86,32 +75,32 @@
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
</td>
</tr>
</table>
</div>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
@@ -123,17 +112,18 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
curMainType:"01",
showText:true,
curMainType: '01',
showText: true,
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -148,8 +138,8 @@ export default {
cbbfTotal: 0,
bzbfTotal: 0,
tableData: [],
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
timeVal: '',
sortTypeText: '预收标保',
queryColumns: ['预收件数', '预收标保', '承保件数', '承保标保', '承保标保'],
@@ -168,7 +158,7 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:""
shitimeVal: ''
}
},
methods: {
@@ -186,14 +176,15 @@ export default {
}
return val
},
onClickMain(name) {
console.log(name)
onClickMain(name) {
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -201,18 +192,18 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
toDetail(manageCode) {
@@ -220,9 +211,9 @@ export default {
path: '/institutionalPerform/departmentOffice',
query: {
manageCode: manageCode,
timeVal:this.timeVal,
showText:this.showText
},
timeVal: this.timeVal,
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -254,7 +245,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -265,7 +256,7 @@ export default {
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
this.showText = false
console.log(this.curTab)
console.log(value)
if (this.curTab == 1) {
@@ -275,24 +266,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -318,18 +306,18 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: this.$route.query.manageCode,
manageLv: "05",
manageLv: '05',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
@@ -339,7 +327,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -349,12 +337,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -364,45 +352,32 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.timeVal=this.$route.query.timeVal||""
this.showText=this.$route.query.showText
this.timeVal = this.$route.query.timeVal || ''
this.showText = this.$route.query.showText
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.regional-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -428,13 +403,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -443,6 +418,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -457,25 +435,26 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="service-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -86,33 +75,33 @@
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
</td>
</tr>
</table>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</template>
@@ -123,17 +112,18 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
data() {
return {
curMainType:"01",
showText:true,
curMainType: '01',
showText: true,
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -145,8 +135,8 @@ export default {
ysjsTotal: 0,
ysbbTotol: 0,
cbjsTotal: 0,
ysbbTotal:0,
bzbfTotol:0,
ysbbTotal: 0,
bzbfTotol: 0,
cbbfTotal: 0,
bzbfTotal: 0,
tableData: [],
@@ -168,7 +158,7 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:""
shitimeVal: ''
}
},
methods: {
@@ -186,14 +176,15 @@ export default {
}
return val
},
onClickMain(name) {
console.log(name)
onClickMain(name) {
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -201,18 +192,18 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
toDetail(manageCode) {
@@ -220,9 +211,9 @@ export default {
path: '/institutionalPerform/districtOffice',
query: {
manageCode: manageCode,
timeVal:this.timeVal,
showText:this.showText
},
timeVal: this.timeVal,
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -254,7 +245,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -265,7 +256,7 @@ export default {
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
this.showText = false
if (this.curTab == 1) {
// now当前 y:年 m:月 d:日
// 日
@@ -273,24 +264,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -316,18 +304,18 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: this.$route.query.manageCode,
manageLv: "03",
manageLv: '03',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
@@ -337,7 +325,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -347,12 +335,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -362,45 +350,32 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
},
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
.catch(err => {})
}
},
mounted() {
setInterval(this.getCurrentDate(), 1000 * 60)
this.timeVal=this.$route.query.timeVal||""
this.showText=this.$route.query.showText
this.timeVal = this.$route.query.timeVal || ''
this.showText = this.$route.query.showText
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.service-office-container {
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -426,13 +401,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -441,6 +416,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -455,25 +433,26 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
left: 0;
z-index: 2;

View File

@@ -1,19 +1,19 @@
<template>
<div v-cloak class="under-office-container">
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack"> -->
<!-- <template #right>
<!-- <van-nav-bar left-text="机构业绩" left-arrow @click-left="onBack">
<template #right>
<img @click="getlComPremDetil" :src="refreshLogo" />
</template> -->
<!-- </van-nav-bar> -->
</template>
</van-nav-bar> -->
<!-- 业绩和人力 -->
<!-- <van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tabs @click="onClickMain" type="card" class="p0 title">
<van-tab title="机构业绩排名"></van-tab>
<van-tab title="机构人力排名"></van-tab>
</van-tabs> -->
</van-tabs>
<!-- 年月日选择 -->
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red">
<van-tabs @click="onClickRabs" type="card" class="pl20 pr20 pt10 pb10 bg-red1">
<van-tab title="实时"></van-tab>
<van-tab @click="showDatePicker=true" title="日"></van-tab>
<van-tab @click="showDatePicker = true" title="日"></van-tab>
<van-tab title="月"></van-tab>
<van-tab title="年"></van-tab>
</van-tabs>
@@ -22,20 +22,15 @@
<van-col span="3">
<img :src="calendar" />
</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{timeVal}}</van-col>
<van-col class="fs14 mp2" span="9"><span v-if="showText">截至</span>{{ timeVal }}</van-col>
<van-col span="3">
<img :src="point" />
</van-col>
<van-col span="9">
<span class="fs14" @click="showPicker=true">{{sortTypeText}}</span>
<span class="fs14" @click="showPicker = true">{{ sortTypeText }}</span>
</van-col>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="queryColumns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<van-picker show-toolbar :columns="queryColumns" @confirm="onConfirm" @cancel="showPicker = false" />
</van-popup>
<!-- 时间选择器 -->
<!-- -->
@@ -63,20 +58,14 @@
</van-popup>
<!-- -->
<van-popup v-model="showYearPicker" position="bottom">
<van-picker
v-model="currentYearDate"
show-toolbar
:columns="YearColumns"
@confirm="onConfirmDate"
@cancel="showYearPicker = false"
/>
<van-picker v-model="currentYearDate" show-toolbar :columns="YearColumns" @confirm="onConfirmDate" @cancel="showYearPicker = false" />
</van-popup>
<!-- /时间选择器 -->
</van-row>
</div>
<div class="layer-box">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<div class="layer">
<table class="fs14" style="table-layoutfixed;padding-left: 4.3em;">
<tr class="title">
<th class="td-1" style="height: 1.2em;">排名</th>
<th class="td-2">机构</th>
@@ -86,32 +75,32 @@
<th>预收件数</th>
<th>承保件数</th>
<th>操作</th>
</tr>
<tr>
<th class="td-1 white" style="width:4.3em">1</th>
<th class="td-2">合计</th>
<th>{{ysbbTotal.toFixed(2)}}</th>
<th>{{bzbfTotol.toFixed(2)}}</th>
<th>{{cbbfTotal.toFixed(2)}}</th>
<th>{{ysjsTotal}}</th>
<th>{{cbjsTotal}}</th>
</tr>
<tr v-for="(item,index) in tableData" :key="index">
<td class="td-1">{{index+1}}</td>
<td class="td-2">
<div style="width:10em">{{item.name}}</div>
</td>
<td>{{item.ysbb}}</td>
<td>{{item.bzbf}}</td>
<td>{{item.cbbf}}</td>
<td>{{item.ysjs}}</td>
<td>{{item.cbjs}}</td>
<td>
<span @click="toDetail(item.code)" class="red">查看</span>
</td>
</tr>
</table>
</div>
</tr>
<tr>
<td class="td-1 white" style="width:3em">1</td>
<td class="td-2">合计</td>
<td>{{ ysbbTotal.toFixed(2) }}</td>
<td>{{ bzbfTotol.toFixed(2) }}</td>
<td>{{ cbbfTotal.toFixed(2) }}</td>
<td>{{ ysjsTotal.toFixed(2) }}</td>
<td>{{ cbjsTotal.toFixed(2) }}</td>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-1">{{ index + 1 }}</td>
<td class="td-2">
<div style="width:10em">{{ item.name }}</div>
</td>
<td>{{ item.ysbb }}</td>
<td>{{ item.bzbf }}</td>
<td>{{ item.cbbf }}</td>
<td>{{ item.ysjs }}</td>
<td>{{ item.cbjs }}</td>
<td>
<span @click="toDetail(item.code)" class="red1">查看</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</template>
@@ -123,16 +112,19 @@ import refreshLogo from '@/assets/images/ebiz/refresh.png'
import calendar from '@/assets/images/ebiz/calendar.png'
import point from '@/assets/images/ebiz/point.png'
import { Tabs, Tab } from 'vant'
import MinXin from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins'
import getApp from '@/assets/js/utils/getApp'
export default {
name: 'districtOffice',
components: {
// XTable,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[Tab.name]: Tab
},
mixins: [MinXin],
data() {
return {
showText:true,
showText: true,
YearColumns: ['2020', '2019'],
minDate: new Date(2019, 0, 1),
maxDate: new Date(2020, 10, 1),
@@ -145,10 +137,10 @@ export default {
ysbbTotol: 0,
cbjsTotal: 0,
cbbfTotal: 0,
ysbbTotal:0,
ysbbTotal: 0,
bzbfTotal: 0,
tableData: [],
bzbfTotol:0,
bzbfTotol: 0,
timeVal: '',
sortTypeText: '预收标保',
queryColumns: ['预收件数', '预收标保', '承保件数', '承保标保', '承保标保'],
@@ -167,8 +159,8 @@ export default {
dateType: 'now',
dateVal: '',
curTab: '',
shitimeVal:"",
curMainType:"01"
shitimeVal: '',
curMainType: '01'
}
},
methods: {
@@ -186,14 +178,15 @@ export default {
}
return val
},
onClickMain(name) {
console.log(name)
onClickMain(name) {
if (name == 1) {
this.curMainType = '02'
//this.curMainType = '02'
this.$router.push({
path: '/institutionalPerform/InstitutionalManpower/02/8645'
})
} else {
this.curMainType = '01'
}
this.getlComPremDetil()
},
onClickRabs(name, title) {
this.curTab = name
@@ -201,28 +194,28 @@ export default {
this.showDatePicker = true
} else if (name == 2) {
this.showMonthPicker = true
} else if(name == 3) {
} else if (name == 3) {
this.showYearPicker = true
} else {
// "截至"文字显示出来
this.showText=true
this.showText = true
// 实时的时候date清空
this.dateType = 'now'
this.dateVal = ''
// 左侧时间实时赋值
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
// 调接口
this.getlComPremDetil()
this.getlComPremDetil()
}
},
toDetail(manageCode) {
this.$router.push({
path: '/institutionalPerform/serviceDepartOffice',
path: '/institutionalPerform/ServiceDepartOffice',
query: {
manageCode: manageCode,
timeVal:this.timeVal,
showText:this.showText
},
timeVal: this.timeVal,
showText: this.showText
}
})
},
//修改月、天的格式,保持两位数显示
@@ -254,7 +247,7 @@ export default {
// 一直在获取时间
this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr
// 存页面上值得一个变量
this.timeVal= this.shitimeVal
this.timeVal = this.shitimeVal
},
dateFormat(time) {
// 时间格式化 2019-09-08
@@ -265,7 +258,7 @@ export default {
},
onConfirmDate(value, index) {
// 点击确定那么文字“截至”就隐藏
this.showText=false;
this.showText = false
if (this.curTab == 1) {
// now当前 y:年 m:月 d:日
// 日
@@ -273,24 +266,21 @@ export default {
this.dateVal = this.dateFormat(this.currentDate)
console.log(this.dateVal)
// 左侧时间实时赋值
this.timeVal=this.dateVal
this.timeVal = this.dateVal
} else if (this.curTab == 2) {
// 月
this.dateType = 'm'
this.dateVal = this.dateFormat(this.currentMonthDate)
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,7)
this.timeVal = this.dateVal.substring(0, 7)
} else if (this.curTab == 3) {
// 年
this.dateType = 'y'
this.dateVal = value+'-' + '01' + '-' + '01'
this.dateVal = value + '-' + '01' + '-' + '01'
// 左侧时间实时赋值
this.timeVal=this.dateVal.substring(0,4)
this.timeVal = this.dateVal.substring(0, 4)
}
this.showDatePicker=false,
this.showMonthPicker=false,
this.showYearPicker= false,
this.getlComPremDetil()
;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil()
},
onConfirm(value, index) {
this.sortTypeText = value
@@ -316,18 +306,18 @@ export default {
this.getlComPremDetil()
},
onBack() {
this.$router.go(-1);
this.$router.go(-1)
},
//获取列表
getlComPremDetil() {
let $this = this
let data = {
manageCode: "8645",
manageLv: "02",
manageCode: '8645',
manageLv: '02',
sortType: this.sortType,
queryType: this.dateType,
date: this.dateVal,
//01保费排行 02人力排行
//01保费排行 02人力排行
type: this.curMainType
}
// 去除对象里面是空的属性
@@ -337,7 +327,7 @@ export default {
}
}
branchOfficeApi(data)
.then((res) => {
.then(res => {
if (res.result == 0) {
console.log(res.content.list)
$this.tableData = res.content.list
@@ -347,12 +337,12 @@ export default {
$this.cbjsTotal = 0
$this.cbbfTotal = 0
$this.bzbfTotal = 0
$this.ysbbTotal =0
$this.bzbfTotol=0
$this.ysbbTotal = 0
$this.bzbfTotol = 0
// 业绩排名的 总计计算
$this.tableData.map(function (val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.tableData.map(function(val) {
$this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb)
$this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb)
$this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs)
$this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb)
$this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs)
@@ -362,51 +352,54 @@ export default {
console.log($this.tableData)
}
})
.catch((err) => {})
.catch(err => {})
},
//页面返回服务页
appCallBack(data) {
if (data.trigger == 'right_button_click') {
this.$jump({
flag: 'service'
})
}
}
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/ebiz/refresh.png',
route: {
flag: '',
extra: {
url: location.origin + '/#/institutionalPerform/BranchOffice',
},
},
},
],
})
}, 1000)
},
// created() {
// var that = this
// getApp.closeBtn(that)
// window.appCallBack = that.appCallBac
// },
mounted() {
// this.timeVal=this.$route.query.timeVal||""
// this.showText=this.$route.query.showText
// this.timeVal=this.$route.query.timeVal||""
// this.showText=this.$route.query.showText
this.getCurrentDate()
setInterval(this.getCurrentDate, 1000 * 60)
this.getlComPremDetil()
},
}
}
</script>
<style lang="scss">
@import '@/assets/sass/variables.scss';
.under-office-container {
.van-row {
line-height: 1.6rem;
}
.oneTab .van-tabs__nav--card .van-tab {
background-color: #fff;
border-right: 1px solid #fff;
}
.van-tabs__nav--card .van-tab.van-tab--active {
color: red;
color: $red1;
background-color: #fff;
}
.van-tabs__nav--card .van-tab {
color: #232020;
background-color: #e6e6e6;
border-right: 1px solid #8e8d8d;
&:last-child {
border-right: none !important;
}
}
.van-nav-bar .van-icon,
.van-nav-bar__text {
@@ -432,13 +425,13 @@ export default {
white-space: nowrap;
border-width: 1px;
border-color: #666666;
background-color: #f56123;
background-color: $red1;
border-top: 0;
border-left: 0;
border-right: 0;
}
table td {
text-align: center;
text-align: right;
border-width: 1px;
padding: 8px;
// border-style: solid;
@@ -447,6 +440,9 @@ export default {
border-top: 0;
border-left: 0;
border-right: 0;
&:nth-child(2) {
text-align: center;
}
}
table {
border: 0;
@@ -461,26 +457,28 @@ export default {
background-color: transparent;
}
// 固定表头
td,th{
/* color: #333;
td,
th {
/* color: #333;
font-size: 14px;
border-right: 1px solid #333;
line-height: 30px; */
/* box-sizing: border-box; */
background: #fff;
}
.layer-box{
width: 100%;
overflow: hidden;
position: relative;
}
.layer{
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
/* box-sizing: border-box; */
background: #fff;
}
.layer-box {
width: 100%;
overflow: hidden;
position: relative;
}
.layer {
width: 100%;
overflow: hidden;
overflow-x: scroll;
}
.td-1 {
position: absolute;
padding: 2.13333vw;
left: 0;
z-index: 2;
width: 3em;