From 208b8fc41d3642fa3f564cb3bf14f2d5771d8822 Mon Sep 17 00:00:00 2001 From: chenqi Date: Mon, 2 Mar 2026 18:36:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97=E7=9A=84=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=92=8C=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在医生工作站退费功能中添加患者选择验证 - 统一药品管理中的仓库类型选择逻辑,移除重复代码 - 修复统计管理页面清空按钮的数据重置问题 - 修正西药管理页面处方打印按钮的功能绑定 - 完善库存报表查询的SQL过滤条件实现 - 更新多个控制器接口参数类型以支持业务流程 - 优化退费列表对话框的数据加载和错误处理 --- .../OutpatientRefundController.java | 5 +- .../controller/LossReportFormController.java | 13 +- .../ProductStocktakingController.java | 13 +- .../controller/ProductTransferController.java | 13 +- .../PurchaseInventoryController.java | 13 +- .../controller/PurchaseReturnController.java | 13 +- .../RequisitionIssueController.java | 13 +- .../controller/ReturnIssueController.java | 13 +- .../InventoryProductReportMapper.xml | 272 ++++++++++-------- .../prescription/refundListDialog.vue | 14 +- .../src/views/doctorstation/index.vue | 5 + .../lossReporting/index.vue | 35 +-- .../statisticalManagement/index.vue | 5 + .../westernmedicine/index.vue | 2 +- 14 files changed, 233 insertions(+), 196 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientRefundController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientRefundController.java index 474e9ea4..796cd5b4 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientRefundController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientRefundController.java @@ -66,7 +66,10 @@ public class OutpatientRefundController { * @return 患者账单列表 */ @GetMapping(value = "/patient-payment") - public R getEncounterPatientPayment(@RequestParam Long encounterId) { + public R getEncounterPatientPayment(@RequestParam(required = false) Long encounterId) { + if (encounterId == null) { + return R.fail(null, "请先选择患者后再进行退费操作"); + } return outpatientRefundAppService.getEncounterPatientPayment(encounterId); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/LossReportFormController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/LossReportFormController.java index d108f607..a5f4d6c3 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/LossReportFormController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/LossReportFormController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.ILossReportFormAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.LossReportFormDto; import com.openhis.web.inventorymanage.dto.LossReportSearchParam; import lombok.extern.slf4j.Slf4j; @@ -104,23 +105,23 @@ public class LossReportFormController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return lossReportFormAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return lossReportFormAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return lossReportFormAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return lossReportFormAppService.withdrawApproval(request.getBusNo()); } // /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductStocktakingController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductStocktakingController.java index 6704d284..d7e0c0d1 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductStocktakingController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductStocktakingController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IProductStocktakingAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.ProductStocktakingDto; import com.openhis.web.inventorymanage.dto.ProductStocktakingSearchParam; import com.openhis.web.inventorymanage.dto.StocktakingBatchSearchParam; @@ -140,23 +141,23 @@ public class ProductStocktakingController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return productStocktakingAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return productStocktakingAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return productStocktakingAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return productStocktakingAppService.withdrawApproval(request.getBusNo()); } /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductTransferController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductTransferController.java index 1a58461d..e92c8cf8 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductTransferController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ProductTransferController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IProductTransferAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.BatchTransferSearchParam; import com.openhis.web.inventorymanage.dto.ProductTransferDto; import com.openhis.web.inventorymanage.dto.SupplySearchParam; @@ -151,23 +152,23 @@ public class ProductTransferController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return productTransferAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return productTransferAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return productTransferAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return productTransferAppService.withdrawApproval(request.getBusNo()); } // /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java index f0cc87b8..2abb7e1d 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IPurchaseInventoryAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.InventorySearchParam; import com.openhis.web.inventorymanage.dto.PurchaseInventoryDto; import lombok.extern.slf4j.Slf4j; @@ -104,23 +105,23 @@ public class PurchaseInventoryController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return purchaseInventoryAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return purchaseInventoryAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return purchaseInventoryAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return purchaseInventoryAppService.withdrawApproval(request.getBusNo()); } // /** // * 采购入库单据详情 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseReturnController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseReturnController.java index e89f8365..ed8a786a 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseReturnController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseReturnController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IPurchaseReturnAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.PurchaseReturnDetailDto; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -96,23 +97,23 @@ public class PurchaseReturnController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/return-submit-approval") - public R submitApproval(@RequestBody String busNo) { - return purchaseReturnAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return purchaseReturnAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/return-withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return purchaseReturnAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return purchaseReturnAppService.withdrawApproval(request.getBusNo()); } // /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/RequisitionIssueController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/RequisitionIssueController.java index cdd9d82d..42aa3254 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/RequisitionIssueController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/RequisitionIssueController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IRequisitionIssueAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.IssueDto; import com.openhis.web.inventorymanage.dto.IssueSearchParam; import lombok.extern.slf4j.Slf4j; @@ -104,23 +105,23 @@ public class RequisitionIssueController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return requisitionIssueAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return requisitionIssueAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return requisitionIssueAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return requisitionIssueAppService.withdrawApproval(request.getBusNo()); } // /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ReturnIssueController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ReturnIssueController.java index 3369c11b..6494c089 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ReturnIssueController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/ReturnIssueController.java @@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller; import com.core.common.core.domain.R; import com.openhis.web.inventorymanage.appservice.IReturnIssueAppService; +import com.openhis.web.inventorymanage.dto.BusNoRequest; import com.openhis.web.inventorymanage.dto.IssueDto; import com.openhis.web.inventorymanage.dto.IssueSearchParam; import lombok.extern.slf4j.Slf4j; @@ -104,23 +105,23 @@ public class ReturnIssueController { /** * 提交审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestBody String busNo) { - return returnIssueAppService.submitApproval(busNo); + public R submitApproval(@RequestBody BusNoRequest request) { + return returnIssueAppService.submitApproval(request.getBusNo()); } /** * 撤回审批 * - * @param busNo 单据号 + * @param request 单据号请求 * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestBody String busNo) { - return returnIssueAppService.withdrawApproval(busNo); + public R withdrawApproval(@RequestBody BusNoRequest request) { + return returnIssueAppService.withdrawApproval(request.getBusNo()); } // /** diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml index 8a8a9041..5373b219 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml @@ -4,130 +4,152 @@ diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/refundListDialog.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/refundListDialog.vue index 886c0202..b2e5f6be 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/refundListDialog.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/refundListDialog.vue @@ -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); }); } diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index 4654789c..f79c1937 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -527,6 +527,11 @@ function getEnPrescription(encounterId) { } function handleRefund(encounterId) { + // 校验是否选择了患者 + if (!encounterId) { + ElMessage.warning('请先选择患者后再进行退费操作'); + return; + } currentEncounterId.value = encounterId; openRefundListDialog.value = true; } 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 419ae4d9..98400df7 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/lossReportingManagement/lossReporting/index.vue @@ -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) { diff --git a/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue index 3495a9fb..e5b54c0b 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue @@ -734,6 +734,11 @@ function handleExport() { function handleClear() { // 清空查询条件 proxy.resetForm('queryRef'); + // 清空不在 queryParams 中的字段 + locationId.value = []; + supplierId.value = []; + // 清空 prop 与 v-model 不匹配的字段 + queryParams.value.inventoryStatusEnum = undefined; getList(); } diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue index c490fb86..5b292a8b 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue @@ -218,7 +218,7 @@ 扫码 - + 处方打印