添加页面

This commit is contained in:
na.guo
2020-09-01 10:53:36 +08:00
parent d0ce3d9180
commit d949ccfbbf
5 changed files with 1137 additions and 1 deletions

View File

@@ -1,6 +1,22 @@
import request from '@/assets/js/utils/request'
import request1 from '@/assets/js/utils/request1'
import getUrl from '@/assets/js/utils/get-url'
//获取续期客户列表
export function getRenewalCustomerList(data) {
return request({
url: getUrl('/data/Customer/customerList', 1), //0=》mock数据 1=》正式数据
method: 'post',
data
})
}
//获取续期客户列表
export function getPolicyListAgent(data) {
return request1({
url: getUrl('/sale/policy/policyListAgent', 1), //0=》mock数据 1=》正式数据
method: 'post',
data
})
}
//获取续期列表
export function getList(data) {
return request({

View File

@@ -0,0 +1,34 @@
<!-- -->
<template>
<div class="cellLine">
<span v-if="title" class="name">{{ title }}:</span>
<span v-if="text"> {{ text }}</span>
<span v-else> 暂无</span>
</div>
</template>
<script>
import Vue from 'vue'
export default {
data() {
return {}
},
props: ['title', 'text'],
name: 'cellLine',
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.cellLine {
padding: 5px;
font-size: 14px;
color: #fefefe;
span {
color: #000;
}
}
</style>

View File

@@ -0,0 +1,336 @@
<template>
<div class="container">
<van-search placeholder="请输入客户姓名/电话" v-model="searchVal" @input="searchList" />
<div v-if="isSuccess">
<div v-if="customerList.length > 0">
<van-index-bar v-if="!searchVal" :index-list="indexList">
<div v-for="(item, index) in customerList" :key="index" class="bg-white mb10">
<van-index-anchor :index="item.key" class="border-gb" />
<div
v-for="(item, index) in customerList[index].list"
:key="index"
class="pr15 h60 flex align-items-c border-gb bg-white mr15"
@click="go('policyList', item.customerNumber)"
>
<img class="w40 ml15" src="../../../assets/images/bnf_avatar.png" />
<div class="ml10 flex1" style="line-height:25px">
<div>{{ item.appntName }}</div>
</div>
</div>
</div>
</van-index-bar>
<div v-else>
<div
v-for="(item, index) in newList"
:key="index"
class="pr15 h60 flex align-items-c border-gb bg-white mr15"
@click="go('customerInfo', item.customerNumber)"
>
<img class="w40 ml15" src="../../../assets/images/bnf_avatar.png" />
<div class="ml10 flex1" style="line-height:25px">
<div>{{ item.appntName }}</div>
</div>
</div>
</div>
</div>
</div>
<div v-if="customerList.length <= 0 || isFlag" class="text-center">
<img class="mt40" src="@/assets/images/pic_page-non.png" />
<div class="fs17 mt40">暂无客户</div>
</div>
<van-popup v-model="show1" position="right" :style="{ width: '70%', height: '100%' }">
<div class="tab pv10 ph20 border-gb">
<p class="fs16 mv10 h30 c-gray-dark">客户筛选</p>
<ul class="fs13 flex justify-content-s flex-wrap">
<li
v-for="(item, index) in tabList1"
:key="index"
@click="selectTab('tab1', index)"
:class="{ active: index == active1 }"
class="pv6 ph10 m5
c-gray-darker"
>
{{ item.name }}
</li>
</ul>
</div>
<div class="tab pv10 ph20 border-gb">
<p>客户来源</p>
<ul class="fs13 flex justify-content-s flex-wrap">
<li
v-for="(item, index) in tabList2"
:key="index"
@click="selectTab('tab2', index)"
:class="{ active: index == active2 }"
class="pv6 ph10 m5 c-gray-darker"
>
{{ item.name }}
</li>
</ul>
</div>
<div class="bottom-btn flex">
<van-button class="green" color="#FEEFD8" @click="reset" v-no-more-click="1000">重置</van-button>
<van-button type="danger" @click="select" v-no-more-click="1000">确定</van-button>
</div>
</van-popup>
</div>
</template>
<script>
import { Search, Cell, IndexBar, IndexAnchor, Popup, Button, Tag } from 'vant'
import { getRenewalCustomerList } from '@/api/ebiz/renewalManage/renewalManage'
export default {
name: 'login',
components: {
[Search.name]: Search,
[Cell.name]: Cell,
[IndexBar.name]: IndexBar,
[IndexAnchor.name]: IndexAnchor,
[Popup.name]: Popup,
[Button.name]: Button,
[Tag.name]: Tag
},
data() {
return {
searchVal: '',
show1: false,
show2: false,
active1: 0,
active2: 0,
isFlag: false,
// type: ['success', 'primary', 'danger', ''],
type: ['success', 'primary', ''],
indexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#'],
customerList: [],
newList: [],
isSuccess: false,
tabList1: [
{
name: '全部',
value: ''
},
{
name: '准客户',
value: '0'
},
{
name: '老客户',
value: '1'
}
],
tabList2: [
{
name: '全部',
value: ''
},
{
name: '转介绍',
value: '0'
},
{
name: '缘故',
value: '1'
},
{
name: '陌生',
value: '2'
}
]
}
},
mounted() {
this.getCustomerList() //客户列表查询
},
methods: {
searchList() {
let $this = this
$this.newList = []
if ($this.searchVal) {
$this.customerList.map(function(item) {
item.list.map(function(item) {
if (item.appntName.search($this.searchVal) != -1) {
$this.newList.push(item)
if ($this.length <= 0) {
$this.isFlag = true
}
}
})
})
} else {
$this.getCustomerList()
}
},
selectTab(name, index) {
if (name == 'tab1') {
this.active1 = index
} else if (name == 'tab2') {
this.active2 = index
}
},
select() {
let $this = this
let sxIndex = $this.active1 - 1
let lyIndex = $this.active2 - 1
if (sxIndex < 0) {
sxIndex = ''
}
if (lyIndex < 0) {
lyIndex = ''
}
$this.show1 = false
$this.getCustomerList(sxIndex, lyIndex)
},
reset() {
this.active1 = ''
this.active2 = ''
},
//获取客户列表
getCustomerList(customerType, customerSource) {
let $this = this
$this.customerList = []
let data = {
customerType: customerType,
customerSource: customerSource
}
getRenewalCustomerList(data)
.then(res => {
if (res.result == 0) {
$this.formatData(res)
$this.isSuccess = true
if ($this.customerList[0].key == '#') {
let tempObj = $this.customerList[0]
$this.customerList.splice(0, 1)
$this.customerList.push(tempObj)
}
//根据新数据获取筛选列表
$this.newList = []
$this.customerList.map(function(item) {
item.list.map(function(item) {
if (item.customerName.search($this.searchVal) != -1 || item.customerPhone.search($this.searchVal) != -1) {
$this.newList.push(item)
if ($this.length <= 0) {
$this.isFlag = true
}
}
})
})
}
})
.catch(err => {})
},
formatData(data) {
//数据重新组装
// let i
// for (i in data.content) {
// this.customerList.push({
// key: data.content[i].groupByChar,
// list: data.content[i]
// })
// }
var map = {},
dest = []
for (var i = 0; i < data.content.length; i++) {
var ai = data.content[i]
if (!map[ai.groupByChar]) {
dest.push({
key: ai.groupByChar,
list: [ai]
})
map[ai.groupByChar] = ai
} else {
for (var j = 0; j < dest.length; j++) {
var dj = dest[j]
if (dj.groupByChar == ai.groupByChar) {
dj.data.push(ai)
break
}
}
}
}
this.customerList = dest
},
close() {
this.show2 = false
},
//获取原生通讯录方法
phoneList() {
this.close()
EWebBridge.webCallAppInJs('contactList', {})
},
go(path, id) {
if (id) {
// url = path + '?id=' + encodeURIComponent(id)
localStorage.setItem('customerNumber', id)
}
console.log(path, 'path')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/renewalManage/' + path
},
routerInfo: {
path: path
}
})
this.close()
}
}
}
</script>
<style lang="scss" scoped>
.container {
.van-search__content {
background: #fff !important;
border-radius: 10px;
}
.van-search {
background: none !important;
}
.list {
&:last-child {
border-bottom: none;
}
}
.tab {
p {
line-height: 30px;
}
ul {
li {
border-radius: 4px;
background: #f5f5f5;
&.active {
background: #e9332e;
color: #fff !important;
border: none;
}
}
}
}
.bottom-btn {
width: 100%;
button {
width: 50%;
border: none !important;
}
}
.box {
li {
height: 40px;
line-height: 40px;
border-bottom: 1px solid #ededed;
}
}
}
.van-tag--plain {
margin-right: 10px;
}
.van-tag--primary.van-tag--plain {
color: #5ca7de;
}
.van-tag--success.van-tag--plain {
color: #7ed321;
}
</style>

View File

@@ -0,0 +1,365 @@
<template>
<div class="detail-container">
<van-collapse v-model="activeNames">
<!-- 保单信息 -->
<van-collapse-item title="保单信息" name="1" class="pb10 pt10">
<van-cell-group>
<van-cell title="投保单号" :value="OrderInfoDTO.orderNo" />
<van-cell title="投保日期" :value="OrderInfoDTO.appntDateLabel" />
</van-cell-group>
</van-collapse-item>
<!-- 投保人信息 -->
<van-collapse-item title="投保人信息" name="2" class="detail-title pb10">
<van-cell-group>
<van-cell title="投保人" :value="appntDTO.name" />
<van-cell title="性别" :value="appntDTO.sex" />
<van-cell title="证件类型" :value="appntDTO.idType" />
<van-cell title="证件号码" :value="appntDTO.idNo" />
<van-cell title="联系电话" :value="appntDTO.mobile" />
</van-cell-group>
</van-collapse-item>
<!-- 多被保险人信息 -->
<div v-for="(item, index) in insuredDTOs" :key="index" class="pb10">
<van-collapse-item title="被保险人信息" :name="index + 40" class="pb10">
<van-cell-group>
<van-cell title="是投保人的" :value="item.relationToAppnt" />
<van-cell title="姓名" :value="item.name" />
<van-cell title="性别" :value="item.sex" />
<van-cell title="证件类型" :value="item.idType" />
<van-cell title="证件号码" :value="item.idNo" />
<van-cell title="联系电话" :value="item.mobile" />
</van-cell-group>
</van-collapse-item>
<div v-if="OrderInfoDTO.bnfFlag == '法定受益人'">
<van-cell-group>
<van-cell title="受益人" value="法定受益人" class="ml15"></van-cell>
</van-cell-group>
</div>
<div v-for="(itm, i) in item.bnfDTOs" :key="itm.name" class="pb10" v-else>
<!-- 受益人信息 -->
<van-collapse-item title="受益人信息" :name="i + 81">
<van-cell-group>
<van-cell title="受益人" :value="OrderInfoDTO.bnfFlag" />
<div v-if="OrderInfoDTO.bnfFlag == '指定受益人'">
<van-cell title="姓名" :value="itm.name" />
<van-cell title="性别" :value="itm.sex" />
<van-cell title="是被保险人的" :value="itm.relationToInsured" />
<van-cell title="受益比例" :value="`${itm.bnfLot}%`" v-if="itm.bnfLot != null" />
<van-cell title="证件类型" :value="itm.idType" />
<van-cell title="证件号码" :value="itm.idNo" />
</div>
</van-cell-group>
</van-collapse-item>
</div>
<div v-for="(it, ind) in list" :key="it.riskName" class="pb10">
<!-- <span>{{ it.isMainRisk }}</span> -->
<van-collapse-item title="险种信息" :name="ind + 10">
<van-cell-group>
<van-cell title="险种名称" :value="it.riskName" />
<van-cell title="保险期间" :value="it.insuYear" />
<van-cell title="交费方式" :value="it.payIntv" />
<van-cell title="交费期间" :value="it.payEndYearFlag == 'Y' ? `${it.payEndYear}年` : `至${it.payEndYear}岁`" v-if="it.payEndYear != '1000'" />
<van-cell title="交费期间" v-if="it.payEndYear == '1000'" value="一次性交清" />
<!-- isYear == true ? `${it.insuYear}` : it.insuYear" -->
<van-cell title="险种保额()" value="--" v-if="it.riskCode == 'GFRS_M0015' || it.riskCode == 'GFRS_M0017' || it.riskCode == 'GFRS_M0003'" />
<van-cell title="险种保额()" :value="it.amt | moneyFormat" v-else />
<van-cell title="险种保费()" :value="it.mainPremDetail | moneyFormat" />
<!-- v-if="it.isMainRisk == '1'" -->
<!-- <span>{{ it.isMainRisk }}</span> -->
<van-collapse-item title="附加险信息" :name="num + 61" v-for="(i, num) in it.addtion" :key="num">
<van-cell-group>
<van-cell title="险种名称" :value="i.riskName" />
<van-cell title="保险期间" :value="i.insuYear" />
<!-- item.payEndYearFlag == 'Y' ? `${it.payEndYear}年` : `至${it.payEndYear}岁` -->
<van-cell title="交费方式" :value="i.payIntv" />
<van-cell title="交费期间" :value="i.payEndYearFlag == 'Y' ? `${i.payEndYear}` : `${i.payEndYear}`" v-if="i.payEndYear != '1000'" />
<van-cell title="交费期间" v-if="i.payEndYear == '1000'" value="一次性交清" />
<van-cell title="险种保额()" value="--" v-if="i.riskCode == 'GFRS_M0015' || i.riskCode == 'GFRS_M0017' || i.riskCode == 'GFRS_M0003'" />
<van-cell title="险种保额()" :value="i.planCodeLabel" v-else-if="i.amt == null && i.planCode != ''" />
<van-cell title="险种保额()" :value="i.amt | moneyFormat" v-else />
<van-cell title="险种保费()" :value="i.prem | moneyFormat" />
</van-cell-group>
</van-collapse-item>
</van-cell-group>
</van-collapse-item>
</div>
<div v-for="(itm, i) in list" :key="itm.name" class="pb10">
<!-- 续期缴费信息 -->
<van-collapse-item title="续期交费信息" :name="i + 100">
<van-cell-group>
<van-cell title="交费方式" :value="itm.name" />
<van-cell title="转账银行" :value="itm.sex" />
<van-cell title="转账账号" :value="itm.relationToInsured" />
<van-cell title="下次扣款日" :value="`${itm.bnfLot}%`" v-if="itm.bnfLot != null" />
<van-cell title="下期扣款金额()" :value="itm.idType" />
</van-cell-group>
</van-collapse-item>
</div>
</div>
</van-collapse>
</div>
</template>
<script>
import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant'
import { getDetail } from '@/api/ebiz/sale/sale'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
export default {
data() {
return {
// 折叠面板
activeNames: ['1'],
// 保单基本信息
OrderInfoDTO: {},
// 投保人信息
appntDTO: {},
// 被保险人信息
insuredDTOs: [],
// 保单号
contNo: '',
list: []
}
},
created() {
let that = this
// 获取保单详情
that.getPolicyDetail()
// console.log(formatAllRisk)
},
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Button.name]: Button
},
methods: {
// 获取保单详情
getPolicyDetail() {
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo')
// orderNo: '8186270000000806'
}
getDetail(data).then(res => {
console.log(res)
if (res.result == '0') {
if (res.orderDTO.orderInfoDTO.bnfFlag == '1') {
res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人'
} else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') {
res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人'
}
that.OrderInfoDTO = res.orderDTO.orderInfoDTO
that.appntDTO = res.orderDTO.appntDTO
// 投保人信息
if (res.orderDTO.appntDTO.sex == '0') {
res.orderDTO.appntDTO.sex = '男'
} else if (res.orderDTO.appntDTO.sex == '1') {
res.orderDTO.appntDTO.sex = '女'
}
switch (res.orderDTO.appntDTO.idType) {
case '1':
res.orderDTO.appntDTO.idType = '居民身份证'
break
case '2':
res.orderDTO.appntDTO.idType = '户口本'
break
case '3':
res.orderDTO.appntDTO.idType = '出生证'
break
case '4':
res.orderDTO.appntDTO.idType = '外国人护照'
break
case '5':
res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证'
break
case '6':
res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证'
break
// case '7':
// res.orderDTO.appntDTO.idType = '其他'
// break
case '8':
res.orderDTO.appntDTO.idType = '外国人永久居留身份证'
break
case '9':
res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break
}
that.appntDTO = res.orderDTO.appntDTO
res.orderDTO.insuredDTOs.map(item => {
item.riskDTOLst.map(it => {
if (it.insuYearFlag == 'Y') {
it.insuYear = `${it.insuYear}年`
} else {
if (it.insuYearFlag == 'A' && it.insuYear == '106') {
it.insuYear = '终身'
} else {
it.insuYear = `至${it.insuYear}周岁的保单周年日`
}
}
Number(it.payIntv)
switch (it.payIntv) {
case 0:
it.payIntv = '一次性交清'
break
case 1:
it.payIntv = '月交'
break
case 12:
it.payIntv = '年交'
break
}
})
})
// 被保险人信息
res.orderDTO.insuredDTOs.map(item => {
if (item.sex == '0') {
item.sex = '男'
} else if (item.sex == '1') {
item.sex = '女'
} else {
item.sex = '不详'
}
switch (item.idType) {
case '1':
item.idType = '居民身份证'
break
case '2':
item.idType = '户口本'
break
case '3':
item.idType = '出生证'
break
case '4':
item.idType = '外国人护照'
break
case '5':
item.idType = '港澳居民来往内地通行证'
break
case '6':
item.idType = '台湾居民来往大陆通行证'
break
// case '7':
// item.idType = '其他'
// break
case '8':
item.idType = '外国人永久居留身份证'
break
case '9':
item.idType = '港澳台居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
item.relationToAppnt = '本人'
break
case '2':
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
item.bnfDTOs.map(it => {
if (it.sex == '0') {
it.sex = '男'
} else if (it.sex == '1') {
it.sex = '女'
} else {
it.sex = '不详'
}
switch (it.idType) {
case '1':
it.idType = '居民身份证'
break
case '2':
it.idType = '户口本'
break
case '3':
it.idType = '出生证'
break
case '4':
it.idType = '外国人护照'
break
case '5':
it.idType = '港澳居民来往内地通行证'
break
case '6':
it.idType = '台湾居民来往大陆通行证'
break
// case '7':
// it.idType = '其他'
// break
case '8':
it.idType = '外国人永久居留身份证'
break
case '9':
it.idType = '港澳台居民居住证'
break
}
switch (it.relationToInsured) {
case '1':
it.relationToInsured = '本人'
break
case '2':
it.relationToInsured = '配偶'
break
case '3':
it.relationToInsured = '父母'
break
case '4':
it.relationToInsured = '子女'
break
case '5':
it.relationToInsured = '其他'
break
}
})
}
})
that.insuredDTOs = res.orderDTO.insuredDTOs
// 格式化
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
} else {
this.$toast(res.resultMessage)
// EWebBridge.webCallAppInJs('bridge', {
// flag: 'webview_toast',
// extra: { content: res.resultMessage }
// })
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-container {
.van-hairline--top-bottom::after {
border: none;
}
/deep/ .van-collapse-item__content {
padding-top: 0;
}
/deep/.van-collapse-item__title {
// background: rgb(241, 241, 241);
padding-left: 30px;
}
/deep/ .van-cell__value {
text-align: left !important;
}
}
</style>

View File

@@ -0,0 +1,385 @@
<template>
<div class="sale-list-container pb50">
<van-sticky>
<van-tabs :line-width="lineWidth" v-model="active" @change="tabChange" sticky>
<van-tab name="uncommit" title="有效"></van-tab>
<van-tab name="commit" title="失效/终止"></van-tab>
</van-tabs>
</van-sticky>
<van-list
v-model="loading"
:immediate-check="false"
:finished="finished"
:finished-text="finishedText"
error-text="请求失败点击重新加载"
:error.sync="error"
@load="loadMore"
class="pb45"
>
<div v-if="isSuccess">
<div v-if="saleList.length > 0">
<div v-for="(order, index) in saleList" :key="index">
<div class="bg-white m15 pv15 pr15 pl10">
<cellLine title="投保人" :text="order.appntDTO.name"></cellLine>
<div @click="seePolicy(order)" v-for="(insured, insuredIndex) in order.insuredDTOs" :key="insuredIndex">
<cellLine title="被保人" :text="insured.name"></cellLine>
<div v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
<div class="mv10">
<span class="fs15 c-gray-dark">{{ main.riskName }}</span>
</div>
<div class="mv10 pl45 flex" v-for="(addtional, addtionIndex) in main.addtion" :key="addtionIndex">
<span class="fs13">{{ addtional.riskName }}</span>
</div>
</div>
</div>
<div class="pt15" v-if="active == 'commit'" style="border-top:1px solid #dadada">
<div>
<div class="w80 inline-b">
<van-tag plain color="#999999">投保单号</van-tag>
</div>
<span class="fs14 c-gray-dark">{{ order.orderInfoDTO.orderNo }}</span>
</div>
<div class="mt10">
<div class="w80 inline-b">
<van-tag plain color="#999999">状态</van-tag>
</div>
<span class="fs14 c-gray-dark">{{ order.stateName }}</span>
</div>
</div>
</div>
</div>
</div>
<div v-else class="text-center">
<img class="mt40" src="@/assets/images/pic_page-non.png" />
<div class="fs17 mt40">暂无订单</div>
</div>
</div>
</van-list>
</div>
</template>
<script>
import { Tabs, Tab, List, Tag, Sticky, Toast, Dialog } from 'vant'
import { orderList, deleteOrderInfo, selfToHuman } from '@/api/ebiz/sale/sale'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
import cellLine from './compontents/cellLine'
export default {
name: 'saleList',
components: {
cellLine,
[Tabs.name]: Tabs,
[Tab.name]: Tab,
[List.name]: List,
[Tag.name]: Tag,
[Sticky.name]: Sticky,
[Dialog.name]: Dialog
},
data() {
return {
lineWidth: 45,
active: 'uncommit', //uncommit 表示未提交 commit表示已提交
saleList: [],
loading: false,
finished: false,
total: '', //总页数
currentPage: 1, //当前页数
error: false,
finishedText: '没有更多了',
pageSize: 5, //每页数据条数
isSuccess: false
}
},
mounted() {
this.loadMore()
this.lineWidth = document.body.clientWidth / 2
},
methods: {
//分页用
loadMore() {
let pageInfo = {
pageNum: this.currentPage,
pageSize: this.pageSize,
orderType: this.active
}
this.getOrderList(pageInfo)
},
//再次支付
againPay(order) {
localStorage.orderNo = order.orderInfoDTO.orderNo
// 再次支付 salelist为 0
localStorage.salelist = '0'
localStorage.removeItem('changeCard')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent'
},
routerInfo: { path: '/sale/payMent' }
})
},
//支付失败去换卡
changeCard(order) {
let url = ''
let orderStatus = order.orderInfoDTO.orderStatus
localStorage.orderNo = order.orderInfoDTO.orderNo
if (order.insuredDTOs[0].riskDTOLst[0]) {
localStorage.setItem('productCode', order.insuredDTOs[0].riskDTOLst[0].mainRiskCode)
}
localStorage.setItem('changeCard', true)
switch (orderStatus) {
case '55': //账户信息页
url = '/sale/AccountInformation'
break
case '48': //账户信息填写成功,跳到影像上传页
url = '/sale/AttachmentManagement'
break
case '49': //影像上传页填写成功,跳到银行卡号确认页
url = '/sale/SignatureConfirmation'
break
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#${url}`
},
routerInfo: { path: url }
})
},
// 去人工核保
// goNucleus() {
// let data = {
// orderNo: this.underWriteData.orderNo
// }
// selfToHuman(data).then(res => {
// if (res.result == '0') {
// Dialog.alert({
// title: '提示',
// message: '提交人工核保成功'
// }).then(() => {
// this.$jump({
// flag: 'h5',
// extra: {
// url: location.origin + '/#/sale/list',
// backToFirst: '1'
// },
// routerInfo: {
// path: '/sale/list'
// }
// })
// })
// } else {
// this.$toast(res.resultMessage)
// }
// })
// },
//去支付
goPay(order) {
localStorage.orderNo = order.orderInfoDTO.orderNo
localStorage.salelist = '1'
localStorage.removeItem('changeCard')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent'
},
routerInfo: { path: '/sale/payMent' }
})
},
//查看保单
seePolicy(order) {
localStorage.orderNo = order.orderInfoDTO.orderNo
localStorage.removeItem('changeCard')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/renewalManage/policyDetail'
},
routerInfo: { path: '/renewalManage/policyDetail' }
})
},
//初始化保单列表
getOrderList(pageInfo) {
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
orderList(pageInfo).then(res => {
console.log('调用了一次')
// this.$toast.clear()
if (res.result == '0') {
this.isSuccess = true
this.currentPage++
if (res.orderDTOPageInfo == null || res.orderDTOPageInfo == '' || res.orderDTOPageInfo == undefined) {
this.finished = true
this.loading = false
this.finishedText = ''
return
}
let list = res.orderDTOPageInfo.list
if (list.length == 0) {
this.finishedText = ''
} else {
this.finishedText = '已经全部加载'
}
list = formatRiskList(list, 'insuredDTOs', 'riskDTOLst') //根据后面两个参数 来格式化数据
dataDictionary.policyState.forEach(state => {
list.forEach(order => {
if (state.id == order.orderInfoDTO.orderStatus) {
order.stateName = state.text
}
})
})
this.saleList = this.saleList.concat(list)
console.log(this.saleList.length)
if (this.saleList.length == 0) {
this.isSuccess = false
}
this.loading = false
if (res.orderDTOPageInfo.nextPage == 0) {
//当下一页为0时 表示全部数据加载完毕
this.finished = true
}
} else {
this.finished = true
this.loading = false
this.finishedText = res.resultMessage
}
})
},
tabChange(name) {
this.currentPage = 1
this.active = name
this.saleList = []
;[this.loading, this.finished] = [true, false]
this.finishedText = '正在加载...'
this.loadMore()
},
//投保单详情
goDetail(order) {
window.localStorage.setItem('detailJump', '')
if (order.insuredDTOs[0]) {
if (order.insuredDTOs[0].riskDTOLst[0]) {
localStorage.setItem('productCode', order.insuredDTOs[0].riskDTOLst[0].mainRiskCode)
}
}
let orderStatus = order.orderInfoDTO.orderStatus
let orderNo = order.orderInfoDTO.orderNo
let url = ''
//保存对应的订单号
localStorage.orderNo = orderNo
localStorage.isFrom = 'sale'
localStorage.removeItem('changeCard')
console.log('---orderStatus', orderStatus, orderNo)
switch (orderStatus) {
case '01': //已签名待客户确认, 跳到签名确认页面
url = '/sale/SignatureConfirmation?edit=1'
break
case '43': //未签名待客户确认, 跳到签名确认页面
url = '/sale/SignatureConfirmation?edit=1'
break
case '35': //投保人保存成功, 跳到被保险人页面--
url = '/sale/insuredPerson?edit=1'
break
case '36': //被保险人保存成功, 跳到已选产品列表
url = '/common/selectedProduct?edit=1'
break
case '37': //受益人保存成功, 跳到告知信息--
url = '/sale/NotifyingMessage?edit=1'
break
case '38': //账户信息保存成功, 跳到附件管理--
url = '/sale/AttachmentManagement?edit=1'
break
case '39': //险种信息保存成功, 跳到已选产品列表
url = '/common/selectedProduct?edit=1'
break
case '40': //告知信息保存成功, 跳到账户信息--
url = '/sale/AccountInformation?edit=1'
break
case '': //跳到投保人
url = '/sale/insuredInfo?edit=1'
break
case '44': //建议书转投保, 跳到投保人
url = '/sale/insuredInfo?edit=1'
break
default:
break
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#${url}`
},
routerInfo: { path: url }
})
},
//删除投保单
del(order, index) {
let params = {
orderType: 'DEL_ORDER', //列表页 此值为固定
id: order.orderInfoDTO.orderNo,
orderDTO: {
orderInfo: {
orderNo: order.orderNo
}
}
}
this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '确认删除投保单吗?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
deleteOrderInfo(params).then(res => {
if (res.result == 0) {
console.log(index)
this.saleList = []
this.isSuccess = false
this.currentPage = 1
;[this.loading, this.finished] = [true, false]
let pageInfo = {
pageNum: this.currentPage,
pageSize: this.pageSize,
orderType: this.active
}
this.loadMore(pageInfo)
} else {
Toast.fail(res.resultMessage)
}
})
})
.catch(() => {})
},
//新增
add() {
localStorage.orderNo = ''
localStorage.chooseProductCodes = '' //置空所选险种
//清空附件管理的影像信息
// localStorage.imgfront = ''
// localStorage.imgfrontPath = ''
// localStorage.imgfrontInsured = ''
// localStorage.imgfrontInsuredPath = ''
// localStorage.bankCardUrl = ''
// localStorage.bankCardUrlInsured = ''
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/insuredInfo'
},
routerInfo: { path: '/sale/insuredInfo' }
})
}
}
}
</script>
<style lang="scss" scoped></style>