fix(ui): 修复多个功能模块的验证和数据处理问题

- 在医生工作站退费功能中添加患者选择验证
- 统一药品管理中的仓库类型选择逻辑,移除重复代码
- 修复统计管理页面清空按钮的数据重置问题
- 修正西药管理页面处方打印按钮的功能绑定
- 完善库存报表查询的SQL过滤条件实现
- 更新多个控制器接口参数类型以支持业务流程
- 优化退费列表对话框的数据加载和错误处理
This commit is contained in:
2026-03-02 18:36:22 +08:00
parent 25c266babb
commit 208b8fc41d
14 changed files with 233 additions and 196 deletions

View File

@@ -123,15 +123,23 @@ function openDialog() {
getList();
}
function getList() {
// 检查 encounterId 是否为空
if (!props.encounterId) {
proxy.$modal.msgWarning('请先选择患者');
refundList.value = [];
total.value = 0;
tableLoading.value = false;
return;
}
refundList.value = [];
tableLoading.value = true;
getEncounterPatientPayment(props.encounterId).then((res) => {
refundList.value = res.data;
total.value = res.data ? res.data.length : 0;
// expandOrder.value = refundList.value.map((item) => {
// return item.paymentNo;
// });
tableLoading.value = false;
}).catch((error) => {
tableLoading.value = false;
console.error('获取退费账单失败:', error);
});
}

View File

@@ -527,6 +527,11 @@ function getEnPrescription(encounterId) {
}
function handleRefund(encounterId) {
// 校验是否选择了患者
if (!encounterId) {
ElMessage.warning('请先选择患者后再进行退费操作');
return;
}
currentEncounterId.value = encounterId;
openRefundListDialog.value = true;
}

View File

@@ -857,15 +857,10 @@ function handleBlur(row, index) {
row.applicantId = userStore.id;
}
function handleChangeSourceTypeEnum(value) {
if (value == 16) {
getPharmacyList().then((res) => {
sourceTypeListOptions.value = res.data;
});
} else if (value == 11) {
getDispensaryList().then((res) => {
sourceTypeListOptions.value = res.data;
});
}
// 无论选择哪种仓库类型,都显示药房、药库、耗材库的选项
getPharmacyCabinetList().then((res) => {
sourceTypeListOptions.value = res.data;
});
}
// 获取详情
function getTransferProductDetails() {
@@ -1247,21 +1242,13 @@ function handleChangePurposeTypeEnum(value) {
}
// 源仓库切换
function handleChangelossTypeEnum(value) {
if (value == 16) {
getPharmacyList().then((res) => {
sourceTypeListOptions.value = res.data;
if (!route.query.supplyBusNo) {
receiptHeaderForm.lossLocationId = '';
}
});
} else if (value == 11) {
getDispensaryList().then((res) => {
sourceTypeListOptions.value = res.data;
if (!route.query.supplyBusNo) {
receiptHeaderForm.lossLocationId = '';
}
});
}
// 无论选择哪种仓库类型,都显示药房、药库、耗材库的选项
getPharmacyCabinetList().then((res) => {
sourceTypeListOptions.value = res.data;
if (!route.query.supplyBusNo) {
receiptHeaderForm.lossLocationId = '';
}
});
}
// 单位处理
function handleUnitCodeChange(row, index, value) {

View File

@@ -734,6 +734,11 @@ function handleExport() {
function handleClear() {
// 清空查询条件
proxy.resetForm('queryRef');
// 清空不在 queryParams 中的字段
locationId.value = [];
supplierId.value = [];
// 清空 prop 与 v-model 不匹配的字段
queryParams.value.inventoryStatusEnum = undefined;
getList();
}

View File

@@ -218,7 +218,7 @@
<el-button type="primary" @click="handleScan()" style="margin-left: 30px">
扫码
</el-button>
<el-button type="primary" @click="previewAndPrint()" style="margin-left: 30px">
<el-button type="primary" @click="printPrescription()" style="margin-left: 30px">
处方打印
</el-button>
<div style="position: absolute; top: 30px; right: 25px">