From da17b2b89cb8b4193720ce23d766d75629eb8109 Mon Sep 17 00:00:00 2001 From: chenqi Date: Sun, 18 Jan 2026 19:44:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(inpatient):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B0=B1=E8=AF=8A=E4=BD=8D=E7=BD=AE=E6=9B=B4=E6=96=B0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改就诊位置表更新方式,直接更新指定ID的记录 - 添加位置ID设置功能 - 使用updateById方法替代saveOrUpdate方法提高准确性 --- .../impl/PatientHomeAppServiceImpl.java | 7 ++- .../checkprojectSettings/index.vue | 45 ++++++++++++++++++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java index 045cc076..bcce9231 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java @@ -265,16 +265,19 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService { encounterService.saveOrUpdateEncounter(encounter); // 2.就诊位置表变更 - // 就诊位置ID变更 + // 直接更新指定ID的就诊位置记录 EncounterLocation encounterLocation = new EncounterLocation(); encounterLocation.setId(encounterLocationId) // 设置就诊ID .setEncounterId(encounterId) + // 设置位置ID + .setLocationId(locationId) // 设置状态枚举 .setStatusEnum(EncounterActivityStatus.COMPLETED.getValue()) // 设置物理枚举为 8:病床 .setFormEnum(LocationForm.BED.getValue()); - encounterLocationService.saveOrUpdateEncounterLocation(encounterLocation); + // 直接更新指定ID的记录 + encounterSuccess = encounterLocationService.updateById(encounterLocation); // 3.位置表 // 旧病床状态变更(空闲) diff --git a/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue b/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue index 2bd8b8d9..82078051 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue @@ -88,6 +88,7 @@ v-for="(item, index) in tableData" :key="index" :class="{ 'editing-row': item.editing, 'child-row': item.row.includes('.') }" + @click="handleRowClick(index)" > {{ item.row }} @@ -967,6 +968,14 @@ async function loadMenuData(menu) { } } +// 处理行点击进入编辑状态 +function handleRowClick(index) { + const item = tableData.value[index]; + if (!item.editing) { + item.editing = true; + } +} + // 处理编辑按钮点击 function handleEdit(index) { const item = tableData.value[index]; @@ -982,6 +991,25 @@ function handleCancelEdit(index) { // 处理确认按钮点击 async function handleConfirm(index) { const item = tableData.value[index]; + + // 必填字段验证 + if (!item.code || item.code.trim() === '') { + ElMessage.error('编码不能为空'); + return; + } + if (!item.name || item.name.trim() === '') { + ElMessage.error('名称不能为空'); + return; + } + if (!item.type || item.type.trim() === '') { + ElMessage.error('检查类型不能为空'); + return; + } + if (!item.department || item.department.trim() === '') { + ElMessage.error('执行科室不能为空'); + return; + } + try { // 根据当前激活的菜单调用不同的API if (activeMenu.value === '检查方法') { @@ -1212,9 +1240,24 @@ function handleAddNewRow() { function handleAdd(index) { const parentRow = tableData.value[index]; + // 查找该父行的所有现有子行,确定下一个子行号 + const parentRowPrefix = parentRow.row + '.'; + let maxChildNum = 0; + + tableData.value.forEach((item, idx) => { + if (item.row.startsWith(parentRowPrefix) && idx > index) { + const childNum = parseInt(item.row.split('.').pop()); + if (childNum > maxChildNum) { + maxChildNum = childNum; + } + } + }); + + const nextChildNum = maxChildNum + 1; + // 创建子行数据,继承父行的编码 const childRow = { - row: parentRow.row + '.1', // 子行编号 + row: parentRow.row + '.' + nextChildNum, // 子行编号 code: parentRow.code, // 继承父行编码 name: '', type: '', From b88ad891463c3177f943ec5d7013ba3eedfbbe66 Mon Sep 17 00:00:00 2001 From: huabuweixin <148689675+huabuweixin@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:02:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20107=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=AE=A1=E7=90=86-=E3=80=8B=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE-=E3=80=8B=E7=A7=91=E5=AE=A4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=9A=E7=A7=91=E5=AE=A4=E5=88=86=E7=B1=BB=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/basicmanage/organization/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openhis-ui-vue3/src/views/basicmanage/organization/index.vue b/openhis-ui-vue3/src/views/basicmanage/organization/index.vue index f4ecc537..420ef23c 100644 --- a/openhis-ui-vue3/src/views/basicmanage/organization/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/organization/index.vue @@ -386,6 +386,12 @@ function parseClassEnumValues(value) { /** 搜索按钮操作 */ function handleQuery() { queryParams.value.pageNo = 1; + if (Array.isArray(queryParams.value.classEnum)) { + queryParams.value.classEnum = + queryParams.value.classEnum.length > 0 + ? queryParams.value.classEnum.join(',') + : undefined; + } getPageList(); } From 73b1d01044baadae0aeaad0b489e39166b06b5ed Mon Sep 17 00:00:00 2001 From: huabuweixin <148689675+huabuweixin@users.noreply.github.com> Date: Wed, 21 Jan 2026 10:02:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20104=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=AE=A1=E7=90=86-=E3=80=8B=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E8=A7=84=E5=88=99=E9=85=8D=E7=BD=AE-=E3=80=8B=E5=8F=96?= =?UTF-8?q?=E8=8D=AF=E7=A7=91=E5=AE=A4=E9=85=8D=E7=BD=AE=EF=BC=9A=E5=BC=80?= =?UTF-8?q?=E7=AB=8B=E7=A7=91=E5=AE=A4=E5=AD=97=E6=AE=B5=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/basicmanage/pharmacyDepartment/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/basicmanage/pharmacyDepartment/index.vue b/openhis-ui-vue3/src/views/basicmanage/pharmacyDepartment/index.vue index c007c9a8..70bd8232 100644 --- a/openhis-ui-vue3/src/views/basicmanage/pharmacyDepartment/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/pharmacyDepartment/index.vue @@ -44,6 +44,7 @@ align="center" key="name" prop="name" + width="300" :show-overflow-tooltip="true" >