diff --git a/src/components/doctorCheck/PatientRegisterBase.vue b/src/components/doctorCheck/PatientRegisterBase.vue index 8da4bf4..67aac63 100644 --- a/src/components/doctorCheck/PatientRegisterBase.vue +++ b/src/components/doctorCheck/PatientRegisterBase.vue @@ -65,10 +65,11 @@ + - + @@ -103,8 +104,8 @@ export default { nationId: '', //民族 mobileTelephone: '', //手机 }, - prBaseInit:{}, - PatientRegisterForChooseParams: {}, // 参数 + prBaseInit: {}, + PatientRegisterList: [], // 参数 }; }, @@ -132,7 +133,7 @@ export default { afterFind(rd) { // console.log('rd,this.doctorCheck.prBase',rd.id,this.doctorCheck.prBase.id) this.prBase = deepCopy(this.prBaseInit) - objCopy(rd,this.prBase) + objCopy(rd, this.prBase) this.doctorCheck.prBase = Object.assign({}, this.doctorCheck.prBase, rd) //待优化 setTimeout(() => { //触发检查医生诊台相关刷新 @@ -144,7 +145,7 @@ export default { }, 10); //显示照片 - this.patientRegister.photo = rd.photo + this.patientRegister.photo = rd.photo || '' }, @@ -157,12 +158,11 @@ export default { isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) } // console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) - this.dataTransOpts.tableS.patient_register = { id: '' } + this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo } postapi('/api/app/patientregister/getpatientregisterorpatient', body) .then((res) => { if (res.code != -1) { - - this.dataTransOpts.tableS.patient_register = deepCopy(res.data) + if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data) } }) .finally(() => { @@ -179,11 +179,11 @@ export default { isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) } // console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) - this.dataTransOpts.tableS.patient_register = { id: '' } + this.dataTransOpts.tableS.patient_register = { id: '', patientNo } postapi('/api/app/patientregister/getpatientregisterorpatient', body) .then((res) => { if (res.code != -1) { - this.dataTransOpts.tableS.patient_register = deepCopy(res.data) + if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data) } }) .finally(() => { @@ -197,16 +197,35 @@ export default { patientName: v, isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) } - this.PatientRegisterForChooseParams = body // 传参 - this.dialogWin.PatientRegisterForChoose = true // 弹窗 - setTimeout(() => { - //触发检查医生诊台相关刷新 - this.dataTransOpts.refresh.register_check.M++ - //触发总检医生诊台相关刷新 - this.dataTransOpts.refresh.sumDoctor.M++ - this.dataTransOpts.refresh.sum_diagnosis.M++ - }, 20); + this.dataTransOpts.tableS.patient_register = { id: '', patientName: v } + // + postapi('/api/app/patientregister/getlistinfilter', body) + .then(res => { + if (res.code != -1) { + if (res.data.items.length == 1) { + this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 10); + // this.getPatientRegister(res.data.items[0].id) + } else if (res.data.items.length > 1) { + this.PatientRegisterList = res.data.items + this.dialogWin.PatientRegisterForChoose = true // 弹窗 + this.dataTransOpts.plus.PatientRegisterForChoose++ + } else { + this.afterFind(this.dataTransOpts.tableS.patient_register) + } + } + }) + // setTimeout(() => { + // //触发检查医生诊台相关刷新 + // this.dataTransOpts.refresh.register_check.M++ + + // //触发总检医生诊台相关刷新 + // this.dataTransOpts.refresh.sumDoctor.M++ + // this.dataTransOpts.refresh.sum_diagnosis.M++ + // }, 20); }, //根据ID 获取 人员信息 @@ -290,7 +309,7 @@ export default { handler(newVal, oldVal) { console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`); this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id) - this.dataTransOpts.refresh.register_check.M++ + // this.dataTransOpts.refresh.register_check.M++ } }, }, diff --git a/src/components/patientRegister/PatientRegisterEditQuery.vue b/src/components/patientRegister/PatientRegisterEditQuery.vue index 55dbe20..4b6f782 100644 --- a/src/components/patientRegister/PatientRegisterEditQuery.vue +++ b/src/components/patientRegister/PatientRegisterEditQuery.vue @@ -26,7 +26,7 @@ - + @@ -52,7 +52,7 @@ export default { patientName: '', tel: '' }, - PatientRegisterForChooseParams:{}, + PatientRegisterList:[], }; }, @@ -134,14 +134,14 @@ export default { body = { phone:this.query.tel } - this.getlistinfilter(url2,body); + this.getlistinfilter(body); break; case 'patientName': if(!this.query.patientName) return; body = { patientName:this.query.patientName } - this.getlistinfilter(url2,body); + this.getlistinfilter(body); break; default: return; @@ -159,7 +159,7 @@ export default { this.dataTransOpts.tableS.patient_register.id = res.data.id setTimeout(() => { this.dataTransOpts.refresh.patient_register.S++ - }, 20); + }, 10); // this.patientRegister.patientRegisterId = res.data.id // this.patientRegister.photo = res.data.photo // this.getPatientRegisterAbs(res.data.id) @@ -170,35 +170,30 @@ export default { }, //按手机号或姓名查找客户信息 - getlistinfilter(url,body){ - // url = '/api/app/patientregister/getlistinfilter' - // postapi(url, body) - // .then((res) => { - // if (res.code != -1) { - // if(res.data.items.length == 0){ - // this.$message.info("未找到相关信息") - // }else if(res.data.items.length == 1){ - // objCopy(res.data.items[0], this.form) - // this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id - // setTimeout(() => { - // this.dataTransOpts.refresh.register_check_asbitem.M++ - // }, 20); - // // objCopy(res.data.items[0], this.patientRegister.patientRegisterRd) - // // this.patientRegister.patientRegisterId = res.data.items[0].id - // // this.patientRegister.photo = res.data.items[0].photo - // // this.getPatientRegisterAbs(res.data.items[0].id) - // }else{ - // //显示列表,供选择 - // this.patientRegisters = res.data.items - // this.registerVisible = true - // } - // } - // }); - this.PatientRegisterForChooseParams = body - this.dialogWin.PatientRegisterForChoose = true - setTimeout(() => { - this.dataTransOpts.refresh.patient_register.M++ - }, 10); + getlistinfilter(body){ + + postapi('/api/app/patientregister/getlistinfilter', body) + .then(res => { + if (res.code != -1) { + if (res.data.items.length == 1) { + this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 10); + // this.getPatientRegister(res.data.items[0].id) + } else if (res.data.items.length > 1) { + this.PatientRegisterList = res.data.items + this.dialogWin.PatientRegisterForChoose = true // 弹窗 + this.dataTransOpts.plus.PatientRegisterForChoose++ + } else { + this.dataTransOpts.tableS.patient_register.id = '' + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 10); + } + } + }) + }, }, diff --git a/src/components/patientRegister/PatientRegisterForChoose.vue b/src/components/patientRegister/PatientRegisterForChoose.vue index 48c7b68..f4bdf40 100644 --- a/src/components/patientRegister/PatientRegisterForChoose.vue +++ b/src/components/patientRegister/PatientRegisterForChoose.vue @@ -183,7 +183,7 @@ export default { //挂载完成 mounted() { - + this.getPatientregisterList() }, computed: { ...mapState([ @@ -200,28 +200,7 @@ export default { moment,dddw,deepCopy, getPatientregisterList(){ - this.patientRegisterId = "" //先清除选择的体检人员ID - // params = { - // patientName:v, - // isFilterPreRegistration:'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) - // } - postapi('/api/app/patientregister/getlistinfilter', this.params).then(res => { - if (res.code != -1) { - if(res.data.items.length == 0){ - this.dataTransOpts.tableS.patient_register.id = '' - setTimeout(() => { - this.dataTransOpts.refresh.patient_register.S++ - }, 20); - this.dialogWin.PatientRegisterForChoose = false - this.$message.warning('未找到相关信息') - }else if(res.data.items.length == 1){ - this.rowDblclick(res.data.items[0]) - }else{ - this.patientRegisters = res.data.items - } - } - }) - + this.patientRegisters = this.params }, @@ -244,7 +223,7 @@ export default { this.dataTransOpts.tableS.patient_register.id = this.patientRegisterId setTimeout(() => { this.dataTransOpts.refresh.patient_register.S++ - }, 20); + }, 10); this.dialogWin.PatientRegisterForChoose = false }, @@ -253,12 +232,12 @@ export default { //监听事件 watch: { // 刷新体检人员登记列表 - "dataTransOpts.refresh.patient_register.M":{ - immediate: true, // 立即执行 + "dataTransOpts.plus.PatientRegisterForChoose":{ + // immediate: true, // 立即执行 // deep: true, // 深度监听复杂类型内变化 handler(newVal,oldVal){ console.log(`watch: 刷新体检人员列表 newVal: ${newVal} oldVal:${oldVal}`) - this.getPatientregisterList() + if(newVal != oldVal) this.getPatientregisterList() } }, }, diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 2cfde6d..de53a7e 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -685,17 +685,7 @@ export default { // 刷新 register_check_asbitem 表记录 if (lfind > -1) { - this.dataTransOpts.refresh.register_check_asbitem.M++ - // setTimeout(() => { - // this.$refs['info'].setCurrentRow(currentRow) - // this.setForm(currentRow) - // // this.patientRegister.query.customerOrgParentId = this.tableData[lfind].customerOrgParentId; - // this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 - // this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 - // // this.getCustomerOrgGroup(this.tableData[lfind].customerOrgParentId); - // this.dict.asbItem = [...this.dict.asbItemAll]; - // this.getPatientRegisterAbs(currentRow.id); - // }, 100) + this.dataTransOpts.refresh.register_check_asbitem.M++ } }, diff --git a/src/store/index.js b/src/store/index.js index d1a87f9..106b2c3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -360,6 +360,7 @@ export default new Vuex.Store({ clearPatientRegisterQuery: 0, //清空人员登记界面查询条件 PatientRegisterEditGroupBatch: 0, //刷新批量调整分组窗口 PatientRegisterEditItemBatch: 0, //刷新批量调整项目窗口 + PatientRegisterForChoose:0, // 体检人员查询窗口 } },