From b21bdc20432e2ece8a5851cc6f1c2c384dc3e33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= <华佗@gentronhealth.com> Date: Tue, 12 May 2026 17:26:58 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#469:=20[=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?=E9=AA=8C=E7=94=B3=E8=AF=B7]=20=E5=AE=8C=E5=96=84=E3=80=90?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E3=80=91=E5=88=97=E4=B8=B4=E5=BA=8A=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E9=80=BB=E8=BE=91=EF=BC=9A=E6=94=AF=E6=8C=81=E6=8C=89?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=8A=A8=E6=80=81=E5=88=87=E6=8D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=81=E5=88=A0=E9=99=A4=E3=80=81=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据单据状态动态显示操作按钮: - 待签发(状态0):显示修改、删除、详情 - 已签发(状态1):显示撤回、详情 - 其他状态:仅显示详情 Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/testApplication.vue | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue index e08b5ac8..f13a4f17 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue @@ -103,8 +103,15 @@ - + @@ -181,7 +188,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue'; import {Refresh, Search} from '@element-plus/icons-vue'; import {patientInfo} from '../../store/patient.js'; -import {getInspection} from './api'; +import {getInspection, deleteRequestForm, withdrawRequestForm} from './api'; import {getOrgList} from '@/views/doctorstation/components/api.js'; const { proxy } = getCurrentInstance(); @@ -399,6 +406,61 @@ const handleViewDetail = async (row) => { detailDialogVisible.value = true; }; +/** + * 修改检验申请单(待签发状态) + */ +const handleEdit = (row) => { + // 复用详情查看逻辑,后续可扩展为打开编辑弹窗 + handleViewDetail(row); + proxy.$modal?.msgInfo?.('修改功能待接入,请通过详情弹窗查看后重新开立'); +}; + +/** + * 删除检验申请单(仅待签发状态可删除) + */ +const handleDelete = async (row) => { + try { + await proxy.$modal?.confirm?.(`确定要删除申请单 "${row.prescriptionNo}" 吗?此操作不可恢复。`); + } catch { + return; // 用户取消 + } + + try { + const res = await deleteRequestForm({ prescriptionNo: row.prescriptionNo }); + if (res?.code === 200) { + proxy.$modal?.msgSuccess?.('删除成功'); + await fetchData(); + } else { + proxy.$modal?.msgError?.(res?.msg || '删除失败'); + } + } catch (e) { + proxy.$modal?.msgError?.(e.message || '删除异常'); + } +}; + +/** + * 撤回检验申请单(已签发状态撤回至待签发) + */ +const handleWithdraw = async (row) => { + try { + await proxy.$modal?.confirm?.(`确定要撤回申请单 "${row.prescriptionNo}" 吗?撤回后将恢复为待签发状态。`); + } catch { + return; // 用户取消 + } + + try { + const res = await withdrawRequestForm({ prescriptionNo: row.prescriptionNo }); + if (res?.code === 200) { + proxy.$modal?.msgSuccess?.('撤回成功'); + await fetchData(); + } else { + proxy.$modal?.msgError?.(res?.msg || '撤回失败'); + } + } catch (e) { + proxy.$modal?.msgError?.(e.message || '撤回异常'); + } +}; + watch( () => patientInfo.value?.encounterId, async (val) => {