[FIX]【保全】增加校验:1.续期账号变更-若客户下无保单则不跳转详情页面;2.受益人变更-校验受益人身份证件有效期

This commit is contained in:
yuweiqi
2020-06-13 18:47:25 +08:00
parent 152a66adc8
commit 2d206e95df
4 changed files with 60 additions and 8 deletions

View File

@@ -38,6 +38,10 @@ export default new Vuex.Store({
//更新 保全-保全受理号
updatePreserveEodrApplyNo(state, val) {
state.eodrApplyNo = val
},
//更新 保全-续期账户变更保单信息
updatePcPolicyInfo(state, val) {
state.pcList = val
}
},
getters: {
@@ -55,6 +59,9 @@ export default new Vuex.Store({
},
getPreserveEodrApplyNo(state) {
return state.eodrApplyNo
},
getPcPolicyInfo(state) {
return state.pcList
}
}
})

View File

@@ -148,9 +148,21 @@ export default {
},
//下一步
nextStep() {
let checkIdExpDate = true, //校验证件有效期是否过期 true-已过期 false-未过期
overdueName = ''
if (this.type == 2 && this.beneficiariesNew.length < 1) {
this.$toast('受益人列表不能为空')
return
} else if (this.beneficiariesNew.length > 0) {
checkIdExpDate = this.beneficiariesNew.some(i => {
overdueName = i.name
return Date.parse(i.idExpDate) < Date.parse(new Date())
})
} else {
checkIdExpDate = false
}
if (checkIdExpDate) {
return this.$toast(`受益人${overdueName}的身份证件已过期`)
}
let beneRatio = 0
this.beneficiariesNew.forEach(item => {

View File

@@ -31,7 +31,7 @@
<script>
import { Search, DropdownMenu, DropdownItem } from 'vant'
import { customerList } from '@/api/ebiz/preserve/preserve'
import { customerList, pcPolicyInfo } from '@/api/ebiz/preserve/preserve'
export default {
name: 'Search',
// props: {
@@ -46,11 +46,7 @@ export default {
list: [], // 客户列表
selected: 0, // 搜索类型 0 客户姓名 1 证件号码 2 手机号
isSearch: true, // 是否显示搜索按钮
options: [
{ text: '客户姓名', value: 0 },
{ text: '证件号码', value: 1 },
{ text: '手机号', value: 2 }
],
options: [{ text: '客户姓名', value: 0 }, { text: '证件号码', value: 1 }, { text: '手机号', value: 2 }],
entry: '', // 入口
surrenderType: ''
}
@@ -106,6 +102,9 @@ export default {
},
// 点击客户
handleClick(params) {
if (this.checkValidity(params) == '0') {
return this.$toast('当前客户的身份证件已过期')
}
this.entry = this.$route.query.entry
let url = ''
switch (this.entry) {
@@ -127,8 +126,31 @@ export default {
default:
break
}
localStorage.setItem('preserve-customerInfo', JSON.stringify(params))
this.jupmTo(url)
if (this.entry == 'PC') {
pcPolicyInfo({
customerNo: params.customerNo,
edorType: 'PC', //续期账号变更
idno: params.idNo,
mobile: params.customerMobile,
name: params.customerName
}).then(
res => {
if (res.result == '0') {
this.$store.commit('updatePcPolicyInfo', res.content)
localStorage.setItem('preserve-customerInfo', JSON.stringify(params))
this.jupmTo(url)
} else {
this.$toast(res.resultMessage)
}
},
error => {
console.log(error)
}
)
} else {
localStorage.setItem('preserve-customerInfo', JSON.stringify(params))
this.jupmTo(url)
}
},
// 页面跳转
jupmTo(url) {
@@ -141,6 +163,12 @@ export default {
path: url
}
})
},
//判断证件有效期 0-已过期 1-未过期
checkValidity(params) {
if (Date.parse(params.idEndDate) < Date.parse(new Date())) {
return '0'
} else return '1'
}
}
}

View File

@@ -137,6 +137,7 @@ export default {
}
},
created() {
/*
this.getPolicyList({
customerNo: this.customerInfo.customerNo,
edorType: 'PC', //续期账号变更
@@ -144,6 +145,8 @@ export default {
mobile: this.customerInfo.customerMobile,
name: this.customerInfo.customerName
})
*/
this.list = this.$store.getters.getPcPolicyInfo
this.getBank()
},
mounted() {
@@ -266,6 +269,7 @@ export default {
}
})
},
/*
//获取保单详情
async getPolicyList(data) {
pcPolicyInfo(data).then(res => {
@@ -276,6 +280,7 @@ export default {
}
})
},
*/
// 获取银行卡列表
async getBank() {
let data = {