|
|
|
@ -818,17 +818,20 @@ export default { |
|
|
|
if(lfind > -1){ |
|
|
|
// 弹出编辑框,只有在编辑框显示时,才去触发获取数据 |
|
|
|
this.dataTransOpts.tableS.patient_register.id = this.patientRegister.prList[lfind].id |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.register_asbitem.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
// 旧的方式 |
|
|
|
if(this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){ |
|
|
|
this.setForm(this.patientRegister.prList[lfind]) |
|
|
|
// this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId; |
|
|
|
this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 |
|
|
|
this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 |
|
|
|
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); |
|
|
|
this.dict.asbItem = [...this.dict.asbItemAll]; |
|
|
|
this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id); |
|
|
|
} |
|
|
|
// if(this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){ |
|
|
|
// this.setForm(this.patientRegister.prList[lfind]) |
|
|
|
// // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId; |
|
|
|
// this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 |
|
|
|
// this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 |
|
|
|
// // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); |
|
|
|
// this.dict.asbItem = [...this.dict.asbItemAll]; |
|
|
|
// this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id); |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -922,43 +925,41 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//新增或编辑后选中记录 |
|
|
|
closeDialogPR(){ |
|
|
|
async closeDialogPR(){ |
|
|
|
// 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理 |
|
|
|
if(!this.dataTransOpts.tableS.patient_register.id) return |
|
|
|
|
|
|
|
// 刷新列表(并选中当前新增或编辑的行记录) |
|
|
|
this.patientRegister.prList.forEach(e =>{ |
|
|
|
e.choosed = false |
|
|
|
}) |
|
|
|
let body = Object.assign({patientRegisterNo:this.patientRegister.patientRegisterRd.patientRegisterNo},this.loadOpts) |
|
|
|
postapi("/api/app/patientregister/getlistinfilter", body).then(res =>{ |
|
|
|
console.log('closeDialogPR',res.data.items) |
|
|
|
if(res.code != -1 && res.data.items.length > 0){ |
|
|
|
let currentRow = Object.assign({},res.data.items[0]) |
|
|
|
let lfind = arrayExistObj(this.patientRegister.prList,'id',currentRow.id) |
|
|
|
if(lfind > -1){ |
|
|
|
currentRow = this.patientRegister.prList[lfind] |
|
|
|
objCopy(Object.assign({},res.data.items[0]),currentRow) |
|
|
|
this.patientRegister.prList[lfind].choosed = true |
|
|
|
}else{ |
|
|
|
lfind = this.patientRegister.prList.length |
|
|
|
currentRow.choosed = true |
|
|
|
currentRow.index = lfind |
|
|
|
this.patientRegister.prList.push(currentRow) |
|
|
|
} |
|
|
|
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`) |
|
|
|
if(res.code != 1) return |
|
|
|
let lfind = arrayExistObj(this.patientRegister.prList,'id',this.dataTransOpts.tableS.patient_register.id) |
|
|
|
if(lfind > -1){ |
|
|
|
objCopy(res.data,this.patientRegister.prList[lfind]) |
|
|
|
}else{ |
|
|
|
lfind = this.patientRegister.prList.length |
|
|
|
this.patientRegister.prList.push(res.data) |
|
|
|
this.patientRegister.prList[lfind].index = lfind |
|
|
|
this.patientRegister.prList[lfind].choosed = true |
|
|
|
} |
|
|
|
|
|
|
|
if(lfind > -1){ |
|
|
|
setTimeout(() => { |
|
|
|
this.$refs['info'].setCurrentRow(currentRow) |
|
|
|
this.setForm(currentRow) |
|
|
|
// this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId; |
|
|
|
this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 |
|
|
|
this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 |
|
|
|
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); |
|
|
|
this.dict.asbItem = [...this.dict.asbItemAll]; |
|
|
|
this.getPatientRegisterAbs(currentRow.id); |
|
|
|
|
|
|
|
}, 100) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 刷新 register_asbitem 表记录 |
|
|
|
if(lfind > -1){ |
|
|
|
this.dataTransOpts.refresh.register_asbitem.M++ |
|
|
|
// setTimeout(() => { |
|
|
|
// this.$refs['info'].setCurrentRow(currentRow) |
|
|
|
// this.setForm(currentRow) |
|
|
|
// // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId; |
|
|
|
// this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作 |
|
|
|
// this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作 |
|
|
|
// // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); |
|
|
|
// this.dict.asbItem = [...this.dict.asbItemAll]; |
|
|
|
// this.getPatientRegisterAbs(currentRow.id); |
|
|
|
// }, 100) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//拍照 |
|
|
|
@ -1787,7 +1788,7 @@ export default { |
|
|
|
// 单位变化时,清除当前列表信息 |
|
|
|
if(newVal && newVal != oldVal){ |
|
|
|
this.patientRegister.prList = [] |
|
|
|
this.patientRegister.patientRegisterAbs = [] |
|
|
|
this.dataTransOpts.tableM.register_asbitem = [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|