feature/FCRS-954关于EAST2.0证件类型调整导致周边系统调整的需求

This commit is contained in:
liuhuiying
2025-06-23 14:35:19 +08:00
parent d6bbdae734
commit 0a3cb73fc8
5 changed files with 262 additions and 18 deletions

View File

@@ -995,6 +995,54 @@ export default {
text: '港澳台居民居住证'
}
],
//投保-被保险人证件类型(证件类型调整以及周边系统调整)
idTypeSpecial: [
{
id: 1,
text: '居民身份证'
},
{
id: 2,
text: '户口本'
},
// {
// id: 3,
// text: '出生证'
// },
{
id: 4,
text: '外国人护照'
},
{
id: 5,
text: '港澳居民来往内地通行证'
},
{
id: 6,
text: '台湾居民来往大陆通行证'
},
/* {
id: 7,
text: '其他',
disabled: true
}*/
{
id: 8,
text: '外国人永久居留身份证'
},
// {
// id: 9,
// text: '港澳台居民居住证'
// },
{
id: 11,
text: '港澳居民居住证'
},
{
id: 12,
text: '台湾居民居住证'
},
],
//投保人证件类型
insuredIdType: [
{
@@ -1037,6 +1085,56 @@ export default {
text: '港澳台居民居住证'
}
],
// 投保-投保人证件类型(证件类型调整以及周边系统调整)
insuredIdTypeSpecial: [
{
id: 1,
text: '居民身份证'
},
{
id: 2,
text: '户口本',
disabled: true
},
{
id: 3,
text: '出生证',
disabled: true
},
{
id: 4,
text: '护照'
},
{
id: 5,
text: '港澳居民来往内地通行证'
},
{
id: 6,
text: '台湾居民来往大陆通行证'
},
/* {
id: 7,
text: '其他',
disabled: true
}*/
{
id: 8,
text: '外国人永久居留身份证'
},
// {
// id: 9,
// text: '港澳台居民居住证'
// }
{
id: 11,
text: '港澳居民居住证'
},
{
id: 12,
text: '台湾居民居住证'
},
],
//投保人证件类型
insuredIdTypeSpecial: [
{

View File

@@ -29,7 +29,7 @@
:readonly="isInsured && nameLimit"
></customer-picker>
<van-field
:value="userInfo.idType | idToText('idType')"
:value="userInfo.idType | idToText('idTypeSpecial')"
v-validate="'required'"
readonly
required
@@ -368,6 +368,27 @@ export default {
}
},
methods: {
validateIdNoByType(idType, idNo) {
const trimmedIdNo = (idNo || '').trim();
if (!trimmedIdNo) return true; // 如果为空则不校验
const validations = {
'11': {
condition: !(trimmedIdNo.startsWith('810000') || trimmedIdNo.startsWith('820000')),
message: '港澳居民居住证号码须以810000或820000开头请确认'
},
'12': {
condition: !trimmedIdNo.startsWith('830000'),
message: '台湾居民居住证号码须以830000开头请确认'
}
};
const validation = validations[idType];
if (validation && validation.condition) {
this.$toast(validation.message);
this.userInfo.idNo = '';
return false;
}
return true;
},
setCustomerMarriage(marriageCode) {
for (let status of DataDictionary.marriage) {
if (status.id == marriageCode) {
@@ -512,7 +533,7 @@ export default {
if (pickerType == '1') {
this.columns = DataDictionary.nativeplace
} else if (pickerType == '2') {
this.columns = DataDictionary.idType
this.columns = DataDictionary.idTypeSpecial
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
@@ -1032,11 +1053,20 @@ export default {
if (this.userInfo.nativeplace != '4') {
return this.$toast('“证件类型”为“台湾居民来往大陆通行证”,“国籍”请选择“中国台湾”~')
}
} else if (this.userInfo.idType == '9') {
if (this.userInfo.nativeplace != '2' && this.userInfo.nativeplace != '3' && this.userInfo.nativeplace != '4') {
return this.$toast('证件类型”为“港澳居民居住证”,“国籍请选择中国香港”、“中国澳门”或“中国台湾”~')
} else if (this.userInfo.idType == '11') {
if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3) {
return this.$toast('"证件类型"为"港澳居民居住证""国籍"请选择"中国香港"、或"中国澳门"哦~')
}
} else if (this.userInfo.idType == '12') {
if (this.userInfo.nativeplace != 4) {
return this.$toast('"证件类型"为"台湾居民居住证""国籍"请选择"中国台湾"~')
}
}
// else if (this.userInfo.idType == '9') {
// if (this.userInfo.nativeplace != '2' && this.userInfo.nativeplace != '3' && this.userInfo.nativeplace != '4') {
// return this.$toast('“证件类型”为“港澳台居民居住证”,“国籍”请选择“中国香港”、“中国澳门”或“中国台湾”~')
// }
// }
// 通过国籍判断 证件是否符合要求
// 如果是国籍选择中国大陆
@@ -1046,7 +1076,9 @@ export default {
'1': true,
'5': true,
'6': true,
'9': true
// '9': true,
'11': true,
'12': true,
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
@@ -1293,6 +1325,9 @@ export default {
return `${year}-${month}-${day}`
},
getRelatedData(val, from) {
if(this.userInfo.idType == '11' || this.userInfo.idType == '12'){
this.validateIdNoByType(this.userInfo.idType,this.userInfo.idNo)
}
if (this.userInfo.idType != '1' && this.userInfo.idType != '2') {
return
}
@@ -1372,6 +1407,13 @@ export default {
} else {
this.homeName = this.userInfo.homeAddress = ''
}
},
'userInfo.idType': {
handler(newVal, oldVal) {
if(newVal && this.userInfo.idNo){
this.validateIdNoByType(newVal,this.userInfo.idNo)
}
}
}
},
beforeRouteLeave(to, from, next) {

View File

@@ -217,6 +217,12 @@ export default {
case '9':
res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break
case '11':
res.orderDTO.appntDTO.idType = '港澳居民居住证'
break
case '12':
res.orderDTO.appntDTO.idType = '台湾居民居住证'
break
}
this.appntDTO = res.orderDTO.appntDTO
res.orderDTO.insuredDTOs.map(item => {
@@ -282,6 +288,12 @@ export default {
case '9':
item.idType = '港澳台居民居住证'
break
case '11':
item.idType = '港澳居民居住证'
break
case '12':
item.idType = '台湾居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
@@ -337,6 +349,12 @@ export default {
case '9':
it.idType = '港澳台居民居住证'
break
case '11':
it.idType = '港澳居民居住证'
break
case '12':
it.idType = '台湾居民居住证'
break
}
switch (it.relationToInsured) {
case '1':

View File

@@ -28,7 +28,7 @@
@on-click="selectClick('1')"
></customer-picker>
<van-field
:value="userInfo.idType | idToText('insuredIdType')"
:value="userInfo.idType | idToText('insuredIdTypeSpecial')"
v-validate="'required'"
readonly
required
@@ -737,6 +737,28 @@
}
},
methods: {
validateIdNoByType(idType, idNo) {
const trimmedIdNo = (idNo || '').trim();
if (!trimmedIdNo) return true; // 如果为空则不校验
const validations = {
'11': {
condition: !(trimmedIdNo.startsWith('810000') || trimmedIdNo.startsWith('820000')),
message: '港澳居民居住证号码须以810000或820000开头请确认'
},
'12': {
condition: !trimmedIdNo.startsWith('830000'),
message: '台湾居民居住证号码须以830000开头请确认'
}
};
const validation = validations[idType];
if (validation && validation.condition) {
this.$toast(validation.message);
this.userInfo.idNo = '';
return false;
}
return true;
},
getDepartmentByProjectNo(){
let params = {
@@ -859,7 +881,7 @@
this.columns = DataDictionary.nativeplace
break
case '2':
this.columns = DataDictionary.insuredIdType
this.columns = DataDictionary.insuredIdTypeSpecial
break
// case '3':
// this.columns = DataDictionary.degree
@@ -1266,11 +1288,20 @@
if (this.userInfo.nativeplace != 4) {
return this.$toast('“证件类型”为“台湾居民来往大陆通行证”,“国籍”请选择“中国台湾”~')
}
} else if (this.userInfo.idType == '9') {
if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3 && this.userInfo.nativeplace != 4) {
return this.$toast('证件类型”为“港澳居民居住证”,“国籍请选择中国香港”、“中国澳门”或“中国台湾”~')
} else if (this.userInfo.idType == '11') {
if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3) {
return this.$toast('"证件类型"为"港澳居民居住证""国籍"请选择"中国香港"、或"中国澳门"哦~')
}
} else if (this.userInfo.idType == '12') {
if (this.userInfo.nativeplace != 4) {
return this.$toast('"证件类型"为"台湾居民居住证""国籍"请选择"中国台湾"~')
}
}
// else if (this.userInfo.idType == '9') {
// if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3 && this.userInfo.nativeplace != 4) {
// return this.$toast('"证件类型"为"港澳台居民居住证""国籍"请选择"中国香港"、"中国澳门"或"中国台湾"~')
// }
// }
// else if (this.userInfo.idType == '4' && this.userInfo.idNo.length < 3) {
// console.log('证件类型是护照')
// return this.$toast('护照须大于等于3个字符')
@@ -1349,7 +1380,9 @@
1: true,
5: true,
6: true,
9: true
// 9: true,
11: true,
12: true,
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
@@ -1592,6 +1625,9 @@
}
},
getRelatedData(val, source) {
if(this.userInfo.idType == '11' || this.userInfo.idType == '12'){
this.validateIdNoByType(this.userInfo.idType,this.userInfo.idNo)
}
if (this.userInfo.idType != '1') {
return
}
@@ -1642,6 +1678,13 @@
this.userInfo.marriage = status.id
}
}
},
'userInfo.idType': {
handler(newVal, oldVal) {
if(newVal && this.userInfo.idNo){
this.validateIdNoByType(newVal,this.userInfo.idNo)
}
}
}
}
}

View File

@@ -28,7 +28,7 @@
:readonly="isAppnt"
></customer-picker>
<van-field
:value="userInfo.idType | idToText('idType')"
:value="userInfo.idType | idToText('idTypeSpecial')"
v-validate="'required'"
readonly
required
@@ -823,6 +823,28 @@
this.areaLists = areaLists
},
methods: {
validateIdNoByType(idType, idNo) {
const trimmedIdNo = (idNo || '').trim();
if (!trimmedIdNo) return true; // 如果为空则不校验
const validations = {
'11': {
condition: !(trimmedIdNo.startsWith('810000') || trimmedIdNo.startsWith('820000')),
message: '港澳居民居住证号码须以810000或820000开头请确认'
},
'12': {
condition: !trimmedIdNo.startsWith('830000'),
message: '台湾居民居住证号码须以830000开头请确认'
}
};
const validation = validations[idType];
if (validation && validation.condition) {
this.$toast(validation.message);
this.userInfo.idNo = '';
return false;
}
return true;
},
isNewPeopleFlagTip(){
this.isNewPeopleFlagTipshow = true
},
@@ -902,7 +924,7 @@
if (pickerType == '1') {
this.columns = DataDictionary.nativeplace
} else if (pickerType == '2') {
this.columns = DataDictionary.idType
this.columns = DataDictionary.idTypeSpecial
} /*else if (pickerType == '3') {
this.columns = DataDictionary.degree
} */ else if (pickerType == '4') {
@@ -1618,11 +1640,20 @@
if (this.userInfo.nativeplace != 4) {
return this.$toast('“证件类型”为“台湾居民来往大陆通行证”,“国籍”请选择“中国台湾”~')
}
} else if (this.userInfo.idType == '9') {
if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3 && this.userInfo.nativeplace != 4) {
return this.$toast('“证件类型”为“港澳居民居住证”,“国籍”请选择“中国香港”、“中国澳门”或“中国台湾”~')
} else if (this.userInfo.idType == '11') {
if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3) {
return this.$toast('“证件类型”为“港澳居民居住证”,“国籍”请选择“中国香港”、“中国澳门”~')
}
} else if (this.userInfo.idType == '12') {
if (this.userInfo.nativeplace != 4) {
return this.$toast('“证件类型”为“台湾居民居住证”,“国籍”请选择“中国台湾”~')
}
}
// else if (this.userInfo.idType == '9') {
// if (this.userInfo.nativeplace != 2 && this.userInfo.nativeplace != 3 && this.userInfo.nativeplace != 4) {
// return this.$toast('“证件类型”为“港澳台居民居住证”,“国籍”请选择“中国香港”、“中国澳门”或“中国台湾”~')
// }
// }
// else if (this.userInfo.idType == '4' && this.userInfo.idNo.length < 3) {
// return this.$toast('护照须大于等于3个字符')
// //证件是港澳居民通行证
@@ -1670,7 +1701,9 @@
1: true,
5: true,
6: true,
9: true,
// 9: true,
11: true,
12: true,
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
@@ -1944,6 +1977,9 @@
}
},
getRelatedData(val, from) {
if(this.userInfo.idType == '11' || this.userInfo.idType == '12'){
this.validateIdNoByType(this.userInfo.idType,this.userInfo.idNo)
}
// debugger
if (this.userInfo.idType != '1' && this.userInfo.idType != '2') {
return
@@ -2068,6 +2104,13 @@
}
}
},
'userInfo.idType': {
handler(newVal, oldVal) {
if(newVal && this.userInfo.idNo){
this.validateIdNoByType(newVal,this.userInfo.idNo)
}
}
}
},
}
</script>