From 30ca81090a630a77b80dc766487f1f4f2987a1db Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 4 Mar 2026 13:16:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(doctorstation):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AF=8A=E6=96=AD=E5=92=8C=E6=89=8B=E6=9C=AF=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=8F=8A=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=BF=87=E6=BB=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复诊断模块中medTypeCode字段使用数字类型字典值而非字符串 - 在报损管理中添加权限过滤后的数据回退机制,当权限过滤无数据时获取全部数据 - 为报损管理新增getPharmacyListAll和getDispensaryListAll接口函数 - 在手术申请模块中添加患者选中校验,防止未选择患者时的操作异常 - 修复手术模块的编辑、查看、删除操作缺少患者校验的问题 --- .../components/diagnosis/diagnosis.vue | 4 +- .../components/surgery/surgeryApplication.vue | 19 +++++++++- .../lossReportingManagement/lossReporting.js | 20 +++++++++- .../lossReporting/index.vue | 38 +++++++++++++++++-- 4 files changed, 71 insertions(+), 10 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/diagnosis.vue b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/diagnosis.vue index bb1fe405..f6dbd040 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/diagnosis.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/diagnosis.vue @@ -507,7 +507,7 @@ function handleAddDiagnosis() { showPopover: false, name: undefined, verificationStatusEnum: 4, - medTypeCode: '初诊诊断', + medTypeCode: 11, // Bug #151 修复:使用数字类型的字典值 diagSrtNo: maxSortNo + 1, iptDiseTypeCode: 2, diagnosisDesc: '', @@ -718,7 +718,7 @@ form.value.diagnosisList.push({ ybNo: data.ybNo, name: data.name, verificationStatusEnum: 4, - medTypeCode: '初诊诊断', + medTypeCode: 11, // Bug #151 修复:使用数字类型的字典值,而非字符串'初诊诊断' diagSrtNo: maxSortNo + 1, definitionId: data.definitionId, classification: '西医', // 默认为西医 diff --git a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue index b299b789..ea3dc879 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -744,15 +744,20 @@ function handleAdd() { // 编辑 function handleEdit(row) { + // Bug #152 修复:添加患者选中校验 + if (!props.patientInfo?.encounterId) { + proxy.$modal.msgWarning('请先选择患者') + return + } if (row.statusEnum !== 0) { proxy.$modal.msgWarning('当前状态不允许编辑手术,仅新开状态可编辑') return } - + title.value = '编辑手术申请' open.value = true isEditMode.value = true - + // 确保医生列表已加载 if (doctorList.value.length === 0) { loadDoctorList() @@ -795,6 +800,11 @@ getSurgeryDetail(row.id).then(res => { // 查看 function handleView(row) { + // Bug #152 修复:添加患者选中校验 + if (!props.patientInfo?.encounterId) { + proxy.$modal.msgWarning('请先选择患者') + return + } viewOpen.value = true getSurgeryDetail(row.id).then(res => { if (res.code === 200) { @@ -819,6 +829,11 @@ function handleView(row) { // 删除/取消 function handleDelete(row) { + // Bug #152 修复:添加患者选中校验 + if (!props.patientInfo?.encounterId) { + proxy.$modal.msgWarning('请先选择患者') + return + } if (row.statusEnum === 0) { // 新开状态 - 直接删除 proxy.$modal.confirm('是否确认删除手术"' + row.surgeryName + '"?').then(() => { diff --git a/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting.js b/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting.js index 5d7d40d1..3d140a98 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting.js +++ b/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting.js @@ -88,8 +88,16 @@ export function getCount(queryParams) { }) } -// 获取药房列表 +// 获取药房列表(带权限过滤) export function getPharmacyList() { + return request({ + url: '/app-common/inventory-pharmacy-list', + method: 'get', + }) +} + +// 获取药房列表(无权限过滤,作为回退) +export function getPharmacyListAll() { return request({ url: '/app-common/pharmacy-list', method: 'get', @@ -104,8 +112,16 @@ export function getPharmacyCabinetList() { } -// 获取药库列表 +// 获取药库列表(带权限过滤) export function getDispensaryList() { + return request({ + url: '/app-common/inventory-cabinet-list', + method: 'get', + }) +} + +// 获取药库列表(无权限过滤,作为回退) +export function getDispensaryListAll() { return request({ url: '/app-common/cabinet-list', method: 'get', diff --git a/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue index 21bfff37..47643173 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue @@ -532,10 +532,12 @@ import { getBusNoInit, getCount, getDispensaryList, + getDispensaryListAll, getInit, getMedicineList, getPharmacyCabinetList, getPharmacyList, + getPharmacyListAll, getWarehouseList, getTransferProductDetail, lossReportApproved, @@ -1243,14 +1245,28 @@ function handleLocationClick(id, itemId, index) { function handleChangePurposeTypeEnum(value) { if (value == 16) { getPharmacyList().then((res) => { - purposeTypeListOptions.value = res.data; + if (res.data && res.data.length > 0) { + purposeTypeListOptions.value = res.data; + } else { + // 权限过滤后无数据,尝试获取所有药房 + getPharmacyListAll().then((resAll) => { + purposeTypeListOptions.value = resAll.data || []; + }); + } if (!route.query.supplyBusNo) { receiptHeaderForm.lossLocationId = ''; } }); } else if (value == 11) { getDispensaryList().then((res) => { - purposeTypeListOptions.value = res.data; + if (res.data && res.data.length > 0) { + purposeTypeListOptions.value = res.data; + } else { + // 权限过滤后无数据,尝试获取所有药库 + getDispensaryListAll().then((resAll) => { + purposeTypeListOptions.value = resAll.data || []; + }); + } if (!route.query.supplyBusNo) { receiptHeaderForm.lossLocationId = ''; } @@ -1264,7 +1280,14 @@ function handleChangelossTypeEnum(value) { if (value == 16) { // 药房 getPharmacyList().then((res) => { - sourceTypeListOptions.value = res.data; + if (res.data && res.data.length > 0) { + sourceTypeListOptions.value = res.data; + } else { + // 权限过滤后无数据,尝试获取所有药房 + getPharmacyListAll().then((resAll) => { + sourceTypeListOptions.value = resAll.data || []; + }); + } if (!route.query.supplyBusNo) { receiptHeaderForm.lossLocationId = ''; } @@ -1272,7 +1295,14 @@ function handleChangelossTypeEnum(value) { } else if (value == 11) { // 药库 getDispensaryList().then((res) => { - sourceTypeListOptions.value = res.data; + if (res.data && res.data.length > 0) { + sourceTypeListOptions.value = res.data; + } else { + // 权限过滤后无数据,尝试获取所有药库 + getDispensaryListAll().then((resAll) => { + sourceTypeListOptions.value = resAll.data || []; + }); + } if (!route.query.supplyBusNo) { receiptHeaderForm.lossLocationId = ''; }