|
|
|
@ -1017,26 +1017,23 @@ export default { |
|
|
|
//选择单位 |
|
|
|
async changeCustomerOrgId(v) { |
|
|
|
console.log('changeCustomerOrgId', v, this.form.customerOrgParentId) |
|
|
|
let customerOrgId = "" |
|
|
|
let customerOrgId = "", customerOrgParentId = "" |
|
|
|
if (Array.isArray(v) && v.length > 0) { |
|
|
|
customerOrgId = v[v.length - 1] |
|
|
|
this.form.customerOrgParentId = v[0] |
|
|
|
customerOrgParentId = v[0] |
|
|
|
} else { |
|
|
|
customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次) |
|
|
|
let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId) |
|
|
|
if (Array.isArray(pids) && pids.length > 0) { |
|
|
|
if (pids.length == 1) { |
|
|
|
this.form.customerOrgParentId = customerOrgId |
|
|
|
customerOrgParentId = customerOrgId |
|
|
|
} else { |
|
|
|
this.form.customerOrgParentId = pids[1] |
|
|
|
customerOrgParentId = pids[1] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.preCustomerOrgId = customerOrgId |
|
|
|
// let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId) |
|
|
|
let customerOrgParentId = this.form.customerOrgParentId |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (customerOrgParentId) { |
|
|
|
if (customerOrgParentId == this.dict.personOrgId) { |
|
|
|
@ -1046,7 +1043,8 @@ export default { |
|
|
|
this.getCustomerOrgRegisterList(customerOrgParentId) |
|
|
|
} |
|
|
|
|
|
|
|
// 需要触发 修改 分组/套餐 |
|
|
|
// 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组 |
|
|
|
if (customerOrgParentId != this.form.customerOrgParentId) { |
|
|
|
this.form.customerOrgGroupId = null |
|
|
|
this.form.medicalPackageId = null |
|
|
|
// 清除套餐分组标识 |
|
|
|
@ -1063,7 +1061,7 @@ export default { |
|
|
|
} else { |
|
|
|
this.changeCustomerOrgGroupId() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|