diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 64f4bd0..425f9b2 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -315,7 +315,7 @@ + :src="peoplePhoto">
加载中...
@@ -376,19 +376,23 @@
查找:  条码号 - +
档案号 - +
姓名 - +
手机号 - +
@@ -492,6 +496,13 @@ export default { brushTimes: 0, payTypeFlag: '', peisid: null, + peoplePhoto: '', + query: { + patientRegisterNo: '', + patientNo: '', + patientName: '', + tel: '' + }, form: { id: "", //id patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... @@ -584,14 +595,46 @@ export default { objCopy(this.formInitData, this.form); this.initBox(); this.getCustomerOrgRegisterList() + this.getPeoplePhoto(this.patientRegister.photo) }, computed: { ...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]), + }, methods: { - photoParse, + //快速查找个人数据 + quickQuery(type) { + let url = '/api/app/patient-register/patient-register-or-patient?SType=' + switch (type) { + case 'patientNo': + url += `2&PatientNo=${this.query.patientNo}` + break; + case 'patientRegisterNo': + url += `1&PatientRegisterNo=${this.query.patientRegisterNo}` + break; + case 'tel': + url += `3&Phone=${this.query.tel}` + break; + case 'patientName': + url += `4&PatientName=${this.query.patientName}` + break; + default: + break; + } + + console.log(url) + getapi(url) + .then((res) => { + if (res.code != -1) { + console.log('按条码号查个人数据', res.data) + objCopy(res.data, this.form) + } + }); + }, + + //读取身份证信息 peopleIcCard() { this.$peisAPI.peopleIcCard().then(res => { //console.log('peopleIcCard',res) @@ -791,7 +834,7 @@ export default { //赋值 let body = deepCopy(this.form); - if(this.form.birthDate){ + if (this.form.birthDate) { body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD") } @@ -854,7 +897,7 @@ export default { if (res.code == 1) { if (msgTip) this.$message.success("更新 操作成功"); //一般读身份证照片时,会出现这种情况 - if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); + if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo); this.patientRegister.query.times++; //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存 } @@ -953,7 +996,9 @@ export default { }) }, - + getPeoplePhoto(photo) { + this.peoplePhoto = photoParse(photo) + }, // 打印指引单(isPreview) async guidePrint(ReportCode, isPreview) { @@ -1180,9 +1225,8 @@ export default { //拍照触发 "patientRegister.photo"(newVal, oldVal) { //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal) - if (newVal != oldVal) { - //console.log('newVal:',newVal) - this.form.photo = newVal; + if (newVal && newVal != oldVal) { + this.getPeoplePhoto(newVal) } }, }, diff --git a/src/store/index.js b/src/store/index.js index 3f0d455..c99ea4a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -245,7 +245,9 @@ export default new Vuex.Store({ }, //读取身份证信息 }, }, - getters: {}, + getters: { + + }, mutations: { //同步更改状态