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 = ''; }