Browse Source

djseo

master
pengjun 2 years ago
parent
commit
50f244ebdc
  1. 16
      src/components/patientRegister/PatientRegisterEdit.vue

16
src/components/patientRegister/PatientRegisterEdit.vue

@ -1017,26 +1017,23 @@ export default {
// //
async changeCustomerOrgId(v) { async changeCustomerOrgId(v) {
console.log('changeCustomerOrgId', v, this.form.customerOrgParentId) console.log('changeCustomerOrgId', v, this.form.customerOrgParentId)
let customerOrgId = ""
let customerOrgId = "", customerOrgParentId = ""
if (Array.isArray(v) && v.length > 0) { if (Array.isArray(v) && v.length > 0) {
customerOrgId = v[v.length - 1] customerOrgId = v[v.length - 1]
this.form.customerOrgParentId = v[0]
customerOrgParentId = v[0]
} else { } else {
customerOrgId = v // ID customerOrgId = v // ID
let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId) let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId)
if (Array.isArray(pids) && pids.length > 0) { if (Array.isArray(pids) && pids.length > 0) {
if (pids.length == 1) { if (pids.length == 1) {
this.form.customerOrgParentId = customerOrgId
customerOrgParentId = customerOrgId
} else { } else {
this.form.customerOrgParentId = pids[1]
customerOrgParentId = pids[1]
} }
} }
} }
this.preCustomerOrgId = customerOrgId this.preCustomerOrgId = customerOrgId
// let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId) // let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
let customerOrgParentId = this.form.customerOrgParentId
if (customerOrgParentId) { if (customerOrgParentId) {
if (customerOrgParentId == this.dict.personOrgId) { if (customerOrgParentId == this.dict.personOrgId) {
@ -1046,7 +1043,8 @@ export default {
this.getCustomerOrgRegisterList(customerOrgParentId) this.getCustomerOrgRegisterList(customerOrgParentId)
} }
// /
// / ID
if (customerOrgParentId != this.form.customerOrgParentId) {
this.form.customerOrgGroupId = null this.form.customerOrgGroupId = null
this.form.medicalPackageId = null this.form.medicalPackageId = null
// //
@ -1063,7 +1061,7 @@ export default {
} else { } else {
this.changeCustomerOrgGroupId() this.changeCustomerOrgGroupId()
} }
}
} }
}, },

Loading…
Cancel
Save