Merge branch '新增保险' into dev

This commit is contained in:
lihaoda
2020-02-14 23:54:37 +08:00

View File

@@ -383,27 +383,30 @@ export default {
}
},
created() {
//如果是从编辑进来的
if (this.$route.query.edit) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
console.log(res)
if (res.result == 0) {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
console.log(res)
if (res.result == 0) {
//如果是从编辑进来的
if (this.$route.query.edit) {
//投被保人关系
this.relationToAppnt = res.orderDTO.insuredDTOs[0].relationToAppnt
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
//计算是否大于等于65岁
const birthday = res.orderDTO.insuredDTOs[0].birthday
const ageDiff = new Date().getTime() - new Date(birthday).getTime()
const age = ageDiff/1000/60/60/24/365
this.isBigger65 = age >= 65
this.$utils.intLocalStorage(res)
} else {
this.$toast(res.resultMessage)
}
})
}
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
//计算是否大于等于65岁
const birthday = res.orderDTO.insuredDTOs[0].birthday
const ageDiff = new Date().getTime() - new Date(birthday).getTime()
const age = ageDiff/1000/60/60/24/365
this.isBigger65 = age >= 65
} else {
this.$toast(res.resultMessage)
}
})
let that = this
// 获取投被保人是否同一个人