mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 18:36:43 +08:00
[FIX]【保全】增加校验:1.续期账号变更-若客户下无保单则不跳转详情页面;2.受益人变更-校验受益人身份证件有效期
This commit is contained in:
@@ -38,6 +38,10 @@ export default new Vuex.Store({
|
|||||||
//更新 保全-保全受理号
|
//更新 保全-保全受理号
|
||||||
updatePreserveEodrApplyNo(state, val) {
|
updatePreserveEodrApplyNo(state, val) {
|
||||||
state.eodrApplyNo = val
|
state.eodrApplyNo = val
|
||||||
|
},
|
||||||
|
//更新 保全-续期账户变更保单信息
|
||||||
|
updatePcPolicyInfo(state, val) {
|
||||||
|
state.pcList = val
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
@@ -55,6 +59,9 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
getPreserveEodrApplyNo(state) {
|
getPreserveEodrApplyNo(state) {
|
||||||
return state.eodrApplyNo
|
return state.eodrApplyNo
|
||||||
|
},
|
||||||
|
getPcPolicyInfo(state) {
|
||||||
|
return state.pcList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -148,9 +148,21 @@ export default {
|
|||||||
},
|
},
|
||||||
//下一步
|
//下一步
|
||||||
nextStep() {
|
nextStep() {
|
||||||
|
let checkIdExpDate = true, //校验证件有效期是否过期 true-已过期 false-未过期
|
||||||
|
overdueName = ''
|
||||||
if (this.type == 2 && this.beneficiariesNew.length < 1) {
|
if (this.type == 2 && this.beneficiariesNew.length < 1) {
|
||||||
this.$toast('受益人列表不能为空')
|
this.$toast('受益人列表不能为空')
|
||||||
return
|
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
|
let beneRatio = 0
|
||||||
this.beneficiariesNew.forEach(item => {
|
this.beneficiariesNew.forEach(item => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Search, DropdownMenu, DropdownItem } from 'vant'
|
import { Search, DropdownMenu, DropdownItem } from 'vant'
|
||||||
import { customerList } from '@/api/ebiz/preserve/preserve'
|
import { customerList, pcPolicyInfo } from '@/api/ebiz/preserve/preserve'
|
||||||
export default {
|
export default {
|
||||||
name: 'Search',
|
name: 'Search',
|
||||||
// props: {
|
// props: {
|
||||||
@@ -46,11 +46,7 @@ export default {
|
|||||||
list: [], // 客户列表
|
list: [], // 客户列表
|
||||||
selected: 0, // 搜索类型 0 客户姓名 1 证件号码 2 手机号
|
selected: 0, // 搜索类型 0 客户姓名 1 证件号码 2 手机号
|
||||||
isSearch: true, // 是否显示搜索按钮
|
isSearch: true, // 是否显示搜索按钮
|
||||||
options: [
|
options: [{ text: '客户姓名', value: 0 }, { text: '证件号码', value: 1 }, { text: '手机号', value: 2 }],
|
||||||
{ text: '客户姓名', value: 0 },
|
|
||||||
{ text: '证件号码', value: 1 },
|
|
||||||
{ text: '手机号', value: 2 }
|
|
||||||
],
|
|
||||||
entry: '', // 入口
|
entry: '', // 入口
|
||||||
surrenderType: ''
|
surrenderType: ''
|
||||||
}
|
}
|
||||||
@@ -106,6 +102,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击客户
|
// 点击客户
|
||||||
handleClick(params) {
|
handleClick(params) {
|
||||||
|
if (this.checkValidity(params) == '0') {
|
||||||
|
return this.$toast('当前客户的身份证件已过期')
|
||||||
|
}
|
||||||
this.entry = this.$route.query.entry
|
this.entry = this.$route.query.entry
|
||||||
let url = ''
|
let url = ''
|
||||||
switch (this.entry) {
|
switch (this.entry) {
|
||||||
@@ -127,8 +126,31 @@ export default {
|
|||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
localStorage.setItem('preserve-customerInfo', JSON.stringify(params))
|
if (this.entry == 'PC') {
|
||||||
this.jupmTo(url)
|
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) {
|
jupmTo(url) {
|
||||||
@@ -141,6 +163,12 @@ export default {
|
|||||||
path: url
|
path: url
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
//判断证件有效期 0-已过期 1-未过期
|
||||||
|
checkValidity(params) {
|
||||||
|
if (Date.parse(params.idEndDate) < Date.parse(new Date())) {
|
||||||
|
return '0'
|
||||||
|
} else return '1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
/*
|
||||||
this.getPolicyList({
|
this.getPolicyList({
|
||||||
customerNo: this.customerInfo.customerNo,
|
customerNo: this.customerInfo.customerNo,
|
||||||
edorType: 'PC', //续期账号变更
|
edorType: 'PC', //续期账号变更
|
||||||
@@ -144,6 +145,8 @@ export default {
|
|||||||
mobile: this.customerInfo.customerMobile,
|
mobile: this.customerInfo.customerMobile,
|
||||||
name: this.customerInfo.customerName
|
name: this.customerInfo.customerName
|
||||||
})
|
})
|
||||||
|
*/
|
||||||
|
this.list = this.$store.getters.getPcPolicyInfo
|
||||||
this.getBank()
|
this.getBank()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -266,6 +269,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
//获取保单详情
|
//获取保单详情
|
||||||
async getPolicyList(data) {
|
async getPolicyList(data) {
|
||||||
pcPolicyInfo(data).then(res => {
|
pcPolicyInfo(data).then(res => {
|
||||||
@@ -276,6 +280,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
// 获取银行卡列表
|
// 获取银行卡列表
|
||||||
async getBank() {
|
async getBank() {
|
||||||
let data = {
|
let data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user