From 6ee10988f9de7738b0b81de170d362a6a3efe646 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 7 May 2024 11:51:33 +0800 Subject: [PATCH] djseo --- .../patientRegister/PatientRegisterEdit.vue | 12 ++++++++++-- src/views/customerOrg/customerOrgGroup.vue | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index dcb8176..ad04205 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -1013,7 +1013,7 @@ export default { //选择单位 async changeCustomerOrgId(v) { - console.log('changeCustomerOrgId',v) + console.log('changeCustomerOrgId',v,this.form.customerOrgParentId) let customerOrgId = "" if (Array.isArray(v) && v.length > 0) { customerOrgId = v[v.length - 1] @@ -1021,12 +1021,20 @@ export default { } else { customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次) let pids = getTreePids(this.patientRegister.customerOrgTreeAll,"treeChildren","parentId","id",customerOrgId) - if(Array.isArray(pids) && pids.length > 0) this.form.customerOrgParentId = pids[1] + if(Array.isArray(pids) && pids.length > 0){ + if(pids.length == 1){ + this.form.customerOrgParentId = customerOrgId + }else{ + this.form.customerOrgParentId = pids[1] + } + } } this.preCustomerOrgId = customerOrgId // let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId) let customerOrgParentId = this.form.customerOrgParentId + + if (customerOrgParentId) { if (customerOrgParentId == this.dict.personOrgId) { this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" diff --git a/src/views/customerOrg/customerOrgGroup.vue b/src/views/customerOrg/customerOrgGroup.vue index 6c1b87f..e5d6656 100644 --- a/src/views/customerOrg/customerOrgGroup.vue +++ b/src/views/customerOrg/customerOrgGroup.vue @@ -201,7 +201,15 @@ export default { // 复制上一次分组 btnCopyPreGroup(){ + if (!this.customerOrgRegister.id) { + this.$message.warning("请选择体检次数"); + return; + } this.$message.warning({showClose:true,message:'开发中……'}) + + // 刷新体检次数的分组 + this.getCustomerOrgGroup(this.customerOrgRegister.id); + }, //刷新分组价格(供子组件调用)