From 06111ef28477505b93c1288e970fe577c488f6a5 Mon Sep 17 00:00:00 2001 From: guanyu Date: Wed, 17 Jun 2026 16:28:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(#784):=20guanyu=20(=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=88=E5=85=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/prescriptionList.vue | 133 ++++++++++++++++-- 1 file changed, 120 insertions(+), 13 deletions(-) diff --git a/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue b/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue index 5180fa2b8..39a24468f 100755 --- a/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue +++ b/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue @@ -15,7 +15,6 @@ 全部 @@ -34,13 +33,9 @@ value-format="YYYY-MM-DD HH:mm:ss" style="width: 200px" /> - 查询 -
@@ -52,18 +47,10 @@ v-model="chooseAll" @change="handelSwitchChange" /> - - 核对通过 - - 退回
@@ -746,3 +733,123 @@ defineExpose({ background-color: #eef9fd !important; } + + + + + + encounterId: item.encounterId, + patientId: item.patientId, + accountId: item.accountId, + therapyEnum: item.therapyEnum, + exePerformRecordList: item.exePerformRecordList, +/** + * 执行医嘱 + */ +function handleExecute() { + let list = getSelectRows(); + if (list.length === 0) { + proxy.$message.warning('请先选择医嘱信息'); + return; + } + // 检查是否已有执行记录(已执行的不需要再执行) + let executedItems = list.filter(item => item.exePerformRecordList && item.exePerformRecordList.length > 0); + if (executedItems.length > 0) { + proxy.$message.warning('选中医嘱中包含已执行的医嘱,请取消勾选后重试'); + return; + } + const now = new Date(); + const exeDate = now.getFullYear() + '-' + + String(now.getMonth() + 1).padStart(2, '0') + '-' + + String(now.getDate()).padStart(2, '0') + ' ' + + String(now.getHours()).padStart(2, '0') + ':' + + String(now.getMinutes()).padStart(2, '0') + ':' + + String(now.getSeconds()).padStart(2, '0'); + const adviceExecuteDetailList = list.map(item => ({ + requestId: item.requestId, + encounterId: item.encounterId, + patientId: item.patientId, + accountId: item.accountId, + therapyEnum: item.therapyEnum, + adviceTable: item.requestTable, + executeTimes: [exeDate], + })); + adviceExecute({ + exeDate: exeDate, + adviceExecuteDetailList: adviceExecuteDetailList, + }).then((res) => { + if (res.code == 200) { + proxy.$modal.msgSuccess(res.msg); + handleGetPrescription(); + } + }); +} + +/** + * 不执行医嘱 + */ +function handleVoid() { + let list = getSelectRows(); + if (list.length === 0) { + proxy.$message.warning('请先选择医嘱信息'); + return; + } + // 检查是否已有执行记录(已执行的不能标记为不执行) + let executedItems = list.filter(item => item.exePerformRecordList && item.exePerformRecordList.length > 0); + if (executedItems.length > 0) { + proxy.$message.warning('选中医嘱中包含已执行的医嘱,请取消勾选后重试'); + return; + } + const now = new Date(); + const exeDate = now.getFullYear() + '-' + + String(now.getMonth() + 1).padStart(2, '0') + '-' + + String(now.getDate()).padStart(2, '0') + ' ' + + String(now.getHours()).padStart(2, '0') + ':' + + String(now.getMinutes()).padStart(2, '0') + ':' + + String(now.getSeconds()).padStart(2, '0'); + const adviceExecuteDetailList = list.map(item => ({ + requestId: item.requestId, + encounterId: item.encounterId, + patientId: item.patientId, + accountId: item.accountId, + therapyEnum: item.therapyEnum, + adviceTable: item.requestTable, + executeTimes: [exeDate], + })); + adviceNoExecute({ + exeDate: exeDate, + adviceExecuteDetailList: adviceExecuteDetailList, + }).then((res) => { + if (res.code == 200) { + proxy.$modal.msgSuccess(res.msg); + handleGetPrescription(); + } + }); +} From 86cb6be013aad3f689957d7ca677bd519a752c02 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 17 Jun 2026 16:35:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(#786):=20zhaoyun=20(=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=88=E5=85=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/components/diagnosis/diagnosis.vue | 33 +++++-------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue index 2087557ca..72ae7940a 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue @@ -472,7 +472,6 @@ function getDetail(encounterId) { if (res.code === 200) { allowAdd.value = res.data ? true : false; console.log('设置 allowAdd =', allowAdd.value, ', 病历数据:', res.data); - } else { allowAdd.value = false; console.warn('获取病历详情失败:', res.msg); } @@ -710,32 +709,15 @@ function getTree() { */ function handleAddDiagnosis() { console.log('点击新增诊断按钮,allowAdd:', allowAdd.value); - - // 检查表单ref是否存在 - if (!proxy.$refs.formRef) { - console.error('表单ref不存在'); - // 直接添加诊断,不经过表单验证 - addDiagnosisItem(); + + // 检查是否有未填写的空行(名称为空的行),防止不保存一直新增 + const hasEmptyRow = form.value.diagnosisList.some(item => !item.name); + if (hasEmptyRow) { + proxy.$modal.msgWarning('请先完善已有的诊断信息后再新增'); return; } - - proxy.$refs.formRef.validate((valid, fields) => { - console.log('表单验证结果:', valid, '错误字段:', fields); - if (valid) { - if (!allowAdd.value) { - proxy.$modal.msgWarning('请先填写病历'); - return; - } - addDiagnosisItem(); - } else { - console.warn('表单验证失败:', fields); - // 验证失败时也允许添加(因为是新增空行) - if (allowAdd.value) { - console.log('验证失败但允许添加,强制添加诊断'); - addDiagnosisItem(); - } - } - }); + + addDiagnosisItem(); } /** @@ -1133,3 +1115,4 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis }); align-items: center; } +