diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index e4a7a2d..d3fdb6f 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -1144,6 +1144,7 @@ export default { //根据姓名,身份证号 查询档案信息,用于判断人员多次体检 Query(param) { + this.patientChoosed = {} // 清空之前的选择 //编辑的时候不查重 if (this.form.id || !param) return; @@ -1177,24 +1178,27 @@ export default { //确定选择人员 choosePatient() { - if (!this.patientChoosed) { - alert("请选中人员档案信息"); + if (!this.patientChoosed) { return; } this.dialogVisible = false; + this.form.patientId = this.patientChoosed.id; - this.form.patientName = this.patientChoosed.displayName; - this.form.sexId = this.patientChoosed.sexId; - this.form.maritalStatusId = this.patientChoosed.maritalStatusId; - this.form.birthDate = new Date(this.patientChoosed.birthDate); - this.form.nationId = this.patientChoosed.nationId; - this.form.idNo = this.patientChoosed.idNo; - this.form.telephone = this.patientChoosed.telephone; - this.form.mobileTelephone = this.patientChoosed.mobileTelephone; this.form.patientNo = this.patientChoosed.patientNo; this.form.medicalTimes = this.patientChoosed.medicalTimes + 1; + // 考滤录入有值,档案却无值 + if(this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName; + if(this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId; + if(this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate); + if(this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId; + if(this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo; + + if(!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId; + if(!this.form.telephone) this.form.telephone = this.patientChoosed.telephone; + if(!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone; + if (this.form.birthDate) { this.form.age = birthdayToAge(this.form.birthDate) @@ -1202,10 +1206,9 @@ export default { if (this.form.idNo) { let ret = parseID(this.form.idNo) - - if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday) - if (!this.form.age) this.form.age = ret.age - if (!this.form.sexId) this.form.age = ret.sex + this.form.birthDate = new Date(ret.birthday) + this.form.age = ret.age + this.form.sexId = ret.sex } }, diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js index 2058b61..12f9142 100644 --- a/src/utlis/proFunc.js +++ b/src/utlis/proFunc.js @@ -238,9 +238,9 @@ function parsIcCardtoLocal(idNos, dictSex, dictNation) { // console.log(lfind,local.Sex) if (lfind > -1) local.sexId = dictSex[lfind].id; - lfind = arrayExistObj(dictNation, 'displayName', local.Nation + '族') + lfind = arrayExistObj(dictNation, 'displayName', local.Nation) // + '族' // console.log(lfind,local.Nation) - if (lfind > -1) local.nationId = dictNation[lfind].nationId; + if (lfind > -1) local.nationId = dictNation[lfind].id; local.birthDate = new Date(local.Birthday) local.age = birthdayToAge(local.Birthday) diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index dd39564..506b822 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -90,6 +90,9 @@ export default { }; }, created() { + if (this.$peisAPI) { + this.$peisAPI.lazyLoadMenuContrl(); // 加载窗口按钮 dll + } this.LocalConfigInit = deepCopy(this.LocalConfig) let LocalConfig = window.localStorage.getItem("LocalConfig") || null try {