开门红产品试算增加标识,增加cvaliDate截止日期

This commit is contained in:
liyuetong
2021-07-14 14:34:50 +08:00
parent af85db0524
commit 66d7724a4f
4 changed files with 91 additions and 15 deletions

View File

@@ -393,7 +393,7 @@ export default {
activeRadio: '1',
activeType: localStorage.getItem('active_type'),
cvalidateFlag : false,
cvalidateStr:'',
cvalidateStr:'', //活动生效日
chooseProducts: [],
productIndex: '',
calFactorIndex: '',
@@ -450,7 +450,7 @@ export default {
})
},
//初始化数据
init() {
async init() {
// 获取是否从建议书过来的
let that = this
this.isFrom = window.localStorage.isFrom
@@ -462,8 +462,17 @@ export default {
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
}
this.cvalidateFlag = (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
// this.cvalidateFlag = (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
this.cvalidateFlag = this.activeType && this.isFrom != 'proposal'
// this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
//GFRS-2552【需求】关于金掌桂投保流程增设指定生效日按钮的申请
const orderNo = this.$CacheUtils.getLocItem('orderNo')
let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo })
if(this.isFrom != 'proposal'){
//活动生效日期
this.cvalidateStr = detailPromise.orderDTO.orderInfoDTO.cvaliDate
}
//构建提交数据、渲染险种
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
this.chooseProducts.forEach((item, index) => {
@@ -1441,6 +1450,7 @@ export default {
},
//试算
async getTrial() {
let that = this
this.nextStepFlag = true
this.$toast.clear()
this.$toast.loading({
@@ -1449,10 +1459,12 @@ export default {
})
this.setRemitRisk()
let params = this.getParams()
// 开门红产品试算增加标识
if (this.activeType == 'KMH' && this.isFrom != 'proposal') {
// 开门红产品试算增加标识,活动产品试算增加标识
if (this.activeType && this.isFrom != 'proposal') {
for (let product of params.trialInfos) {
product.isKmh = '1'
//GFRS-2552【需求】关于金掌桂投保流程增设指定生效日按钮的申请
product.cvaliDate = that.cvalidateStr
}
}
let resultData = await trial(params)