Commit bcf63e92 authored by 郭志伟's avatar 郭志伟

fix: userid

parent 1933546d
...@@ -270,9 +270,9 @@ export function isBankNumber(str) { ...@@ -270,9 +270,9 @@ export function isBankNumber(str) {
// 判断中文地址不能少于5个汉字,且必须有一位数字 // 判断中文地址不能少于5个汉字,且必须有一位数字
export function isChnAddress(str) { export function isChnAddress(str) {
const isNum = /[0-9]\d*/; const isNum = /[0-9]\d*/;
const isChinese_var = /[\u0391-\uFFE5]{5,}/g; const isChinese_var = /[\u4e00-\u9fa5]/g;
if (!isNull(str)) { if (!isNull(str)) {
return isNum.test(str) && isChinese_var.test(str); return isNum.test(str) && str.match(isChinese_var).length >= 5;
} }
return false; return false;
} }
......
...@@ -167,6 +167,7 @@ export default { ...@@ -167,6 +167,7 @@ export default {
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo; let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo; let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if ( if (
!relation &&
idNoWho && idNoWho &&
idNoWho.indexOf("************") === -1 && idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) && !isIdNo(idNoWho) &&
...@@ -309,15 +310,17 @@ export default { ...@@ -309,15 +310,17 @@ export default {
}, },
async calFee() { async calFee() {
let { price } = this.headerInfo; let { price } = this.headerInfo;
const { idNo, selfIdNo, relation, amountInsured, userInfoSecId } = this.formData; const { idNo, selfIdNo, relation, amountInsured, userInfoSecId, selfSecId } = this.formData;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo; let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let idWho = !relation || relation === "1" ? selfSecId : userInfoSecId;
idWho = idNoWho.indexOf("**") > -1 ? idWho || undefined : undefined;
if (!idNoWho || !amountInsured) return; if (!idNoWho || !amountInsured) return;
const _param = { const _param = {
productNo: this.goodId, productNo: this.goodId,
productUserInfo: { productUserInfo: {
insuredUserInfo: { insuredUserInfo: {
idNo: idNoWho, idNo: idNoWho,
userInfoSecId: userInfoSecId ? userInfoSecId : undefined userInfoSecId: idWho
}, },
productItem: { productItem: {
amountInsured amountInsured
......
...@@ -387,20 +387,23 @@ export default { ...@@ -387,20 +387,23 @@ export default {
this.infoReadonly = false; this.infoReadonly = false;
} }
this.relationList = userArray.length > 1 ? userArray : []; this.relationList = userArray.length > 1 ? userArray : [];
this.formData = { setTimeout(() => {
...this.formData, this.formData = {
...{ ...this.formData,
name, ...{
idNo, name,
userInfoSecId, idNo,
socialSecurity: userInfoSecId,
socialSecurity === "" || typeof socialSecurity === "undefined" socialSecurity:
? "" socialSecurity === "" || typeof socialSecurity === "undefined"
: socialSecurity ? ""
? "1" : socialSecurity
: "0" ? "1"
} : "0"
}; }
};
});
if (!this.formData.socialSecurity && this.radioOptions.medicalOptions) { if (!this.formData.socialSecurity && this.radioOptions.medicalOptions) {
try { try {
this.formData.socialSecurity = localStorage.get(this.autoSaveKey).socialSecurity; this.formData.socialSecurity = localStorage.get(this.autoSaveKey).socialSecurity;
...@@ -418,6 +421,12 @@ export default { ...@@ -418,6 +421,12 @@ export default {
this.familyList = res; this.familyList = res;
if (this.hasAutoSaveData(this.autoSaveKey)) { if (this.hasAutoSaveData(this.autoSaveKey)) {
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET); this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET);
if (this.formData.relation) {
const userArray = this.familyList.filter(
item => item.relation === +this.formData.relation
);
this.relationList = userArray.length > 1 ? userArray : [];
}
} else { } else {
let relation = this.formData.relation; let relation = this.formData.relation;
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation); (this.showAuthXyqb || this.mongoToken) && this.relationChange(relation);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment