mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-06 21:16:44 +08:00
投保数据提交
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: PangXingYue
|
||||
* @Date: 2021-03-04 10:38:24
|
||||
* @LastEditTime: 2021-03-04 10:50:17
|
||||
* @LastEditTime: 2021-03-22 11:01:02
|
||||
* @LastEditors: PangXingYue
|
||||
* @Description:
|
||||
* @FilePath: \ebiz-h5\src\api\ebiz\insureAgain\insureAgain.js
|
||||
@@ -9,9 +9,9 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
// 订单列表
|
||||
export function orderList(data) {
|
||||
export function getPolicyListAgent(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/order/orderList', 1),
|
||||
url: getUrl('/sale/policy/policyListAgent', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Author: PangXingYue
|
||||
* @Date: 2021-03-22 09:46:16
|
||||
* @LastEditTime: 2021-03-22 14:02:35
|
||||
* @LastEditors: PangXingYue
|
||||
* @Description:
|
||||
* @FilePath: \ebiz-h5\src\components\ebiz\insureAgain\Order.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="order">
|
||||
<slot name="header">
|
||||
@@ -6,12 +14,12 @@
|
||||
<div class="content p15">
|
||||
<p class="name mb8">
|
||||
<van-tag plain color="#5CA7DE">投保</van-tag>
|
||||
<span class="ml5">{{ order.appntDTO.name }}</span>
|
||||
<span class="ml5">{{ order.appntName }}</span>
|
||||
</p>
|
||||
<p class="name mb8" v-for="(insured, insuredIndex) in order.insuredDTOs" :key="insuredIndex">
|
||||
<p class="name mb8">
|
||||
<van-tag plain color="#DD9C56">被保</van-tag>
|
||||
<span class="ml5">{{ insured.name }}</span>
|
||||
<span v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
|
||||
<span class="ml5">{{ order.insuredName }}</span>
|
||||
<!-- <span v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
|
||||
<div class="mv10">
|
||||
<span class="w45 inline-b">
|
||||
<van-tag plain type="danger">主险</van-tag>
|
||||
@@ -24,11 +32,11 @@
|
||||
</span>
|
||||
<span class="fs13">{{ addtional.riskName }}</span>
|
||||
</div>
|
||||
</span>
|
||||
</span> -->
|
||||
</p>
|
||||
<p class="prem mb10">
|
||||
<span>首期总保费(元)</span>
|
||||
<span>{{ order.firstPrem == 0 ? '0.00' : order.firstPrem | moneyFormat }}</span>
|
||||
<span>{{ order.prem == 0 ? '0.00' : order.prem | moneyFormat }}</span>
|
||||
</p>
|
||||
<div class="divider mb10" />
|
||||
<slot></slot>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-search v-model="searchName" placeholder="请输入保单号/投保人姓名/被保险人姓名" @change="searchList" @keyup.enter="searchList" />
|
||||
<van-search v-model="searchName" placeholder="请输入保单号/投保人姓名/被保险人姓名"/>
|
||||
<van-sticky>
|
||||
<van-tabs v-model="active" @change="tabChange">
|
||||
<van-tab name="uncommit" title="未提交" />
|
||||
<van-tab name="commit" title="已提交" />
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<div class="container">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<van-list ref="uncommitted" v-model="loading" :finished="finished" :finished-text="finishedText" :immediate-check="false" @load="loadMore">
|
||||
<div v-if="insureList.length>0">
|
||||
<Order v-for="(order,index) in insureList" :key="index" :order="order">
|
||||
<div class="container" v-if="isShow">
|
||||
<van-pull-refresh @refresh="onRefresh" v-model="isLoading">
|
||||
|
||||
<div v-if="NewItems.length>0">
|
||||
<Order v-for="(order,index) in NewItems" :key="index" :order="order">
|
||||
<p v-if="active === 'uncommit'" class="name mb8">
|
||||
<van-tag plain color="#999999">保单保障日截止日期</van-tag>
|
||||
<span class="ml5 span">{{ order.orderInfoDTO.orderNo }}</span>
|
||||
<span class="ml5 span">{{ order.cvaliDate }}</span>
|
||||
</p>
|
||||
<div v-if="active === 'commit'">
|
||||
<p class="name mb8">
|
||||
<van-tag plain color="#999999">重新投保单号</van-tag>
|
||||
<span class="ml5 span">{{ order.orderInfoDTO.orderNo }}</span>
|
||||
<span class="ml5 span">{{ order.policyNo }}</span>
|
||||
</p>
|
||||
<p class="name">
|
||||
<van-tag plain color="#999999">状态</van-tag>
|
||||
<span class="ml5 span">{{ order.stateName }}</span>
|
||||
<span class="ml5 span">{{ order.orderStatus }}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
</Order>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
</van-pull-refresh>
|
||||
<van-popup v-model="isAgreementShow" position="right" :style="{ height: '100vh', width: '100vw' }">
|
||||
<ReadingAgreement :needTime="false">
|
||||
@@ -71,11 +71,12 @@
|
||||
|
||||
<script>
|
||||
import { Search, Sticky, PullRefresh, list, Tag, Popup, Radio, RadioGroup } from 'vant'
|
||||
import { orderList } from '@/api/ebiz/insureAgain/insureAgain'
|
||||
import { getPolicyListAgent } from '@/api/ebiz/insureAgain/insureAgain'
|
||||
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
|
||||
import Order from '@/components/ebiz/insureAgain/Order'
|
||||
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
|
||||
import CacheUtils from '@/assets/js/utils/cacheUtils'
|
||||
export default {
|
||||
name: 'InsureAgain',
|
||||
components: {
|
||||
@@ -94,30 +95,36 @@ export default {
|
||||
return {
|
||||
searchName: '', //搜索名
|
||||
active: 'uncommit',
|
||||
insureList: [],
|
||||
currentPage: 1, //当前页数
|
||||
isLoading: false,
|
||||
loading: false,
|
||||
finished: false,
|
||||
finishedText: '没有更多了',
|
||||
pageSize: 5,
|
||||
policyListDTOList: [],
|
||||
isAgreementShow: false,
|
||||
radio: ''
|
||||
radio: '',
|
||||
isLoading: false,
|
||||
isShow: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
NewItems() {
|
||||
var NewItems = []
|
||||
this.policyListDTOList.map(item => {
|
||||
if (item.riskName.search(this.searchName) != -1 || item.policyNo.search(this.searchName) != -1 || item.appntName.search(this.searchName) != -1) {
|
||||
// if (this.active === 'uncommit' && item.reInsuranceFlag === '3' && item.reInsuranceState === '0') {
|
||||
// NewItems.push(item)
|
||||
// } else if(this.active === 'commit' && item.reInsuranceFlag === '3' && (item.reInsuranceState === '1' || item.reInsuranceState === '2' || item.reInsuranceState === '3')){
|
||||
// NewItems.push(item)
|
||||
// }
|
||||
NewItems.push(item)
|
||||
}
|
||||
})
|
||||
console.log(NewItems, '======================NewItems===================')
|
||||
return NewItems
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let pageInfo = {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active,
|
||||
name: this.searchName,
|
||||
desensitizType: this.active === 'uncommit' ? 1 : 0
|
||||
}
|
||||
this.getOrderList(pageInfo)
|
||||
let data = {}
|
||||
this.getPolicyListAgent(data)
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
window.EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
@@ -142,70 +149,22 @@ export default {
|
||||
}
|
||||
},
|
||||
tabChange(name) {
|
||||
this.currentPage = 1
|
||||
this.active = name
|
||||
this.saleList = []
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
this.loadMore()
|
||||
},
|
||||
searchList() {
|
||||
this.currentPage = 1
|
||||
this.insureList = []
|
||||
;[this.loading, this.finished] = [true, false]
|
||||
// this.finishedText = '正在加载...'
|
||||
|
||||
let pageInfo = {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active,
|
||||
name: this.searchName,
|
||||
desensitizType: this.active === 'uncommit' ? 1 : 0
|
||||
}
|
||||
this.getOrderList(pageInfo)
|
||||
},
|
||||
//初始化保单列表
|
||||
getOrderList(pageInfo) {
|
||||
orderList(pageInfo).then(res => {
|
||||
getPolicyListAgent(pageInfo) {
|
||||
getPolicyListAgent(pageInfo).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.currentPage++
|
||||
if (!res.orderDTOPageInfo && res.orderDTOPageInfo !== {}) {
|
||||
this.finished = true
|
||||
this.loading = false
|
||||
this.finishedText = ''
|
||||
return
|
||||
}
|
||||
let list = res.orderDTOPageInfo.list
|
||||
if (list.length == 0) {
|
||||
this.finishedText = ''
|
||||
this.policyListDTOList = res.policyListDTOList
|
||||
console.log(this.policyListDTOList, '===================this.policyListDTOList====================')
|
||||
this.isShow = true
|
||||
} 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.insureList = this.insureList.concat(list)
|
||||
// if (this.insureList.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
|
||||
this.errMessage = res.resultMessage || '暂无保单'
|
||||
}
|
||||
})
|
||||
},
|
||||
insureAgain(order) {
|
||||
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
|
||||
CacheUtils.setLocItem('orderNo', '')
|
||||
setTimeout(() => {
|
||||
window.EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||
@@ -215,7 +174,7 @@ export default {
|
||||
this.isAgreementShow = true
|
||||
},
|
||||
uncommitInsureDetail(order) {
|
||||
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
|
||||
CacheUtils.setLocItem('orderNo', '')
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -227,7 +186,6 @@ export default {
|
||||
})
|
||||
},
|
||||
commitInsureDetail(order) {
|
||||
localStorage.setItem('orderNo', order.orderInfoDTO.orderNo)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -250,31 +208,12 @@ export default {
|
||||
})
|
||||
},
|
||||
onRefresh() {
|
||||
let pageInfo = {
|
||||
pageNum: 1,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active,
|
||||
name: '',
|
||||
desensitizType: this.active === 'uncommit' ? 1 : 0
|
||||
}
|
||||
this.isLoading = false
|
||||
this.insureList = []
|
||||
this.getOrderList(pageInfo)
|
||||
console.log(345435)
|
||||
this.policyListDTOList = []
|
||||
let data = {}
|
||||
this.getPolicyListAgent(data)
|
||||
},
|
||||
//分页用
|
||||
loadMore() {
|
||||
if (this.showFlag) {
|
||||
return
|
||||
}
|
||||
let pageInfo = {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
orderType: this.active,
|
||||
name: this.searchName,
|
||||
desensitizType: this.active === 'uncommit' ? 1 : 0
|
||||
}
|
||||
this.getOrderList(pageInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user