mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-06 17:46:44 +08:00
重新投保页面修改,模拟原接口数据
This commit is contained in:
@@ -1,44 +1,102 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-search v-model="value" placeholder="请输入保单号/投保人姓名/被保险人姓名" />
|
||||
<van-search v-model="searchName" placeholder="请输入保单号/投保人姓名/被保险人姓名" @change="searchList" @keyup.enter="searchList" />
|
||||
<van-sticky>
|
||||
<van-tabs v-model="active">
|
||||
<van-tab title="未提交" />
|
||||
<van-tab title="已提交" />
|
||||
<van-tabs v-model="active" @change="tabChange">
|
||||
<van-tab name="uncommit" title="未提交" />
|
||||
<van-tab name="commit" title="已提交" />
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<div class="container">
|
||||
<component :is="is" />
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<van-list ref="uncommitted" v-model="loading" :finished="finished" :finished-text="finishedText" @load="loadMore">
|
||||
<div v-if="insureList.length>0">
|
||||
<Order v-for="(order,index) in insureList" :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>
|
||||
</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>
|
||||
</p>
|
||||
<p class="name">
|
||||
<van-tag plain color="#999999">状态</van-tag>
|
||||
<span class="ml5 span">{{ order.stateName }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<template #btns>
|
||||
<van-button size="small" round type="danger" @click="insureAgainDetail" plain>查看详情</van-button>
|
||||
<van-button class="ml10" size="small" round type="danger" @click="insureAgain">重新投保</van-button>
|
||||
</template>
|
||||
</Order>
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<van-popup v-model="isAgreementShow" position="right" :style="{ height: '100vh', width: '100vw' }">
|
||||
<ReadingAgreement :needTime="false">
|
||||
<h3 class="p10">重新投保声明提示</h3>
|
||||
<p class="pl10">尊敬的xxx先生/女士:</p>
|
||||
<p class="p10">
|
||||
您好!您于保单生效日期投保的保单号为保单号码的国富人寿国富民惠医疗保险(2020版)保单即将到期(到期日期详见保单,以下简称旧保单),为保护您的权益,即日起至<期满日后第60天>期间,您可以选择重新投保国富人寿国富民惠医疗保险(2020版),本次申请投保的国富人寿国富民惠医疗保险(2020版)保单以下简称新保单,请您仔细阅读以下内容:
|
||||
1.国富人寿国富民惠医疗保险(2020版)合同保险期间为一年,到期后需要重新投保。
|
||||
2.本次重新投保,我们将按照国富人寿国富民惠医疗保险(2020版)费率表中的“在上一保险期间届满后60日内申请重新投保时对应的费率”计算保费。
|
||||
3.若本次重新投保成功,新保单免除等待期。
|
||||
4.本次重新投保仅限于无其他补充告知的情况,若您有其他补充告知,您的条件不符合本重新投保流程。请您联系保单服务专员,通过新增投保单进行投保申请。
|
||||
5.若您于旧保单满期前申请重新投保,且于满期前成功支付保险费,则新保单在旧保单保险期满日对应日的次日零时生效,旧保单在保险期满日24时终止。若您于旧保单满期后60天(包含)内重新投保申请,且成功支付保险费,则新保单于支付次日零时生效,旧保单在保险期满日24时终止。
|
||||
6.若您未在旧保单满期后60天(包含)内申请重新投保,则您的重新投保资格将被取消。后续您可再次申请投保,但新单不再与旧保单关联,需重新计算等待期。具体详情,可咨询保单服务专员。
|
||||
</p>
|
||||
<template #action>
|
||||
<van-radio-group class="m10" v-model="radio">
|
||||
<van-radio :name="false">
|
||||
<span style="font-size: 14px;">本人已阅读、知晓本投保声明内容,同意重新投保</span>
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
<div class="btns">
|
||||
<van-button type="danger" :disabled="radio" block @click="nextStep">下一步</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</ReadingAgreement>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Search, Sticky } from 'vant'
|
||||
import Committed from './Committed'
|
||||
import Uncommitted from './Uncommitted'
|
||||
|
||||
import { Search, Sticky, PullRefresh, list, Tag, Popup, Radio, RadioGroup } from 'vant'
|
||||
import { orderList } 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'
|
||||
export default {
|
||||
name: 'InsureAgain',
|
||||
components: {
|
||||
Committed,
|
||||
Uncommitted,
|
||||
components: {
|
||||
Order,
|
||||
ReadingAgreement,
|
||||
[Search.name]: Search,
|
||||
[Sticky.name]: Sticky
|
||||
[Sticky.name]: Sticky,
|
||||
[PullRefresh.name]: PullRefresh,
|
||||
[list.name]: list,
|
||||
[Tag.name]: Tag,
|
||||
[Popup.name]: Popup,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is() {
|
||||
if (this.active === 0) {
|
||||
return 'Uncommitted'
|
||||
} else {
|
||||
return 'Committed'
|
||||
}
|
||||
searchName: '', //搜索名
|
||||
active: 'uncommit',
|
||||
insureList: [],
|
||||
currentPage: 1, //当前页数
|
||||
isLoading: false,
|
||||
loading: false,
|
||||
finished: false,
|
||||
finishedText: '没有更多了',
|
||||
pageSize: 5,
|
||||
isAgreementShow: false,
|
||||
radio: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -53,10 +111,140 @@ export default {
|
||||
methods: {
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
this.$jump({
|
||||
flag: 'service'
|
||||
})
|
||||
if (this.isAgreementShow) {
|
||||
this.isAgreementShow = false
|
||||
setTimeout(() => {
|
||||
window.EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1'
|
||||
})
|
||||
}, 100)
|
||||
} else {
|
||||
this.$jump({
|
||||
flag: 'service'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
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 => {
|
||||
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 = ''
|
||||
} 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
|
||||
}
|
||||
})
|
||||
},
|
||||
insureAgain() {
|
||||
setTimeout(() => {
|
||||
window.EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
this.isAgreementShow = true
|
||||
},
|
||||
insureAgainDetail(order) {
|
||||
localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/insureAgain/insureAgainDetail'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/insureAgain/insureAgainDetail'
|
||||
}
|
||||
})
|
||||
},
|
||||
nextStep() {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/insureAgain/progress`,
|
||||
forbidSwipeBack: '1',
|
||||
needRefresh: '1'
|
||||
},
|
||||
routerInfo: { path: `/insureAgain/progress` }
|
||||
})
|
||||
},
|
||||
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)
|
||||
},
|
||||
//分页用
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user