增加20S禁止重复提交的操作逻辑

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-09-21 21:55:38 +08:00
parent 67c1609047
commit 0c5cb94008

View File

@@ -1040,129 +1040,145 @@ export default {
confirmButtonColor: '#E9332E',
})
.then(() => {
let data = {
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo,
productCode: JSON.parse(localStorage.mainRiskCodes)[0],
},
appntDTO: {
relationToInsured: that.saleInsuredPersonInfo.relationToAppnt,
},
mediaDTOS: that.list,
},
orderType: that.changeCard ? 'MEDIANEW_ORDER' : 'MEDIA_ORDER',
}
saveInformation(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
if (!this.changeCard) {
window.localStorage.setItem('accountInfomation-bank', that.bank)
window.localStorage.setItem('accountInformationRadio', that.radio)
window.localStorage.setItem('accountInformation-isPaymentSelf', JSON.stringify(that.checked))
window.localStorage.setItem('jumpFromSign', '')
}
window.localStorage.removeItem('imgfront')
window.localStorage.removeItem('imgBackPath')
window.localStorage.removeItem('imgfrontPath')
window.localStorage.removeItem('imgfrontInsured')
window.localStorage.removeItem('imgfrontInsuredPath')
window.localStorage.removeItem('imgBackInsuredPath')
window.localStorage.removeItem('bankCardUrl')
window.localStorage.removeItem('bankCardUrlPath')
window.localStorage.removeItem('bankCardUrlInsured')
window.localStorage.removeItem('bankCardUrlInsuredPath')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
pullRefresh: '1',
backToFirst: '1',
let nowTime = new Date().getTime()
let localTime = window.localStorage.getItem('serrorTime')
if(nowTime - localTime < 20000){
this.$toast('您操作过于频繁20s内请勿重复提交')
}else{
let data = {
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo,
productCode: JSON.parse(localStorage.mainRiskCodes)[0],
},
routerInfo: {
path: '/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
appntDTO: {
relationToInsured: that.saleInsuredPersonInfo.relationToAppnt,
},
})
} else {
if(res.resultMessage.indexOf('Engine')!= -1){
this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
this.thisdialogcontent = res.resultMessage.split('【Engine】')
this.thisdialogcontent.splice(0,1)
}else{
Dialog.confirm({
title: '提示',
message: res.resultMessage,
confirmButtonColor:'#FF0000',
showCancelButton:false
})
}
mediaDTOS: that.list,
},
orderType: that.changeCard ? 'MEDIANEW_ORDER' : 'MEDIA_ORDER',
}
})
saveInformation(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
if (!this.changeCard) {
window.localStorage.setItem('accountInfomation-bank', that.bank)
window.localStorage.setItem('accountInformationRadio', that.radio)
window.localStorage.setItem('accountInformation-isPaymentSelf', JSON.stringify(that.checked))
window.localStorage.setItem('jumpFromSign', '')
}
window.localStorage.removeItem('imgfront')
window.localStorage.removeItem('imgBackPath')
window.localStorage.removeItem('imgfrontPath')
window.localStorage.removeItem('imgfrontInsured')
window.localStorage.removeItem('imgfrontInsuredPath')
window.localStorage.removeItem('imgBackInsuredPath')
window.localStorage.removeItem('bankCardUrl')
window.localStorage.removeItem('bankCardUrlPath')
window.localStorage.removeItem('bankCardUrlInsured')
window.localStorage.removeItem('bankCardUrlInsuredPath')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
pullRefresh: '1',
backToFirst: '1',
},
routerInfo: {
path: '/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
},
})
} else {
let thisTime = new Date().getTime()
window.localStorage.setItem('serrorTime',thisTime)
if(res.resultMessage.indexOf('Engine')!= -1){
this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
this.thisdialogcontent = res.resultMessage.split('【Engine】')
this.thisdialogcontent.splice(0,1)
}else{
Dialog.confirm({
title: '提示',
message: res.resultMessage,
confirmButtonColor:'#FF0000',
showCancelButton:false
})
}
}
})
}
})
.catch(() => {
return
})
} else {
let data = {
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo,
productCode: JSON.parse(localStorage.mainRiskCodes)[0],
},
appntDTO: {
relationToInsured: that.saleInsuredPersonInfo.relationToAppnt,
},
mediaDTOS: that.list,
},
orderType: that.changeCard ? 'MEDIANEW_ORDER' : 'MEDIA_ORDER',
}
saveInformation(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
if (!this.changeCard) {
window.localStorage.setItem('accountInfomation-bank', that.bank)
window.localStorage.setItem('accountInformationRadio', that.radio)
window.localStorage.setItem('accountInformation-isPaymentSelf', JSON.stringify(that.checked))
window.localStorage.setItem('jumpFromSign', '')
}
window.localStorage.removeItem('imgfront')
window.localStorage.removeItem('imgBackPath')
window.localStorage.removeItem('imgfrontPath')
window.localStorage.removeItem('imgfrontInsured')
window.localStorage.removeItem('imgfrontInsuredPath')
window.localStorage.removeItem('imgBackInsuredPath')
window.localStorage.removeItem('bankCardUrl')
window.localStorage.removeItem('bankCardUrlPath')
window.localStorage.removeItem('bankCardUrlInsured')
window.localStorage.removeItem('bankCardUrlInsuredPath')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
pullRefresh: '1',
backToFirst: '1',
let nowTime = new Date().getTime()
let localTime = window.localStorage.getItem('serrorTime')
if(nowTime - localTime < 20000){
this.$toast('您操作过于频繁20s内请勿重复提交')
}else {
let data = {
orderDTO: {
orderInfoDTO: {
orderNo: this.$route.query.orderNo,
productCode: JSON.parse(localStorage.mainRiskCodes)[0],
},
routerInfo: {
path: '/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
appntDTO: {
relationToInsured: that.saleInsuredPersonInfo.relationToAppnt,
},
})
} else {
if(res.resultMessage.indexOf('Engine')!= -1){
this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
this.thisdialogcontent = res.resultMessage.split('【Engine】')
this.thisdialogcontent.splice(0,1)
}else{
Dialog.confirm({
title: '提示',
message: res.resultMessage,
confirmButtonColor:'#FF0000',
showCancelButton:false
})
}
mediaDTOS: that.list,
},
orderType: that.changeCard ? 'MEDIANEW_ORDER' : 'MEDIA_ORDER',
}
})
saveInformation(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
if (!this.changeCard) {
window.localStorage.setItem('accountInfomation-bank', that.bank)
window.localStorage.setItem('accountInformationRadio', that.radio)
window.localStorage.setItem('accountInformation-isPaymentSelf', JSON.stringify(that.checked))
window.localStorage.setItem('jumpFromSign', '')
}
window.localStorage.removeItem('imgfront')
window.localStorage.removeItem('imgBackPath')
window.localStorage.removeItem('imgfrontPath')
window.localStorage.removeItem('imgfrontInsured')
window.localStorage.removeItem('imgfrontInsuredPath')
window.localStorage.removeItem('imgBackInsuredPath')
window.localStorage.removeItem('bankCardUrl')
window.localStorage.removeItem('bankCardUrlPath')
window.localStorage.removeItem('bankCardUrlInsured')
window.localStorage.removeItem('bankCardUrlInsuredPath')
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
pullRefresh: '1',
backToFirst: '1',
},
routerInfo: {
path: '/sale/signatureConfirmation?orderNo=' + this.$route.query.orderNo,
},
})
} else {
let thisTime = new Date().getTime()
window.localStorage.setItem('serrorTime',thisTime)
if (res.resultMessage.indexOf('Engine') != -1) {
this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
this.thisdialogcontent = res.resultMessage.split('【Engine】')
this.thisdialogcontent.splice(0, 1)
} else {
Dialog.confirm({
title: '提示',
message: res.resultMessage,
confirmButtonColor: '#FF0000',
showCancelButton: false
})
}
}
})
}
}
},
},