|
|
|
@ -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" |
|
|
|
|