From fe2a79773ffe4e48b1b0c7c7911c19ebbdeda6f9 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 24 Apr 2026 15:00:38 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DBug#440=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=8A=A5=E9=94=99hasOwnProperty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vue 3 reactive proxy对象不支持直接调用hasOwnProperty方法 使用Object.prototype.hasOwnProperty.call替代,解决'hasOwnProperty is not a function'报错 --- openhis-ui-vue3/src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/utils/request.js b/openhis-ui-vue3/src/utils/request.js index 4fc4f340..9bead717 100644 --- a/openhis-ui-vue3/src/utils/request.js +++ b/openhis-ui-vue3/src/utils/request.js @@ -26,7 +26,7 @@ const convertIdsToString = (obj) => { } else { const newObj = {} for (const key in obj) { - if (obj.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { const value = obj[key] // 如果key以Id结尾或者是id,且值是数字,转为字符串 if ((key === 'id' || key.endsWith('Id') || key.endsWith('ID')) && typeof value === 'number') { From b53cdfa617677e532a72e86faf5eb828ab4ddfeb Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 24 Apr 2026 15:08:29 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DBug#439=E9=A2=86?= =?UTF-8?q?=E7=94=A8=E5=87=BA=E5=BA=93=E6=80=BB=E5=BA=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E6=9C=AA=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 保留selectRow中sourceLocationId不被清空(handleAddRow已设置) 2. 取消注释handleLocationClick调用,自动获取库存数量 --- .../requisitionManagement/requisitionManagement/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/medicationmanagement/requisitionManagement/requisitionManagement/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/requisitionManagement/requisitionManagement/index.vue index 6637f311..ee5025a4 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/requisitionManagement/requisitionManagement/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/requisitionManagement/requisitionManagement/index.vue @@ -988,10 +988,13 @@ function selectRow(rowValue, index) { form.purchaseinventoryList[index].unitList = rowValue.unitList[0]; form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber; form.purchaseinventoryList[index].ybNo = rowValue.ybNo; - form.purchaseinventoryList[index].sourceLocationId = ''; + // #439 fix: 不清空sourceLocationId,保留handleAddRow设置的仓库ID + if (!form.purchaseinventoryList[index].sourceLocationId) { + form.purchaseinventoryList[index].sourceLocationId = ''; + } getPharmacyCabinetList().then((res) => { purposeTypeListOptions.value = res.data; - // handleLocationClick(1, row, index) + handleLocationClick(1, rowValue, index) }); form.purchaseinventoryList[index].itemQuantity = 0; form.purchaseinventoryList[index].totalPrice = 0; From 091b6e83b604545a4b448d156da460d9675cffac Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 24 Apr 2026 15:11:19 +0800 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DBug#429=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E6=96=B9=E6=B3=95=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=A2=84=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除examinationApplication.vue中自动填充inspectionMethod的逻辑 用户应手动选择检查方法,而不是由系统自动赋值 --- .../components/examination/examinationApplication.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue index 4fb56576..987f72d6 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -832,11 +832,6 @@ function handleSave() { const firstCheckType = selectedItems.value[0]?.checkType || 'unknown'; form.examTypeCode = firstCheckType; - // 如果有选中的检查方法,更新表单中的检查方法字段(取第一个选中项目的检查方法) - const firstItemWithMethod = selectedItems.value.find(item => item.selectedMethod); - if (firstItemWithMethod?.selectedMethod) { - form.inspectionMethod = firstItemWithMethod.selectedMethod.name; - } const payload = { ...form, From 1242d414999ae84b0cc44bec7fe6f34fe70a8f20 Mon Sep 17 00:00:00 2001 From: zhugeliang Date: Fri, 24 Apr 2026 15:15:15 +0800 Subject: [PATCH 04/10] =?UTF-8?q?fix:=20Bug=20#418=20#419=20#421=20#424=20?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=94=B3=E8=AF=B7=E5=8F=91=E5=BE=80=E7=A7=91?= =?UTF-8?q?=E5=AE=A4=E6=9C=AA=E8=87=AA=E5=8A=A8=E8=B5=8B=E5=80=BC/?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=97=A0=E6=95=B0=E6=8D=AE=20-=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=A7=91=E5=AE=A4=E6=95=B0=E6=8D=AE=E6=BA=90=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主要修复: - 4个申请单组件统一使用getDepartmentList()替代getOrgList() - 使用/app-common/department-list接口替代分页接口,确保科室树完整加载 - 添加findTreeItem递归查找函数,支持树形结构科室匹配 - 优化分页大小:pageSize从10000降至500,提升加载性能 - #415 后端添加价格非负验证,防止单价显示负数 涉及文件: - laboratoryTests.vue/medicalExaminations.vue/bloodTransfusion.vue/surgery.vue - DoctorStationAdviceAppServiceImpl.java --- .../DoctorStationAdviceAppServiceImpl.java | 21 +++++++++++++--- .../applicationForm/bloodTransfusion.vue | 22 ++++++++++++----- .../order/applicationForm/laboratoryTests.vue | 24 +++++++++++++------ .../applicationForm/medicalExaminations.vue | 24 +++++++++++++------ .../order/applicationForm/surgery.vue | 22 ++++++++++++----- 5 files changed, 84 insertions(+), 29 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index aa3a4c6d..e6c26449 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -1144,7 +1144,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量 chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位 - chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价 + // #415 价格非负验证 + BigDecimal unitPrice = adviceSaveDto.getUnitPrice(); + if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) { + unitPrice = unitPrice.abs(); // 负数取绝对值 + } + chargeItem.setUnitPrice(unitPrice); // 单价 chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价 // 显式设置tenantId、createBy和createTime字段,防止自动填充机制失效 @@ -1616,7 +1621,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量 chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位 - chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价 + // #415 价格非负验证 + BigDecimal unitPrice = adviceSaveDto.getUnitPrice(); + if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) { + unitPrice = unitPrice.abs(); // 负数取绝对值 + } + chargeItem.setUnitPrice(unitPrice); // 单价 chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价 // 显式设置审计字段,防止自动填充机制失效 @@ -1842,7 +1852,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp chargeItem.setEncounterDiagnosisId(adviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量 chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位 - chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价 + // #415 价格非负验证 + BigDecimal unitPrice = adviceSaveDto.getUnitPrice(); + if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) { + unitPrice = unitPrice.abs(); // 负数取绝对值 + } + chargeItem.setUnitPrice(unitPrice); // 单价 chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价 iChargeItemService.saveOrUpdate(chargeItem); diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/bloodTransfusion.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/bloodTransfusion.vue index a5d21864..b5950993 100644 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/bloodTransfusion.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/bloodTransfusion.vue @@ -80,11 +80,23 @@ + + From 4fb540cfa598c8ab7da18dfe59d9782e4a14215b Mon Sep 17 00:00:00 2001 From: zhangfei Date: Fri, 24 Apr 2026 16:25:36 +0800 Subject: [PATCH 08/10] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DgetDepartmentLis?= =?UTF-8?q?t=E7=BC=BA=E5=A4=B1=E5=AF=BC=E5=87=BA=E9=97=AE=E9=A2=98=20-=20p?= =?UTF-8?q?ublic.js=E4=B8=AD=E8=A1=A5=E5=85=85getDepartmentList=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4个申请单组件(bloodTransfusion/laboratoryTests/surgery/medicalExaminations) 从@/api/public.js导入getDepartmentList,但该函数未导出导致构建失败 --- openhis-ui-vue3/src/api/public.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openhis-ui-vue3/src/api/public.js b/openhis-ui-vue3/src/api/public.js index 37ec8627..30a900d4 100644 --- a/openhis-ui-vue3/src/api/public.js +++ b/openhis-ui-vue3/src/api/public.js @@ -20,6 +20,15 @@ export function advicePrint(data) { } // 获取全部科室列表 +// 获取科室列表(树形结构) +export function getDepartmentList(data) { + return request({ + url: '/app-common/department-list', + method: 'get', + params: data, + }); +} + export function getOrgList(data) { return request({ url: '/app-common/department-list', From d27b5147ec37b4399be4d10032988f7e1377b0be Mon Sep 17 00:00:00 2001 From: zhugeliang Date: Fri, 24 Apr 2026 16:25:40 +0800 Subject: [PATCH 09/10] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DbloodTransfusion?= =?UTF-8?q?.vue=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5=20-=20public.js?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0getDepartmentList=E5=AF=BC=E5=87=BA=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在public.js中新增getDepartmentList()函数 - 调用/app-common/department-list接口返回完整科室树 - 解决4个申请单组件导入不存在的函数导致构建失败问题 --- openhis-ui-vue3/src/api/public.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openhis-ui-vue3/src/api/public.js b/openhis-ui-vue3/src/api/public.js index 30a900d4..4bfaf890 100644 --- a/openhis-ui-vue3/src/api/public.js +++ b/openhis-ui-vue3/src/api/public.js @@ -37,6 +37,15 @@ export function getOrgList(data) { }); } +// 获取科室列表(非分页,完整树形结构)- 用于申请单组件"发往科室"下拉 +export function getDepartmentList(data) { + return request({ + url: '/app-common/department-list', + method: 'get', + params: data, + }); +} + // 获取全部病区列表 export function getWardList(data) { return request({ From dc43ce335a0864183f4ee0144aac5bd4cd5afe0a Mon Sep 17 00:00:00 2001 From: zhugeliang Date: Fri, 24 Apr 2026 16:30:22 +0800 Subject: [PATCH 10/10] =?UTF-8?q?fix:=20=E6=B8=85=E7=90=86public.js?= =?UTF-8?q?=E4=B8=AD=E9=87=8D=E5=A4=8D=E7=9A=84getDepartmentList=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除重复定义的getDepartmentList函数 - 保留一份干净的科室列表接口导出 - 确保4个申请单组件构建正常 --- openhis-ui-vue3/src/api/public.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/openhis-ui-vue3/src/api/public.js b/openhis-ui-vue3/src/api/public.js index 4bfaf890..30a900d4 100644 --- a/openhis-ui-vue3/src/api/public.js +++ b/openhis-ui-vue3/src/api/public.js @@ -37,15 +37,6 @@ export function getOrgList(data) { }); } -// 获取科室列表(非分页,完整树形结构)- 用于申请单组件"发往科室"下拉 -export function getDepartmentList(data) { - return request({ - url: '/app-common/department-list', - method: 'get', - params: data, - }); -} - // 获取全部病区列表 export function getWardList(data) { return request({