建议书功能与生产代码冲突解决

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-06-26 11:29:31 +08:00
parent 5fe2e64afc
commit 2330fbd769
4 changed files with 18 additions and 22 deletions

View File

@@ -559,16 +559,14 @@ export default {
) )
if (insuredDTO) { if (insuredDTO) {
let insuredPersonAge1 = utilsAge.getAge(insuredDTO.birthday, new Date()) let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
let insuredPersonAge2 = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
CacheUtils.setLocItem('saleInsuredPersonInfo', CacheUtils.setLocItem('saleInsuredPersonInfo',
JSON.stringify({ JSON.stringify({
birthday: insuredDTO.birthday, birthday: insuredDTO.birthday,
name: insuredDTO.name, name: insuredDTO.name,
sex: insuredDTO.sex, sex: insuredDTO.sex,
idType: insuredDTO.idType, idType: insuredDTO.idType,
age: insuredPersonAge1, insuredAge: insuredPersonAge,
insuredAge: insuredPersonAge2,
// marriage: insuredDTO.marriage, // marriage: insuredDTO.marriage,
relationToAppnt: insuredDTO.relationToAppnt, relationToAppnt: insuredDTO.relationToAppnt,
medical: insuredDTO.medical, medical: insuredDTO.medical,

View File

@@ -310,9 +310,9 @@ export default {
if(this.appntDTO.name == name){ if(this.appntDTO.name == name){
this.appntDTO.name = '' this.appntDTO.name = ''
} }
let ageRule = /^[a-zA-Z\.\s\u4e00-\u9fa5]{2,120}$/ let ageRule = /^[a-zA-Z0-9\.\s\u4e00-\u9fa5]{2,120}$/
if (this.appntDTO.name && !ageRule.test(this.appntDTO.name)) { if (this.appntDTO.name && !ageRule.test(this.appntDTO.name)) {
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字或者英文') return Toast.fail('姓名长度为2-120个字符之内只能输入汉字、数字或者英文')
} }
this.appntDTO.age = String(this.appntDTO.age) this.appntDTO.age = String(this.appntDTO.age)
this.$validator.validate().then(valid => { this.$validator.validate().then(valid => {

View File

@@ -177,15 +177,13 @@ export default {
s.addtion = [] s.addtion = []
} }
}) })
let thisTempData = []
v.riskDTOLst.forEach(s => { v.riskDTOLst.forEach(s => {
if(s.isMainRisk == '1'){ if(s.isMainRisk == '1'){
thisTempData.push(s) v.riskDTOLst.forEach(x => {
if(x.riskCode == s.mainRiskCode){
x.addtion.push(s)
} }
}) })
v.riskDTOLst.forEach(s => {
if(s.isMainRisk == '0'){
s.addtion = JSON.parse(JSON.stringify(thisTempData))
} }
}) })
} }

View File

@@ -339,9 +339,9 @@ export default {
let localSex = this.insured.sex let localSex = this.insured.sex
let relation = this.localInfo.relationToAppnt let relation = this.localInfo.relationToAppnt
let resultSex = checkSex(cacheSex, localSex, relation) let resultSex = checkSex(cacheSex, localSex, relation)
let ageRule = /^[a-zA-Z\.\s\u4e00-\u9fa5]{2,120}$/ let ageRule = /^[a-zA-Z0-9\.\s\u4e00-\u9fa5]{2,120}$/
if (this.insured.name && !ageRule.test(this.insured.name)) { if (this.insured.name && !ageRule.test(this.insured.name)) {
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字或者英文') return Toast.fail('姓名长度为2-120个字符之内只能输入汉字、数字或者英文')
} }
if (!resultSex) { if (!resultSex) {
return Toast.fail('被保险人性别有误') return Toast.fail('被保险人性别有误')