建议书编辑状态删除主险添加提示语"编辑状态不可删除主险"

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-07-06 16:45:17 +08:00
parent 0bf3a2e6c8
commit e6be9aa6ef

View File

@@ -1908,6 +1908,9 @@ export default {
},
//删除所选产品
deleteRisk(index,data) {
if (this.chooseProducts[index].isMainRisk == 0 && this.$route.query.insuanceIdInfo) {
this.$toast('编辑状态不可删除主险')
} else {
Dialog.confirm({
title: '提示',
message: '确认删除该险种?',
@@ -1939,8 +1942,8 @@ export default {
}
})
localStorage.trialList = ''
}else{
currentGFRS_A0011 = this.chooseProducts[index].productCode == 'GFRS_A0011'?true:false //当前删除的是否是两全
} else {
currentGFRS_A0011 = this.chooseProducts[index].productCode == 'GFRS_A0011' ? true : false //当前删除的是否是两全
this.chooseProducts.splice(index, 1)
}
if (
@@ -1953,7 +1956,7 @@ export default {
) {
if (currentGFRS_A0011 && (JSON.stringify(this.chooseProducts).includes('GFRS_A0010') || JSON.stringify(this.chooseProducts).includes('GFRS_A0014'))) {
this.chooseProducts.forEach((item, index01) => {
if(item.productCode == 'GFRS_A0010' ||item.productCode == 'GFRS_A0014'){
if (item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0014') {
this.chooseProducts.splice(index01, 1)
}
})
@@ -2001,9 +2004,9 @@ export default {
}
if (localStorage.oldAddRiskCodes && JSON.parse(localStorage.oldAddRiskCodes)) {
let thismyoldAddRiskCodes = JSON.parse(localStorage.oldAddRiskCodes)
thismyoldAddRiskCodes.forEach((item,index0)=>{
if(item == data.productCode){
thismyoldAddRiskCodes.splice(index0,1)
thismyoldAddRiskCodes.forEach((item, index0) => {
if (item == data.productCode) {
thismyoldAddRiskCodes.splice(index0, 1)
}
})
localStorage.oldAddRiskCodes = JSON.stringify(thismyoldAddRiskCodes)
@@ -2011,7 +2014,9 @@ export default {
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
this.getTrial()
})
.catch(() => {})
.catch(() => {
})
}
},
//试算
async getTrial() {