修复门诊医生站->【处方单】按钮,点击【处方单】按钮无响应问题
This commit is contained in:
@@ -391,12 +391,67 @@ function handleClick(tab) {
|
||||
// }
|
||||
}
|
||||
|
||||
// 查看本次就诊处方单
|
||||
// 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息)
|
||||
function getEnPrescription(encounterId) {
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
prescriptionInfo.value = res.data;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
// 检查是否有选中的患者
|
||||
if (!patientInfo.value || !patientInfo.value.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否在医嘱Tab页,如果不在则切换到医嘱Tab页
|
||||
if (activeTab.value !== 'prescription') {
|
||||
activeTab.value = 'prescription';
|
||||
// 等待Tab切换完成后再获取数据
|
||||
nextTick(() => {
|
||||
// 确保数据已加载
|
||||
if (prescriptionRef.value) {
|
||||
// 先刷新数据,确保获取最新的处方单信息
|
||||
if (prescriptionRef.value.getListInfo) {
|
||||
prescriptionRef.value.getListInfo(false);
|
||||
}
|
||||
// 等待数据加载完成后再获取处方单信息
|
||||
setTimeout(() => {
|
||||
if (prescriptionRef.value && prescriptionRef.value.getSignedPrescriptionInfo) {
|
||||
const signedPrescriptions = prescriptionRef.value.getSignedPrescriptionInfo();
|
||||
if (signedPrescriptions && signedPrescriptions.length > 0) {
|
||||
prescriptionInfo.value = signedPrescriptions;
|
||||
openPrescriptionDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgWarning('当前患者没有已签发的处方单');
|
||||
}
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}, 300);
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 如果已经在医嘱Tab页,先刷新数据再获取
|
||||
if (prescriptionRef.value) {
|
||||
if (prescriptionRef.value.getListInfo) {
|
||||
prescriptionRef.value.getListInfo(false);
|
||||
}
|
||||
// 等待数据加载完成后再获取处方单信息
|
||||
setTimeout(() => {
|
||||
if (prescriptionRef.value && prescriptionRef.value.getSignedPrescriptionInfo) {
|
||||
const signedPrescriptions = prescriptionRef.value.getSignedPrescriptionInfo();
|
||||
if (signedPrescriptions && signedPrescriptions.length > 0) {
|
||||
prescriptionInfo.value = signedPrescriptions;
|
||||
openPrescriptionDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgWarning('当前患者没有已签发的处方单');
|
||||
}
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}, 300);
|
||||
} else {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleRefund(encounterId) {
|
||||
|
||||
Reference in New Issue
Block a user