From 3e5db107fb371853b6cbc0ba25acf710f91c1beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 06:04:45 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#498:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=94=B3=E8=AF=B7=E3=80=91=E6=A3=80=E6=9F=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=88=97=E8=A1=A8=E6=93=8D=E4=BD=9C=E9=A1=B9=E8=BF=87?= =?UTF-8?q?=E4=BA=8E=E5=8D=95=E4=B8=80=EF=BC=8C=E7=BC=BA=E5=A4=B1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9/=E4=BD=9C=E5=BA=9F/=E6=89=93=E5=8D=B0/=E7=9C=8B?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E7=AD=89=E6=A0=B8=E5=BF=83=E4=B8=B4=E5=BA=8A?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据申请单状态动态展示操作按钮: - 待签发:详情、修改、删除 - 已签发:详情、撤回 - 已校对/待接收:详情、打印 - 已接收/已检查:详情、看报告 - 已出报告:详情、打印、看报告 - 已作废:详情 Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/examineApplication.vue | 125 +++++++++++++++++- 1 file changed, 122 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue index 7f5f022cf..5e6bd41bf 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue @@ -86,9 +86,43 @@ {{ parseStatus(scope.row.status) }} - + @@ -167,7 +201,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue'; import {Refresh, Search} from '@element-plus/icons-vue'; import {patientInfo} from '../../store/patient.js'; -import {getCheck} from './api'; +import {getCheck, deleteRequestForm, withdrawRequestForm, getTestResult} from './api'; import {getDepartmentList} from '@/api/public.js'; const { proxy } = getCurrentInstance(); @@ -359,6 +393,91 @@ const handleViewDetail = async (row) => { detailDialogVisible.value = true; }; +/** + * 修改申请单(仅待签发状态) + */ +const handleModify = (row) => { + proxy.$modal?.msgWarning?.('修改功能需后端支持,请联系管理员'); +}; + +/** + * 删除申请单(仅待签发状态) + */ +const handleDelete = (row) => { + proxy.$confirm?.('确认删除该检查申请单吗?删除后不可恢复。', '警告', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(async () => { + try { + const res = await deleteRequestForm({ requestFormId: row.requestFormId || row.id }); + if (res?.code === 200) { + proxy.$modal?.msgSuccess?.('删除成功'); + await fetchData(); + } else { + proxy.$modal?.msgError?.(res?.msg || '删除失败'); + } + } catch (e) { + console.warn('删除申请单失败(可能后端未实现):', e.message); + proxy.$modal?.msgError?.('删除失败,后端服务可能未支持此功能'); + } + }).catch(() => {}); +}; + +/** + * 撤回申请单(已签发状态撤回至待签发) + */ +const handleWithdraw = (row) => { + proxy.$confirm?.('确认撤回该检查申请单吗?撤回后状态将变为待签发。', '撤回确认', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(async () => { + try { + const res = await withdrawRequestForm({ requestFormId: row.requestFormId || row.id }); + if (res?.code === 200) { + proxy.$modal?.msgSuccess?.('撤回成功'); + await fetchData(); + } else { + proxy.$modal?.msgError?.(res?.msg || '撤回失败'); + } + } catch (e) { + console.warn('撤回申请单失败(可能后端未实现):', e.message); + proxy.$modal?.msgError?.('撤回失败,后端服务可能未支持此功能'); + } + }).catch(() => {}); +}; + +/** + * 打印申请单 + */ +const handlePrint = (row) => { + // 使用浏览器原生打印功能 + window.print(); +}; + +/** + * 查看检查报告 + */ +const handleViewReport = async (row) => { + try { + const res = await getTestResult({ encounterId: row.encounterId || patientInfo.value?.encounterId }); + if (res?.code === 200 && res.data) { + const reportUrl = Array.isArray(res.data) ? res.data[0]?.reportUrl : res.data?.reportUrl; + if (reportUrl) { + window.open(reportUrl, '_blank'); + } else { + proxy.$modal?.msgWarning?.('暂无检查报告'); + } + } else { + proxy.$modal?.msgWarning?.('暂无检查报告'); + } + } catch (e) { + console.warn('查看检查报告失败:', e.message); + proxy.$modal?.msgError?.('获取检查报告失败'); + } +}; + watch( () => patientInfo.value?.encounterId, (val) => {