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

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

@@ -438,11 +438,11 @@ export default {
}
},
/**
@desc只能输入整数
@param
value 操作数值
max 最大值
**/
@desc只能输入整数
@param
value 操作数值
max 最大值
**/
intOnly(value, max = Infinity, min = 0) {
if (value) {
let regular0 = /^0{1,}$/
@@ -480,8 +480,8 @@ export default {
var json = {}
for (var i = 0, len = query.length; i < len; i++) {
var key = query[i].split('=')[0],
index = query[i].indexOf('='),
value = query[i].substr(index + 1)
index = query[i].indexOf('='),
value = query[i].substr(index + 1)
json[key] = value
}
@@ -559,16 +559,14 @@ export default {
)
if (insuredDTO) {
let insuredPersonAge1 = utilsAge.getAge(insuredDTO.birthday, new Date())
let insuredPersonAge2 = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
CacheUtils.setLocItem('saleInsuredPersonInfo',
JSON.stringify({
birthday: insuredDTO.birthday,
name: insuredDTO.name,
sex: insuredDTO.sex,
idType: insuredDTO.idType,
age: insuredPersonAge1,
insuredAge: insuredPersonAge2,
insuredAge: insuredPersonAge,
// marriage: insuredDTO.marriage,
relationToAppnt: insuredDTO.relationToAppnt,
medical: insuredDTO.medical,

View File

@@ -310,9 +310,9 @@ export default {
if(this.appntDTO.name == 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)) {
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字或者英文')
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字、数字或者英文')
}
this.appntDTO.age = String(this.appntDTO.age)
this.$validator.validate().then(valid => {

View File

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

View File

@@ -339,9 +339,9 @@ export default {
let localSex = this.insured.sex
let relation = this.localInfo.relationToAppnt
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)) {
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字或者英文')
return Toast.fail('姓名长度为2-120个字符之内只能输入汉字、数字或者英文')
}
if (!resultSex) {
return Toast.fail('被保险人性别有误')