解决代码冲突

This commit is contained in:
liyuetong
2021-05-20 14:20:02 +08:00
6 changed files with 16403 additions and 1 deletions

15787
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'
//出单信息列表列表
export function queryOutOrderList(data) {
return request({
url: getUrl(`/sale/order/queryOutOrderList`, 1),
method: 'post',
data
})
}
//获取当前人机构
export function getBranchByUser(data) {
return request({
url: getUrl(`/data/branch/getBranchByUser`, 1),
method: 'post',
data
})
}
//月历查询
export function getMonthDetail(data) {
return request({
url: getUrl(`/agent/Performance/getMonthDetail`, 1),
method: 'post',
data
})
}

View File

@@ -0,0 +1,99 @@
<template>
<div class="statisticsTable">
<table cellspacing="0" summary cellpadding="1">
<thead>
<tr>
<th :class="{'th-fixed':index<1}" v-for="(item,index) in theads" :key="index">{{item}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in tableData" :key="index">
<td class="th-fixed" @click="goLink(item)">{{item.name}}</td>
<td class="th-fixed">{{item.productName}}</td>
<td>{{item.prem}}</td>
<td>{{item.commitDate}}</td>
<td>{{item.appntDate}}</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
name: 'tableDetail',
props:{
theads:{
type:Array,
default:[]
},
isLink:{
type:Boolean,
default:false,
},
tableData:{
type:Array,
default:[]
}
},
data() {
return {
}
},
created(){
},
methods: {
goLink(item){
if(this.isLink){
this.$emit('goLink',item)
}
},
},
}
</script>
<style lang="scss" scoped>
.statisticsTable th {
width: 800px;
}
table {
// width: 200vw;
}
.statisticsTable {
width: 100%;
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #999;
text-align: center;
font-size: 14px;
line-height: 30px;
background:#fff;
}
thead {
th {
height: 40px;
line-height: 40px;
background: #e9332e;
color: #fff;
}
}
}
.th-fixed {
// position: sticky;
left: 0;
width:150px;
padding: 0 5px;
}
.td-fixed {
// position: sticky;
width:150px;
padding: 0 5px;
left: 0;
text-decoration: underline;
}
</style>

View File

@@ -0,0 +1,14 @@
const billingDetail = () => import('@/views/ebiz/billingDetail/billingDetail')
export default [
{
path: '/billingDetail',
name: 'billingDetail',
component: billingDetail,
meta: {
title: '出单详情',
index: 1
}
}
]

View File

@@ -36,6 +36,9 @@ import insureAgain from './insureAgain'
// 产说会
import productionSay from './productionSay'
// 出单详情
import billingDetail from './billingDetail'
export default [
...proposal,
...sale,
@@ -67,5 +70,6 @@ export default [
...train,
...insureAgain,
...eqiVisit,
...productionSay
...productionSay,
...billingDetail
] //根据需要进行删减

View File

@@ -0,0 +1,471 @@
<template>
<div>
<div class="classification">
<span>机构名称: </span>
<span @click="isOrgLv2ConditionShow = true">
<span>{{ OrgLv2Name }}</span>
<van-icon name="arrow-down" />
</span>
<template v-if="isMoreConditionShow">
<span @click="isOrgLv3ConditionShow = true">
<span>{{ OrgLv4Name }}</span>
<van-icon name="arrow-down" />
</span>
<span @click="isOrgLv4ConditionShow = true">
<span>{{ OrgLv3Name }}</span>
<van-icon name="arrow-down" />
</span>
</template>
</div>
<div class="filterDate">
<div class="filterTime">
<!-- <van-field
:value="filterDate"
readonly
label=""
name=""
right-icon="arrow"
placeholder="时间筛选"
v-validate="'required'"
@click="toSelect('8')"
/> -->
<FieldDatePicter
label=""
name=""
:isDefault="true"
:value.sync="filterDate"
type="year-month"
:flag="true"
placeholder="时间筛选"
@confirm="onDateConfirm($event, '2')"
:maxDate="maxDate"
></FieldDatePicter>
</div>
<div class="number">
<van-button type="danger" @click="switchDayOrMonth(0)" :plain="currentIndex == 0 ? true : false" size="small">当月</van-button>
<van-button type="danger" @click="switchDayOrMonth(1)" :plain="currentIndex == 1 ? true : false" size="small">当天</van-button>
</div>
</div>
<div class="table">
<van-list v-model="loading" :finished="finished" @load="queryOutOrderListFunc" :immediate-check="false" finished-text="没有更多数据了">
<tableDetail :theads="theads" :tableData="tableData"></tableDetail>
</van-list>
</div>
<!-- 二级机构筛选栏 -->
<van-popup v-model="isOrgLv2ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="province" @confirm="onOrgLv2ConditionConfirm" @cancel="isOrgLv2ConditionShow = false" />
</van-popup>
<!-- 三级机构筛选栏 -->
<van-popup v-model="isOrgLv3ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="city" @confirm="onOrgLv3ConditionConfirm" @cancel="isOrgLv3ConditionShow = false" />
</van-popup>
<!-- 四级机构筛选栏 -->
<van-popup v-model="isOrgLv4ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="area" @confirm="onOrgLv4ConditionConfirm" @cancel="isOrgLv4ConditionShow = false" />
</van-popup>
</div>
</template>
<script>
import { Icon } from 'vant'
import tableDetail from '@/components/ebiz/billingDetail/tableDetail'
import { getComPerformance, getOrgList } from '@/api/ebiz/branchOffice/branchOffice'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import { queryOutOrderList, getBranchByUser } from '@/api/ebiz/billingDetail/billingDetail'
// 当前时间
const currentDate = new Date()
export default {
name: 'billingDetail',
components: { tableDetail, [Icon.name]: Icon, FieldDatePicter },
computed: {
isMoreConditionShow() {
return this.OrgLv2Name !== '全国'
},
province() {
const name = []
this.OrgLv2s.forEach(item => {
name.push(item.name)
})
return name
},
city() {
const city = ['全部']
this.OrgLv3s.forEach(item => {
if (item.upBranchCode === this.OrgLv2Code) {
city.push(item.name)
}
})
return city
},
area() {
const area = ['全部']
this.OrgLv4s.forEach(item => {
if (item.upBranchCode === this.OrgLv3Code) {
area.push(item.name)
}
})
return area
}
},
data() {
return {
currentIndex: 0, //0 当月 1当天
theads: ['姓名', '产品名称', '保费(万元)', '预收时间', '承保时间'],
tableData: [],
maxDate: new Date(),
filterDate: '',
postDate: '', //实际给后台传的时间
loading: false,
finished: false,
pageNum: 1,
pageSize: 5,
manageLv: 1, //当前人机构等级
// 二级机构筛选是否显示
isOrgLv2ConditionShow: false,
// 三级机构筛选是否显示
isOrgLv3ConditionShow: false,
// 四级机构筛选是否显示
isOrgLv4ConditionShow: false,
OrgLv2Name: '',
OrgLv4Name: '全部',
OrgLv3Name: '全部',
OrgLv2Code: '',
OrgLv2s: [],
OrgLv3Code: '',
OrgLv3s: [],
areaCode: '',
OrgLv4s: [],
params: {
// 86: 全国
manageCode: '86',
// 01: 全国, 02: 中心支公司, 03: 营销服务部, 04: 下辖营业区
manageLv: '01',
// 日期类型: 年/月/日/实时
queryType: 'd',
date: currentDate,
// all: 汇总, prem: 保费排行, active人力排行, product: 产品
type: 'all',
// 1: 中心支公司, 2: 营销服务部, 3: 下辖营业区
queryCom: ''
}
}
},
methods: {
//切换当月、当天
switchDayOrMonth(index) {
// currentIndex 0 当月 1当天
let nowDate = new Date()
let month = nowDate.getMonth() + 1
if (month <= 9) {
month = '0' + month
}
let date = {
year: nowDate.getFullYear(),
month: month,
date: nowDate.getDate()
}
if (index == 0) {
this.postDate = date.year + '-' + date.month
} else {
this.postDate = date.year + '-' + date.month + '-' + date.date
}
this.currentIndex = index == 0 ? 1 : 0
this.pageNum = 1
this.tableData = []
this.queryOutOrderListFunc()
},
//时间筛选
onDateConfirm(data) {
this.postDate = data
this.pageNum = 1
this.tableData = []
this.queryOutOrderListFunc()
},
async initData() {
// 初始化年份筛选数据
// const currentYear = new Date().getFullYear()
// const startYear = currentYear - 10
// for (let year = startYear; year <= currentYear; year++) {
// this.years.unshift(year)
// }
/**
* 查询机构下拉列表
* manageCode, manageLv传空查全国所有二级机构
**/
let resData = await getBranchByUser({})
if (resData.result != '0') return this.$toast(resData.resultMessage)
this.manageLv = resData.content.level
// 1、如果内勤四级和五级查看出单详情选择机构名称时可以选择内勤所辖区可能存在一个或者多个
// 2、如果外勤组长及以上查看出单详情选择机构名称时区只有一个。
//内勤level 04时 服务机构 外勤level 05时 区
console.log(this.manageLv)
if (this.manageLv == '04') {
const res = await getOrgList({
bussinessType: 'normal',
manageCode: resData.content.code,
manageLv: resData.content.level
})
if (res.result === '0') {
this.OrgLv2s.push(...res.content)
this.OrgLv2Name = this.OrgLv2s[0].name
this.OrgLv2Code = this.OrgLv2s[0].code
// this.orgCode = this.OrgLv2s[0].code
this.onOrgLv2ConditionConfirmGetData(this.OrgLv2Name)
} else {
this.$toast(res.resultMessage)
}
} else if (this.manageLv == '05') {
this.OrgLv2s.push(resData.content)
this.OrgLv2Name = this.OrgLv2s[0].name
this.OrgLv2Code = this.OrgLv2s[0].code
// this.orgCode = this.OrgLv2s[0].code
this.onOrgLv2ConditionConfirmGetData(this.OrgLv2Name)
}
this.queryOutOrderListFunc()
// 查询默认数据
// const result = await this.getRankData()
// this.setSummarizingData(result)
},
// 查询列表数据
queryOutOrderListFunc() {
queryOutOrderList({
appntDate: this.postDate,
distCode: this.OrgLv2Code,
depCode: this.OrgLv3Code,
orgCode: this.areaCode,
pageNum: this.pageNum,
pageSize: this.pageSize
}).then(res => {
if (res.result == 0) {
if (res.content) {
this.pageNum++
//点击其他筛选条件finished会变为true需要重置finished数据全部加载完成--false
this.finished = false
//当下一页为0时 表示全部数据加载完毕
if (res.content.nextPage == 0) {
this.finished = true
}
this.tableData = this.tableData.concat(res.content.list)
// this.tableData.push(...res.content.list)
this.loading = false
}
}
})
},
// 筛选二级机构-区--数据加载
async onOrgLv2ConditionConfirmGetData(data) {
this.isOrgLv2ConditionShow = false
let OrgLv2 = this.OrgLv2s.find(item => item.name === data)
if (OrgLv2) {
this.OrgLv2Code = OrgLv2.code
this.params.manageCode = this.OrgLv2Code
this.params.manageLv = '02'
}
if (data === '全国') {
this.params.manageCode = '86'
this.params.manageLv = '01'
}
this.OrgLv2Name = data
this.OrgLv4Name = '全部'
this.OrgLv3Name = '全部'
this.OrgLv3Code = ''
this.areaCode = ''
// // 点击其他筛选条件-重置当前页为第一页
// this.pageNum = 1
// this.tableData = []
// this.queryOutOrderListFunc()
// 查询三级机构
const res = await getOrgList({
bussinessType: 'normal',
manageCode: this.OrgLv2Code,
manageLv: '05'
})
this.OrgLv3s.splice(0)
this.OrgLv3s.push(...res.content)
// this.setRankData()
},
// 筛选二级机构-区
async onOrgLv2ConditionConfirm(data) {
this.isOrgLv2ConditionShow = false
let OrgLv2 = this.OrgLv2s.find(item => item.name === data)
if (OrgLv2) {
this.OrgLv2Code = OrgLv2.code
this.params.manageCode = this.OrgLv2Code
this.params.manageLv = '02'
}
if (data === '全国') {
this.params.manageCode = '86'
this.params.manageLv = '01'
}
this.OrgLv2Name = data
this.OrgLv4Name = '全部'
this.OrgLv3Name = '全部'
this.OrgLv3Code = ''
this.areaCode = ''
// 点击其他筛选条件-重置当前页为第一页
this.pageNum = 1
this.tableData = []
this.queryOutOrderListFunc()
// 查询三级机构
const res = await getOrgList({
bussinessType: 'normal',
manageCode: this.OrgLv2Code,
manageLv: '05'
})
this.OrgLv3s.splice(0)
this.OrgLv3s.push(...res.content)
// this.setRankData()
},
// 筛选三级机构-部
async onOrgLv3ConditionConfirm(data) {
this.isOrgLv3ConditionShow = false
this.OrgLv4Name = data
let OrgLv3 = this.OrgLv3s.find(item => item.name === data)
if (OrgLv3) {
this.OrgLv3Code = OrgLv3.code
this.params.manageCode = this.OrgLv3Code
this.params.manageLv = '03'
}
if (data === '全部') {
this.params.manageCode = this.OrgLv2Code
this.params.manageLv = '02'
}
this.OrgLv3Name = '全部'
// this.OrgLv2Code = ''
this.areaCode = ''
// 点击其他筛选条件-重置当前页为第一页
this.pageNum = 1
this.tableData = []
this.queryOutOrderListFunc()
// 查询四级机构
const res = await getOrgList({
bussinessType: 'normal',
manageCode: this.OrgLv3Code,
manageLv: '06'
})
this.OrgLv4s.splice(0)
this.OrgLv4s.push(...res.content)
// this.setRankData()
},
// 筛选四级机构-组
async onOrgLv4ConditionConfirm(data) {
this.isOrgLv4ConditionShow = false
this.OrgLv3Name = data
let area = this.OrgLv4s.find(item => item.name === data)
if (area) {
this.areaCode = area.code
this.params.manageCode = this.areaCode
this.params.manageLv = '04'
}
if (data === '全部') {
this.params.manageCode = this.OrgLv3Code
this.params.manageLv = '03'
}
// this.OrgLv2Code = ''
// this.OrgLv3Code = ''
// 点击其他筛选条件-重置当前页为第一页
this.pageNum = 1
this.tableData = []
this.queryOutOrderListFunc()
// this.setRankData()
}
},
created() {
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
month = '0' + month
}
//默认展示当天数据
this.postDate = date.getFullYear() + '-' + month + '-' + date.getDate()
this.initData()
}
}
</script>
<style lang="scss" scoped>
.classification {
font-size: 14px;
padding: 15px;
background: #ee3030;
color: #fff;
}
.van-icon {
font-weight: bolder;
}
::v-deep .classification .van-icon {
vertical-align: middle;
margin-right: 5px;
margin-bottom: 3px;
}
.filterDate {
display: flex;
justify-content: space-between;
align-items: center;
padding: 7px 0;
.number {
flex-shrink: 0;
margin: 0 7px;
font-size: 14px;
}
.filterTime {
margin-right: 5px;
}
}
/deep/.van-field__label {
width: 0px;
}
.table {
//overflow-x: auto;导致 List 无法正确地判断滚动容器。解决方法是去除该样式
// overflow-x: auto;
margin: 5px;
box-sizing: border-box;
background: #fff;
}
.table th {
width: 130px;
}
table {
width: 180vw;
}
.table {
margin-top: 10px;
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #999;
text-align: center;
font-size: 14px;
line-height: 30px;
background: #fff;
}
thead {
th {
height: 40px;
line-height: 40px;
background: #e9332e;
color: #fff;
}
}
}
.th-fixed {
position: sticky;
left: 0;
width: 200px;
padding: 0 5px;
}
.td-fixed {
position: sticky;
width: 200px;
padding: 0 5px;
left: 0;
text-decoration: underline;
}
</style>