mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 17:56:43 +08:00
建议书编辑状态删除主险添加提示语"编辑状态不可删除主险"
This commit is contained in:
@@ -1908,110 +1908,115 @@ export default {
|
|||||||
},
|
},
|
||||||
//删除所选产品
|
//删除所选产品
|
||||||
deleteRisk(index,data) {
|
deleteRisk(index,data) {
|
||||||
Dialog.confirm({
|
if (this.chooseProducts[index].isMainRisk == 0 && this.$route.query.insuanceIdInfo) {
|
||||||
title: '提示',
|
this.$toast('编辑状态不可删除主险')
|
||||||
message: '确认删除该险种?',
|
} else {
|
||||||
cancelButtonColor: '#E9332E',
|
Dialog.confirm({
|
||||||
confirmButtonColor: '#FFFFFF',
|
title: '提示',
|
||||||
className: 'dialog-delete'
|
message: '确认删除该险种?',
|
||||||
})
|
cancelButtonColor: '#E9332E',
|
||||||
.then(() => {
|
confirmButtonColor: '#FFFFFF',
|
||||||
let currentGFRS_A0011
|
className: 'dialog-delete'
|
||||||
if (this.chooseProducts[index].isMainRisk == 0) {
|
})
|
||||||
this.chooseProducts = []
|
.then(() => {
|
||||||
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
let currentGFRS_A0011
|
||||||
let thismyurl = ''
|
if (this.chooseProducts[index].isMainRisk == 0) {
|
||||||
if (this.$route.query.orderNo) {
|
this.chooseProducts = []
|
||||||
thismyurl = '/?orderNo=' + this.$route.query.orderNo
|
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
||||||
} else if (this.$route.query.proposalOrderNo) {
|
let thismyurl = ''
|
||||||
thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo
|
if (this.$route.query.orderNo) {
|
||||||
}
|
thismyurl = '/?orderNo=' + this.$route.query.orderNo
|
||||||
this.$jump({
|
} else if (this.$route.query.proposalOrderNo) {
|
||||||
flag: 'goBack',
|
thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo
|
||||||
extra: {
|
}
|
||||||
refresh: '1',
|
this.$jump({
|
||||||
index: '-2'
|
flag: 'goBack',
|
||||||
},
|
extra: {
|
||||||
routerInfo: {
|
refresh: '1',
|
||||||
type: 2,
|
index: '-2'
|
||||||
index: -2,
|
},
|
||||||
path: '/common/selectedProduct' + thismyurl
|
routerInfo: {
|
||||||
}
|
type: 2,
|
||||||
})
|
index: -2,
|
||||||
localStorage.trialList = ''
|
path: '/common/selectedProduct' + thismyurl
|
||||||
}else{
|
}
|
||||||
currentGFRS_A0011 = this.chooseProducts[index].productCode == 'GFRS_A0011'?true:false //当前删除的是否是两全
|
})
|
||||||
this.chooseProducts.splice(index, 1)
|
localStorage.trialList = ''
|
||||||
}
|
} else {
|
||||||
if (
|
currentGFRS_A0011 = this.chooseProducts[index].productCode == 'GFRS_A0011' ? true : false //当前删除的是否是两全
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' ||
|
this.chooseProducts.splice(index, 1)
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' ||
|
}
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0060' ||
|
if (
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0035' ||
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' ||
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0038' ||
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' ||
|
||||||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0040'
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0060' ||
|
||||||
) {
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0035' ||
|
||||||
if (currentGFRS_A0011 && (JSON.stringify(this.chooseProducts).includes('GFRS_A0010') || JSON.stringify(this.chooseProducts).includes('GFRS_A0014'))) {
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0038' ||
|
||||||
this.chooseProducts.forEach((item, index01) => {
|
this.chooseProducts[0].mainRiskCode == 'GFRS_M0040'
|
||||||
if(item.productCode == 'GFRS_A0010' ||item.productCode == 'GFRS_A0014'){
|
) {
|
||||||
this.chooseProducts.splice(index01, 1)
|
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') {
|
||||||
// Dialog.alert({
|
this.chooseProducts.splice(index01, 1)
|
||||||
// title: '提示',
|
}
|
||||||
// message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
|
})
|
||||||
// }).then(() => {
|
// Dialog.alert({
|
||||||
// })
|
// title: '提示',
|
||||||
}
|
// message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
|
||||||
|
// }).then(() => {
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// let risks = this.chooseProducts
|
// let risks = this.chooseProducts
|
||||||
// let longRisks = []
|
// let longRisks = []
|
||||||
// //拿到长险附加险数组
|
// //拿到长险附加险数组
|
||||||
// for (let i = 1; i < risks.length; i++) {
|
// for (let i = 1; i < risks.length; i++) {
|
||||||
// for (let j = 0; j < risks[i].calFactorLst.length; j++) {
|
// for (let j = 0; j < risks[i].calFactorLst.length; j++) {
|
||||||
// if (risks[i].calFactorLst[j].code === 'insuYear') {
|
// if (risks[i].calFactorLst[j].code === 'insuYear') {
|
||||||
// if (
|
// if (
|
||||||
// ((risks[i].calFactorLst[j].insuYearFlag == 'Y' && risks[i].calFactorLst[j].insuYear > 1) || risks[i].calFactorLst[j].insuYearFlag == 'A') &&
|
// ((risks[i].calFactorLst[j].insuYearFlag == 'Y' && risks[i].calFactorLst[j].insuYear > 1) || risks[i].calFactorLst[j].insuYearFlag == 'A') &&
|
||||||
// risks[i].productCode != 'GFRS_A0010'
|
// risks[i].productCode != 'GFRS_A0010'
|
||||||
// ) {
|
// ) {
|
||||||
// longRisks.push(risks[i].productCode)
|
// longRisks.push(risks[i].productCode)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// if (
|
// if (
|
||||||
// (this.chooseProducts.length == 2 && this.chooseProducts[1].productCode == 'GFRS_A0010') ||
|
// (this.chooseProducts.length == 2 && this.chooseProducts[1].productCode == 'GFRS_A0010') ||
|
||||||
// (this.chooseProducts.length == 3 &&
|
// (this.chooseProducts.length == 3 &&
|
||||||
// JSON.stringify(this.chooseProducts).includes('GFRS_A0010') &&
|
// JSON.stringify(this.chooseProducts).includes('GFRS_A0010') &&
|
||||||
// JSON.stringify(this.chooseProducts).includes('GFRS_A0009')) ||
|
// JSON.stringify(this.chooseProducts).includes('GFRS_A0009')) ||
|
||||||
// (longRisks.length <= 0 && this.chooseProducts.length > 1)
|
// (longRisks.length <= 0 && this.chooseProducts.length > 1)
|
||||||
// ) {
|
// ) {
|
||||||
// Dialog.alert({
|
// Dialog.alert({
|
||||||
// title: '提示',
|
// title: '提示',
|
||||||
// message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
|
// message: '当前未投保其他长险附加险,将删除该险种重新选择附加险!'
|
||||||
// }).then(() => {
|
// }).then(() => {
|
||||||
// this.chooseProducts.splice(1, 1)
|
// this.chooseProducts.splice(1, 1)
|
||||||
// localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
// localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
||||||
// this.getTrial()
|
// this.getTrial()
|
||||||
// })
|
// })
|
||||||
// // this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
// // this.$toast('当前未投保其他长险附加险,请删除该险种重新选择附加险!')
|
||||||
// // this.nextStepFlag = true
|
// // this.nextStepFlag = true
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if (localStorage.oldAddRiskCodes && JSON.parse(localStorage.oldAddRiskCodes)) {
|
if (localStorage.oldAddRiskCodes && JSON.parse(localStorage.oldAddRiskCodes)) {
|
||||||
let thismyoldAddRiskCodes = JSON.parse(localStorage.oldAddRiskCodes)
|
let thismyoldAddRiskCodes = JSON.parse(localStorage.oldAddRiskCodes)
|
||||||
thismyoldAddRiskCodes.forEach((item,index0)=>{
|
thismyoldAddRiskCodes.forEach((item, index0) => {
|
||||||
if(item == data.productCode){
|
if (item == data.productCode) {
|
||||||
thismyoldAddRiskCodes.splice(index0,1)
|
thismyoldAddRiskCodes.splice(index0, 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
localStorage.oldAddRiskCodes = JSON.stringify(thismyoldAddRiskCodes)
|
localStorage.oldAddRiskCodes = JSON.stringify(thismyoldAddRiskCodes)
|
||||||
}
|
}
|
||||||
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
||||||
this.getTrial()
|
this.getTrial()
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//试算
|
//试算
|
||||||
async getTrial() {
|
async getTrial() {
|
||||||
|
|||||||
Reference in New Issue
Block a user