fix(doctorstation): 修复诊断和手术模块的数据类型及权限过滤问题
- 修复诊断模块中medTypeCode字段使用数字类型字典值而非字符串 - 在报损管理中添加权限过滤后的数据回退机制,当权限过滤无数据时获取全部数据 - 为报损管理新增getPharmacyListAll和getDispensaryListAll接口函数 - 在手术申请模块中添加患者选中校验,防止未选择患者时的操作异常 - 修复手术模块的编辑、查看、删除操作缺少患者校验的问题
This commit is contained in:
@@ -507,7 +507,7 @@ function handleAddDiagnosis() {
|
|||||||
showPopover: false,
|
showPopover: false,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
verificationStatusEnum: 4,
|
verificationStatusEnum: 4,
|
||||||
medTypeCode: '初诊诊断',
|
medTypeCode: 11, // Bug #151 修复:使用数字类型的字典值
|
||||||
diagSrtNo: maxSortNo + 1,
|
diagSrtNo: maxSortNo + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
@@ -718,7 +718,7 @@ form.value.diagnosisList.push({
|
|||||||
ybNo: data.ybNo,
|
ybNo: data.ybNo,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
verificationStatusEnum: 4,
|
verificationStatusEnum: 4,
|
||||||
medTypeCode: '初诊诊断',
|
medTypeCode: 11, // Bug #151 修复:使用数字类型的字典值,而非字符串'初诊诊断'
|
||||||
diagSrtNo: maxSortNo + 1,
|
diagSrtNo: maxSortNo + 1,
|
||||||
definitionId: data.definitionId,
|
definitionId: data.definitionId,
|
||||||
classification: '西医', // 默认为西医
|
classification: '西医', // 默认为西医
|
||||||
|
|||||||
@@ -744,15 +744,20 @@ function handleAdd() {
|
|||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
function handleEdit(row) {
|
function handleEdit(row) {
|
||||||
|
// Bug #152 修复:添加患者选中校验
|
||||||
|
if (!props.patientInfo?.encounterId) {
|
||||||
|
proxy.$modal.msgWarning('请先选择患者')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (row.statusEnum !== 0) {
|
if (row.statusEnum !== 0) {
|
||||||
proxy.$modal.msgWarning('当前状态不允许编辑手术,仅新开状态可编辑')
|
proxy.$modal.msgWarning('当前状态不允许编辑手术,仅新开状态可编辑')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
title.value = '编辑手术申请'
|
title.value = '编辑手术申请'
|
||||||
open.value = true
|
open.value = true
|
||||||
isEditMode.value = true
|
isEditMode.value = true
|
||||||
|
|
||||||
// 确保医生列表已加载
|
// 确保医生列表已加载
|
||||||
if (doctorList.value.length === 0) {
|
if (doctorList.value.length === 0) {
|
||||||
loadDoctorList()
|
loadDoctorList()
|
||||||
@@ -795,6 +800,11 @@ getSurgeryDetail(row.id).then(res => {
|
|||||||
|
|
||||||
// 查看
|
// 查看
|
||||||
function handleView(row) {
|
function handleView(row) {
|
||||||
|
// Bug #152 修复:添加患者选中校验
|
||||||
|
if (!props.patientInfo?.encounterId) {
|
||||||
|
proxy.$modal.msgWarning('请先选择患者')
|
||||||
|
return
|
||||||
|
}
|
||||||
viewOpen.value = true
|
viewOpen.value = true
|
||||||
getSurgeryDetail(row.id).then(res => {
|
getSurgeryDetail(row.id).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -819,6 +829,11 @@ function handleView(row) {
|
|||||||
|
|
||||||
// 删除/取消
|
// 删除/取消
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
|
// Bug #152 修复:添加患者选中校验
|
||||||
|
if (!props.patientInfo?.encounterId) {
|
||||||
|
proxy.$modal.msgWarning('请先选择患者')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (row.statusEnum === 0) {
|
if (row.statusEnum === 0) {
|
||||||
// 新开状态 - 直接删除
|
// 新开状态 - 直接删除
|
||||||
proxy.$modal.confirm('是否确认删除手术"' + row.surgeryName + '"?').then(() => {
|
proxy.$modal.confirm('是否确认删除手术"' + row.surgeryName + '"?').then(() => {
|
||||||
|
|||||||
@@ -88,8 +88,16 @@ export function getCount(queryParams) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取药房列表
|
// 获取药房列表(带权限过滤)
|
||||||
export function getPharmacyList() {
|
export function getPharmacyList() {
|
||||||
|
return request({
|
||||||
|
url: '/app-common/inventory-pharmacy-list',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取药房列表(无权限过滤,作为回退)
|
||||||
|
export function getPharmacyListAll() {
|
||||||
return request({
|
return request({
|
||||||
url: '/app-common/pharmacy-list',
|
url: '/app-common/pharmacy-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -104,8 +112,16 @@ export function getPharmacyCabinetList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取药库列表
|
// 获取药库列表(带权限过滤)
|
||||||
export function getDispensaryList() {
|
export function getDispensaryList() {
|
||||||
|
return request({
|
||||||
|
url: '/app-common/inventory-cabinet-list',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取药库列表(无权限过滤,作为回退)
|
||||||
|
export function getDispensaryListAll() {
|
||||||
return request({
|
return request({
|
||||||
url: '/app-common/cabinet-list',
|
url: '/app-common/cabinet-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|||||||
@@ -532,10 +532,12 @@ import {
|
|||||||
getBusNoInit,
|
getBusNoInit,
|
||||||
getCount,
|
getCount,
|
||||||
getDispensaryList,
|
getDispensaryList,
|
||||||
|
getDispensaryListAll,
|
||||||
getInit,
|
getInit,
|
||||||
getMedicineList,
|
getMedicineList,
|
||||||
getPharmacyCabinetList,
|
getPharmacyCabinetList,
|
||||||
getPharmacyList,
|
getPharmacyList,
|
||||||
|
getPharmacyListAll,
|
||||||
getWarehouseList,
|
getWarehouseList,
|
||||||
getTransferProductDetail,
|
getTransferProductDetail,
|
||||||
lossReportApproved,
|
lossReportApproved,
|
||||||
@@ -1243,14 +1245,28 @@ function handleLocationClick(id, itemId, index) {
|
|||||||
function handleChangePurposeTypeEnum(value) {
|
function handleChangePurposeTypeEnum(value) {
|
||||||
if (value == 16) {
|
if (value == 16) {
|
||||||
getPharmacyList().then((res) => {
|
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) {
|
if (!route.query.supplyBusNo) {
|
||||||
receiptHeaderForm.lossLocationId = '';
|
receiptHeaderForm.lossLocationId = '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (value == 11) {
|
} else if (value == 11) {
|
||||||
getDispensaryList().then((res) => {
|
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) {
|
if (!route.query.supplyBusNo) {
|
||||||
receiptHeaderForm.lossLocationId = '';
|
receiptHeaderForm.lossLocationId = '';
|
||||||
}
|
}
|
||||||
@@ -1264,7 +1280,14 @@ function handleChangelossTypeEnum(value) {
|
|||||||
if (value == 16) {
|
if (value == 16) {
|
||||||
// 药房
|
// 药房
|
||||||
getPharmacyList().then((res) => {
|
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) {
|
if (!route.query.supplyBusNo) {
|
||||||
receiptHeaderForm.lossLocationId = '';
|
receiptHeaderForm.lossLocationId = '';
|
||||||
}
|
}
|
||||||
@@ -1272,7 +1295,14 @@ function handleChangelossTypeEnum(value) {
|
|||||||
} else if (value == 11) {
|
} else if (value == 11) {
|
||||||
// 药库
|
// 药库
|
||||||
getDispensaryList().then((res) => {
|
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) {
|
if (!route.query.supplyBusNo) {
|
||||||
receiptHeaderForm.lossLocationId = '';
|
receiptHeaderForm.lossLocationId = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user