From 4bd0d2dcc8b521ab65ea14bf2556bd18adf2d619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Sun, 10 May 2026 16:02:20 +0800 Subject: [PATCH 01/29] =?UTF-8?q?Fix=20Bug=20#486:=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E4=B8=B4?= =?UTF-8?q?=E5=BA=8A=E5=8C=BB=E5=98=B1]=20=E5=8C=BB=E5=98=B1=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=E4=B8=8D=E6=94=AF=E6=8C=81=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2=EF=BC=8C=E6=9C=AA=E9=80=89?= =?UTF-8?q?"=E5=8C=BB=E5=98=B1=E7=B1=BB=E5=9E=8B"=E6=97=B6=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E7=BB=93=E6=9E=9C=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../inpatientDoctor/home/components/order/index.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue index 35336e078..213a499de 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -879,14 +879,12 @@ function handleDiagnosisChange(item) { function handleFocus(row, index) { rowIndex.value = index; row.showPopover = true; - // el-popover 懒渲染,需要等两帧组件才会挂载 const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType; // 用 adviceType + categoryCode 组合查找匹配的选项 const selectValue = (adviceType == 1 && row.categoryCode) ? '1-' + row.categoryCode : adviceType; const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType); - // 诊疗(3)和手术(6)没有categoryCode,传空字符串给refresh,由子组件转为undefined不发送 - // 药品(1)才有categoryCode(如'1'=中成药,'2'=西药,'4'=中草药) - const categoryCode = selectedItem ? selectedItem.categoryCode : (adviceQueryParams.value.categoryCode || ''); + // 修复Bug #486:当行没有显式选择医嘱类型时,不传categoryCode,让搜索在全药库中进行 + const categoryCode = selectedItem ? selectedItem.categoryCode : (row.adviceType !== undefined ? (adviceQueryParams.value.categoryCode || '') : ''); const searchKey = row.adviceName || ''; nextTick(() => { @@ -923,8 +921,8 @@ function handleChange(value) { // 用 adviceType + categoryCode 组合查找匹配的选项 const selectValue = (adviceType == 1 && row?.categoryCode) ? '1-' + row.categoryCode : adviceType; const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType); - // 诊疗/手术的categoryCode为空字符串,由子组件转为undefined不发送 - const categoryCode = selectedItem ? selectedItem.categoryCode : (adviceQueryParams.value.categoryCode || ''); + // 修复Bug #486:当行没有显式选择医嘱类型时,不传categoryCode,让搜索在全药库中进行 + const categoryCode = selectedItem ? selectedItem.categoryCode : (row?.adviceType !== undefined ? (adviceQueryParams.value.categoryCode || '') : ''); tableRef.refresh(adviceType, categoryCode, value); } } From 37b57e8b12fe4069cd2a7eee94acb6fd0f9d7347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Mon, 11 May 2026 15:26:29 +0800 Subject: [PATCH 02/29] =?UTF-8?q?Fix=20Bug=20#511:=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E4=B8=B4?= =?UTF-8?q?=E5=BA=8A=E5=8C=BB=E5=98=B1]=20=E6=8A=A4=E5=A3=AB=E9=80=80?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E5=8C=BB=E5=98=B1=E5=9C=A8=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=AB=99=E5=8F=8C=E5=87=BB=E6=97=A0=E6=B3=95=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A8=A1=E5=BC=8F=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9=E9=87=8D=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: clickRowDb 双击编辑条件为 row.statusEnum == 1 && !row.requestId, 护士退回的医嘱 statusEnum 被重置为 1(DRAFT),但 requestId 仍存在(之前已保存过), 导致不满足 !row.requestId 条件,无法进入编辑模式。 修复: 移除 !row.requestId 限制,仅保留 statusEnum == 1 条件。 保存流程已支持两种场景: - 新建医嘱(无requestId): dbOpType = '1' 创建 - 退回医嘱(有requestId): dbOpType = '2' 更新 --- .../src/views/inpatientDoctor/home/components/order/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue index 791f941ec..a6e981314 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -802,8 +802,8 @@ function clickRowDb(row, column, event) { return; } row.showPopover = false; - // “待签发(已保存 requestId存在)”不允许再编辑;仅“待保存(无requestId)”允许编辑 - if (row.statusEnum == 1 && !row.requestId) { + // statusEnum == 1 允许编辑(包含新创建的”待保存”和护士退回的”待签发”) + if (row.statusEnum == 1) { // 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1') row.therapyEnum = String(row.therapyEnum ?? '1'); row.isEdit = true; From 6626c8f1cd49b8b2e1c674b23c80ce11b8271337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Mon, 11 May 2026 15:26:48 +0800 Subject: [PATCH 03/29] =?UTF-8?q?Fix=20Bug=20#502:=20=E3=80=90=E4=BD=8F?= =?UTF-8?q?=E9=99=A2=E6=8A=A4=E5=A3=AB=E7=AB=99-=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E5=8F=91=E8=8D=AF=E7=94=B3=E8=AF=B7=E3=80=91=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E7=B1=BB=E5=9E=8B=EF=BC=88=E9=95=BF=E6=9C=9F?= =?UTF-8?q?/=E4=B8=B4=E6=97=B6=EF=BC=89=E8=BF=87=E6=BB=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=82=B9=E5=87=BB=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:父组件 index.vue 中 therapyEnum 变量未声明为 ref,且未通过 props 传递给子组件 prescriptionList.vue, 导致点击"长期/临时"按钮时数据流断裂,子组件 API 调用始终使用本地未变化的 therapyEnum 值。 修复: 1. index.vue 新增 const therapyEnum = ref(undefined) 2. index.vue 新增 handleTherapyChange() 调用 handleGetPrescription() 刷新列表 3. index.vue 将 therapyEnum 作为 prop 传入 PrescriptionList 4. prescriptionList.vue 将本地 therapyEnum ref 改为 props 接收 --- .../drugDistribution/components/prescriptionList.vue | 7 +++++-- .../src/views/inpatientNurse/drugDistribution/index.vue | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue index 963c73d26..36b02de39 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue @@ -174,7 +174,6 @@ const activeNames = ref([]); const userStore = useUserStore(); const prescriptionList = ref([]); const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59'); -const therapyEnum = ref(undefined); const { proxy } = getCurrentInstance(); const loading = ref(false); const chooseAll = ref(false); @@ -190,6 +189,10 @@ const props = defineProps({ deadline: { type: String, }, + therapyEnum: { + type: Number, + default: undefined, + }, }); function handleGetPrescription() { @@ -200,7 +203,7 @@ function handleGetPrescription() { encounterIds: encounterIds, pageSize: 10000, pageNo: 1, - therapyEnum: therapyEnum.value, + therapyEnum: props.therapyEnum, exeStatus: props.exeStatus, requestStatus: props.requestStatus, }) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue index e9deacfa7..b8475ce2f 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue @@ -58,7 +58,7 @@ :clearable="false" @change="handleGetPrescription" /> - + 全部 长期 临时 @@ -79,6 +79,7 @@ :exeStatus="exeStatus" :requestStatus="requestStatus" :deadline="deadline" + :therapyEnum="therapyEnum" /> diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index a32de7131..de190fffb 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -12,7 +12,6 @@ drf.desc_json, drf.requester_id, drf.create_time, - drf.status, ap.NAME AS patient_name FROM doc_request_form AS drf LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id @@ -28,9 +27,6 @@ AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second') - - AND drf.status = #{status}::integer -