From 93bf943bcb9add6b8f7d4df15ade9b26ca7406d9 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 8 Mar 2024 14:39:43 +0800 Subject: [PATCH] doctor --- src/components/doctorCheck/ButtonList.vue | 126 +++++++++--------- src/components/doctorCheck/CheckItemList.vue | 2 +- .../doctorCheck/RegisterCheckList.vue | 8 +- .../patientRegister/PatientRegisterEdit.vue | 47 ++++--- .../PatientRegisterForChoose.vue | 2 +- .../patientRegister/PatientRegisterItem.vue | 4 +- .../patientRegister/PatientRegisterList.vue | 3 +- src/store/index.js | 1 + 8 files changed, 105 insertions(+), 88 deletions(-) diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index 5f241c5..bdbddd5 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -16,10 +16,10 @@ 删除人员
- 上一人 + 上一人
- 下一人 + 下一人
{ + this.refreshPatientRegisterList++ + }, 20); if(this.nextTodialogVisible) this.btnAddPr() }, @@ -285,12 +290,12 @@ export default { // debugger if(this.medicalStartDate){ //this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')}) - this.doctorCheck.prBase.id = '' - this.dialogVisible = true - this.patientRegister.photo = '' - setTimeout(() =>{ - this.editTimes++ - },100) + this.dataTransOpts.tableS.patient_register.id = '' + this.dialogWin.PatientRegisterEdit = true + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 20); + this.patientRegister.photo = '' }else{ this.nextTodialogVisible = true this.dialogVisibleSetStartDate = true @@ -299,11 +304,11 @@ export default { //人员删除 btnDelPr(){ - if(!this.doctorCheck.prBase.id){ + if(!this.dataTransOpts.tableS.patient_register.id){ this.$message.warning("未选中要删除的人员记录") return } - let id = this.doctorCheck.prBase.id + let id = this.dataTransOpts.tableS.patient_register.id this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { confirmButtonText: "是", cancelButtonText: "否", @@ -314,9 +319,12 @@ export default { }).then((res) => { if(res.code != -1){ console.log("操作成功!") - this.doctorCheckPrBaseInit(); - let lfind = arrayExistObj(this.medicalStartDateDatas,'id',id) - if(lfind > -1) this.medicalStartDateDatas.splice(lfind,1) + // this.doctorCheckPrBaseInit(); + this.dataTransOpts.tableS.patient_register.id = '' + setTimeout(() => { + // 刷新当前界面数据 及 上一人/下一人 列表数据 + this.closeDialogWinPatientRegisterEdit() + }, 20); } }).catch((err) => { if (err == "cancel") { @@ -330,7 +338,7 @@ export default { //人员编辑 btnEditPr() { - if(!this.doctorCheck.prBase.id){ + if(!this.dataTransOpts.tableS.patient_register.id){ this.$message.warning("未选中要编辑的人员记录") return } @@ -339,12 +347,20 @@ export default { // this.formData = Object.assign({},this.doctorCheck.prBase) //console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList) - this.dialogVisible = true; - this.editTimes++; //触发表单窗口,数据更新 + this.dialogWin.PatientRegisterEdit = true; + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 20); }, - // 上一人 - btnPrev(){ + // 关闭人员登记 新增/编辑 时,刷新当前界面数据 及 上一人/下一人 列表数据 + closeDialogWinPatientRegisterEdit(){ + this.dataTransOpts.refresh.patient_register.S++ // 刷新当前界面数据 + this.refreshPatientRegisterList++ // 刷新 上一人/下一人 列表 + }, + + // 上(下)一人 step 1 表示下一人, -1 表示上一人 + btnStep(step){ if(!this.medicalStartDate){ this.$message.warning("请先设置体检日期") return @@ -354,53 +370,33 @@ export default { return } - let lfind = -1 - if(this.doctorCheck.prBase.id){ - lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) - if(lfind == 0){ - this.$message.warning("已是第一个人") - return - } - if(lfind > - 1) lfind-- - } + let lstep = -1 + if(step && step > 0) lstep = 1 - // 未选中,未找到,显示第一人 - if(lfind < 0){ - if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ - this.findPR(this.medicalStartDateDatas[0]) + let lfind = -1 + let patientRegisterId = this.dataTransOpts.tableS.patient_register.id + if(patientRegisterId){ + lfind = arrayExistObj(this.medicalStartDateDatas,'id',patientRegisterId) + if(lfind > - 1){ + if(lstep < 0 && lfind == 0){ + this.$message.warning("已是第一个人") + return + }else if(lstep > 0 && lfind == this.medicalStartDateDatas.length - 1){ + this.$message.warning("已是最后一人") + return + } + lfind = Number(lfind) + Number(lstep) + this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[lfind].id } }else{ if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ - this.findPR(this.medicalStartDateDatas[lfind]) + this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[0].id } } - - }, - - // 下一人 - btnNext(){ - if(!this.medicalStartDate){ - this.$message.warning("请先设置体检日期") - return - } - if(this.medicalStartDateDatas.length == 0) { - this.$message.warning("当前设置的体检日期,无体检人员信息") - return - } - let lfind = 0 - if(this.doctorCheck.prBase.id){ - lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) - lfind++ - } - - // 未选中,未找到,显示第一人 - if(this.medicalStartDateDatas.length > lfind){ - this.findPR(this.medicalStartDateDatas[lfind]) - }else{ - this.$message.warning("已是最后一人") - } - + setTimeout(() => { + this.dataTransOpts.refresh.patient_register.S++ + }, 20); }, //查询找到相关信息处理 @@ -590,10 +586,10 @@ export default { }, // 设置体检日期 - "medicalStartDate":{ - immediate:true, + "refreshPatientRegisterList":{ + // immediate:true, handler(newVal,oldVal){ - if(newVal){ + if(newVal != oldVal){ let body = { customerOrgs: [ { diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index cdc815c..4e2e0fb 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -278,7 +278,7 @@ export default { checkItemList(RegisterCheckId) { // this.doctorCheck.checkItem = null if(!RegisterCheckId){ - this.doctorCheck.checkItemList = [] + this.doctorCheck.checkItemList = [] return } console.log( diff --git a/src/components/doctorCheck/RegisterCheckList.vue b/src/components/doctorCheck/RegisterCheckList.vue index 894f1e9..174b664 100644 --- a/src/components/doctorCheck/RegisterCheckList.vue +++ b/src/components/doctorCheck/RegisterCheckList.vue @@ -32,7 +32,7 @@ export default { components: {}, data() { return { - + }; }, @@ -74,7 +74,11 @@ export default { if(!patientRegisterId){ this.doctorCheck.RegisterCheckList = [] this.doctorCheck.RegisterCheckId = '' - // this.doctorCheck.RegisterCheckEdit = {} + this.dataTransOpts.tableS.register_check.id = '' + setTimeout(() => { + this.dataTransOpts.refresh.register_check.S++ + this.dataTransOpts.refresh.register_check_item.M++ + }, 20); return } console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index fd3c773..517b3e5 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -6,16 +6,15 @@
-
+ :disabled="(form.completeFlag == '3' || isDoctor != '1') ? true:false" size="small"> @@ -490,7 +489,8 @@ export default { Charge, PatientRegisterEditQuery }, - props: ['patientRegisterId','editTimes','refreshRegister'], + // isDoctor: '0:标准人员登记/1:医生诊台登记(可修改单位)' + props: ['isDoctor','patientRegisterId','editTimes','refreshRegister'], data() { return { pagePriv:{ @@ -783,6 +783,8 @@ export default { objCopy(this.formInit, this.form); this.form.organizationUnitId = this.peisid; //体检中收 this.form.customerOrgId = this.patientRegister.query.customerOrgId //体检单位 + this.form.customerOrgParentId = await this.getParentCustomerOrgId(this.form.customerOrgId) //体检父单位 + }else{ // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`) let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`) @@ -799,16 +801,30 @@ export default { //选择单位 async changeCustomerOrgId(v){ let customerOrgParentId = await this.getParentCustomerOrgId(v) + if(customerOrgParentId){ - if (customerOrgParentId == this.dict.personOrgId) { - this.form.customerOrgRegisterId = null - this.form.customerOrgGroupId = null - this.patientRegister.customerOrgGroup = [] - }else{ - this.form.medicalPackageId = null - //获取单位体检次数 - this.getCustomerOrgRegisterList(customerOrgParentId) - } + // 父单位被更改时,需要触发 修改 分组/套餐 + if(this.form.customerOrgParentId != customerOrgParentId){ + if (customerOrgParentId == this.dict.personOrgId) { + this.form.customerOrgRegisterId = null + this.form.customerOrgGroupId = null + this.form.medicalPackageId = null + this.patientRegister.customerOrgGroup = [] + }else{ + this.form.customerOrgRegisterId = null + this.form.customerOrgGroupId = null + this.form.medicalPackageId = null + //获取单位体检次数 + this.getCustomerOrgRegisterList(customerOrgParentId) + } + + if(this.form.customerOrgParentId == this.dict.personOrgId){ + this.changeMedicalPackageId() + }else{ + this.changeCustomerOrgGroupId() + } + this.form.customerOrgParentId = customerOrgParentId + } } }, @@ -1201,7 +1217,7 @@ export default { delete body.isLockBox; delete body.photo; - if(this.form.registerManType == 'customer') delete body.medicalStartDate; + // if(this.form.registerManType == 'customer') delete body.medicalStartDate; if(this.form.id) delete body.medicalStartDate; setNull(body, this.defaultNull); @@ -1676,8 +1692,7 @@ export default { }, //监听事件 - watch: { - + watch: { //人员ID未切换换时 也可以强制刷新数据 "dataTransOpts.refresh.patient_register.S":{ immediate:true, diff --git a/src/components/patientRegister/PatientRegisterForChoose.vue b/src/components/patientRegister/PatientRegisterForChoose.vue index f7a2865..d8f0f2b 100644 --- a/src/components/patientRegister/PatientRegisterForChoose.vue +++ b/src/components/patientRegister/PatientRegisterForChoose.vue @@ -216,7 +216,7 @@ export default { this.$message.warning('未找到相关信息') }else if(res.data.items.length == 1){ this.rowDblclick(res.data.items[0]) - }else{ + }else{ this.patientRegisters = res.data.items } } diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index aa4f238..47d8e44 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -39,7 +39,7 @@
- 全添加 + 全添加
@@ -47,7 +47,7 @@
- 全移除 + 全移除
-