From e8096892892ebb80116d5837ad3cef23fe7abf9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Thu, 14 May 2026 00:18:24 +0800 Subject: [PATCH 1/5] =?UTF-8?q?Fix=20Bug=20#403:=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=EF=BC=9A=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=8C=BB=E5=98=B1=E7=BB=84=E5=A5=97=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E8=8D=AF=E5=93=81=E6=98=8E=E7=BB=86=E5=AD=97=E6=AE=B5=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=A2=E5=A4=B1=E6=9C=AA=E6=AD=A3=E7=A1=AE=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因分析: 1. orderGroupDrawer.vue 中 handleUseOrderGroup 的 mergedDetail 对象缺少 categoryCode、minUnitCode、doseUnitCode、partPercent、partAttributeEnum、 unitConversionRatio、defaultLotNumber 等关键字段,导致 setValue 和价格计算逻辑失效 2. 使用 || 替代 ?? 作为数字字段(如 doseQuantity=0)的回退操作符,导致值为 0 时被错误覆盖 3. handleSaveGroup 中价格计算使用 item.unitCode 查找 unitInfo,但 item.unitCode 可能为 undefined,而 setValue 已正确填充了 prescriptionList 中的 unitCode 修复内容: - mergedDetail 先展开 orderDetail(包含所有药品基础字段),再用组套用户覆盖值覆盖 - 所有数字字段回退从 || 改为 ??,确保 0 值不被覆盖 - 新增 doseQuantity 的 ?? 回退逻辑到 orderDetail.doseQuantity - 新增 groupId、groupOrder、orgId、orgName、therapyEnum 到 mergedDetail - handleSaveGroup 使用 baseRow 变量避免对象自引用问题 - 价格计算使用 newRow.unitCode(已由 setValue 填充)而非 item.unitCode Co-Authored-By: Claude Opus 4.7 --- .../prescription/orderGroupDrawer.vue | 40 ++++++++++++------- .../home/components/order/index.vue | 38 +++++++++++------- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/orderGroupDrawer.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/orderGroupDrawer.vue index b50c63a81..21d059bb4 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/orderGroupDrawer.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/orderGroupDrawer.vue @@ -589,36 +589,46 @@ function handleUseOrderGroup(row) { minUnitPrice: orderDetail.minUnitPrice, inventoryList: orderDetail.inventoryList || [], priceList: orderDetail.priceList || [], - partPercent: orderDetail.partPercent || 1, + partPercent: orderDetail.partPercent ?? 1, + partAttributeEnum: orderDetail.partAttributeEnum, + unitConversionRatio: orderDetail.unitConversionRatio, // 🔧 Bug #218 修复:positionId 可能存储在 item 本身,优先使用 item.positionId - positionId: item.positionId || orderDetail.positionId, + positionId: item.positionId ?? orderDetail.positionId, defaultLotNumber: orderDetail.defaultLotNumber, // 单位信息 - unitCode: item.unitCode || orderDetail.unitCode, + unitCode: item.unitCode ?? orderDetail.unitCode, + categoryCode: item.categoryCode ?? orderDetail.categoryCode, unitCodeName: item.unitCodeName || orderDetail.unitCode_dictText, minUnitCode: orderDetail.minUnitCode, doseUnitCode: orderDetail.doseUnitCode, // 合并后的完整对象(用于 setValue) + // 先展开 orderDetail 获取所有药品基础字段(categoryCode、minUnitCode、doseUnitCode、 + // partPercent、partAttributeEnum、unitConversionRatio、defaultLotNumber 等), + // 再用组套用户覆盖值覆盖,确保单次剂量/频次/用法/用药天数/总量等不被丢失 mergedDetail: { ...orderDetail, adviceName: orderDetail.adviceName || item.orderDefinitionName || '未知项目', adviceType: orderDetail.adviceType, quantity: item.quantity, - unitCode: item.unitCode || orderDetail.unitCode, + unitCode: item.unitCode ?? orderDetail.unitCode, + categoryCode: item.categoryCode ?? orderDetail.categoryCode, unitCodeName: item.unitCodeName, - dose: item.dose || orderDetail.dose, - rateCode: item.rateCode || orderDetail.rateCode, - methodCode: item.methodCode || orderDetail.methodCode, - dispensePerDuration: item.dispensePerDuration || orderDetail.dispensePerDuration, - doseQuantity: item.doseQuantity, - inventoryList: orderDetail.inventoryList || [], - priceList: orderDetail.priceList || [], - partPercent: orderDetail.partPercent || 1, - // 🔧 Bug #218 修复:positionId 可能存储在 item 本身,优先使用 item.positionId - positionId: item.positionId || orderDetail.positionId, - defaultLotNumber: orderDetail.defaultLotNumber, + dose: item.dose ?? orderDetail.dose, + rateCode: item.rateCode ?? orderDetail.rateCode, + methodCode: item.methodCode ?? orderDetail.methodCode, + dispensePerDuration: item.dispensePerDuration ?? orderDetail.dispensePerDuration, + doseQuantity: item.doseQuantity ?? orderDetail.doseQuantity, + // 🔧 Bug #218 / #403 修复:positionId 可能存储在 item 本身,优先使用 item.positionId + positionId: item.positionId ?? orderDetail.positionId, + // 执行科室:优先使用组套明细中保存的 orgId + orgId: item.orgId ?? orderDetail.orgId, + orgName: item.orgName ?? orderDetail.orgName, + // 组号(保留组套中的分组信息) + groupId: item.groupId, + groupOrder: item.groupOrder, + therapyEnum: item.therapyEnum ?? orderDetail.therapyEnum ?? '1', } }; }); 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 82aa40277..2db56ab37 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 @@ -1639,20 +1639,14 @@ function handleSaveGroup(orderGroupList) { // 创建新的处方项目 // 🔧 Bug #403 修复:关键字段使用 null-safe 回退到 mergedDetail(已由 setValue 填充完整数据) + // 先取 setValue 填充的行数据作为基础 + const baseRow = prescriptionList.value[rowIndex.value]; const newRow = { - ...prescriptionList.value[rowIndex.value], + ...baseRow, patientId: patientInfo.value.patientId, encounterId: patientInfo.value.encounterId, accountId: accountId.value, - quantity: item.quantity ?? mergedDetail.quantity, - methodCode: item.methodCode ?? mergedDetail.methodCode, - rateCode: item.rateCode ?? mergedDetail.rateCode, - dispensePerDuration: item.dispensePerDuration ?? mergedDetail.dispensePerDuration, - dose: item.dose ?? mergedDetail.dose, - doseQuantity: item.doseQuantity ?? mergedDetail.doseQuantity, executeNum: 1, - unitCode: item.unitCode ?? mergedDetail.unitCode, - unitCode_dictText: item.unitCodeName || mergedDetail.unitCodeName || '', statusEnum: 1, orgId: resolveOrgId(item.orderDetailInfos?.orgId || mergedDetail.orgId || patientInfo.value?.inHospitalOrgId) || '', // 🔧 修复:同时保存 orgName,确保树匹配不到时仍有中文名称可显示 @@ -1661,19 +1655,33 @@ function handleSaveGroup(orderGroupList) { conditionId: conditionId.value, conditionDefinitionId: conditionDefinitionId.value, encounterDiagnosisId: encounterDiagnosisId.value, - therapyEnum: prescriptionList.value[rowIndex.value]?.therapyEnum || '1', + therapyEnum: baseRow?.therapyEnum || '1', }; + // 覆盖关键字段:优先使用 item 的值,其次 mergedDetail(已由 setValue 填充),最后 baseRow + newRow.quantity = item.quantity ?? mergedDetail.quantity ?? baseRow.quantity; + newRow.methodCode = item.methodCode ?? mergedDetail.methodCode ?? baseRow.methodCode; + newRow.rateCode = item.rateCode ?? mergedDetail.rateCode ?? baseRow.rateCode; + newRow.dispensePerDuration = item.dispensePerDuration ?? mergedDetail.dispensePerDuration ?? baseRow.dispensePerDuration; + newRow.dose = item.dose ?? mergedDetail.dose ?? baseRow.dose; + newRow.doseQuantity = item.doseQuantity ?? mergedDetail.doseQuantity ?? baseRow.doseQuantity; + newRow.unitCode = item.unitCode ?? mergedDetail.unitCode ?? baseRow.unitCode; + newRow.unitCode_dictText = item.unitCodeName || mergedDetail.unitCodeName || baseRow.unitCode_dictText || ''; // 计算价格和总量 - const unitInfo = unitCodeList.value.find((k) => k.value == item.unitCode); + // 🔧 Bug #403 修复:使用 newRow.unitCode(已由 setValue 填充)而非 item.unitCode + // 使用 ?? 替代 || 计算 partPercent,确保值为 0 时不会被错误替换 + const finalUnitCode = newRow.unitCode; + const unitInfo = unitCodeList.value.find((k) => k.value == finalUnitCode); + const finalQuantity = newRow.quantity; + const partPercent = item.orderDetailInfos?.partPercent ?? mergedDetail.partPercent ?? baseRow.partPercent ?? 1; if (unitInfo && unitInfo.type == 'minUnit') { newRow.price = newRow.minUnitPrice; - newRow.totalPrice = (item.quantity * newRow.minUnitPrice).toFixed(6); - newRow.minUnitQuantity = item.quantity; + newRow.totalPrice = ((finalQuantity || 0) * newRow.minUnitPrice).toFixed(6); + newRow.minUnitQuantity = finalQuantity || 0; } else { newRow.price = newRow.unitPrice; - newRow.totalPrice = (item.quantity * newRow.unitPrice).toFixed(6); - newRow.minUnitQuantity = item.quantity * (item.orderDetailInfos?.partPercent || mergedDetail.partPercent || 1); + newRow.totalPrice = ((finalQuantity || 0) * newRow.unitPrice).toFixed(6); + newRow.minUnitQuantity = (finalQuantity || 0) * partPercent; } newRow.contentJson = JSON.stringify(newRow); From 23185eb8a0c5b0b7f7bd8a69c9b136f3c68c513b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Thu, 14 May 2026 00:20:09 +0800 Subject: [PATCH 2/5] =?UTF-8?q?Fix=20Bug=20#448:=20=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=88=92=E4=BB=B7=E6=A8=A1=E5=9D=97-=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E8=BF=87=E6=BB=A4=E5=A4=B1=E6=95=88=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9"=E8=80=97=E6=9D=90"=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=E4=BB=8D=E8=83=BD=E6=A3=80=E7=B4=A2=E5=87=BA=E8=8D=AF?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:getList() 直接发送 queryParams.value 到后端,其中包含 undefined 值的 属性(如 adviceType 未选择时)。后端接收 adviceType=null 后回退到查询所有类型 (List.of(1,2,3)),导致药品出现在耗材的搜索结果中。 修复:显式构建 requestParams 对象,仅包含已定义的过滤参数(adviceType、 categoryCode、searchKey),避免 undefined 值被发送到后端。 Co-Authored-By: Claude Opus 4.7 --- .../bargain/component/adviceBaseList.vue | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue index ad9802dca..e7194cda5 100755 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue @@ -115,22 +115,44 @@ function getList() { console.log('[adviceBaseList] getList() 跳过:未选择患者'); return; // 不执行API调用 } - + // 只有在弹窗打开时才执行查询 if (!props.popoverVisible) { console.log('[adviceBaseList] getList() 跳过:弹窗未打开'); return; } - - queryParams.value.organizationId = props.patientInfo.orgId; - console.log('[adviceBaseList] getList() 请求参数:', JSON.stringify(queryParams.value)); - - getAdviceBaseInfo(queryParams.value).then((res) => { + + // 🔧 Bug #448 修复:显式构建请求参数,确保 adviceType 正确传递 + // 不直接使用 queryParams.value,避免 undefined 值被发送到后端导致过滤失效 + const requestParams = { + pageSize: queryParams.value.pageSize, + pageNum: queryParams.value.pageNum, + organizationId: props.patientInfo.orgId, + }; + + // 只在 adviceType 有值时添加(0 是无效值,undefined/null 会导致后端查询所有类型) + if (queryParams.value.adviceType != null && queryParams.value.adviceType !== 0) { + requestParams.adviceType = queryParams.value.adviceType; + } + + // 只在 categoryCode 有值时添加 + if (queryParams.value.categoryCode) { + requestParams.categoryCode = queryParams.value.categoryCode; + } + + // 只在 searchKey 有值时添加 + if (queryParams.value.searchKey) { + requestParams.searchKey = queryParams.value.searchKey; + } + + console.log('[adviceBaseList] getList() 请求参数:', JSON.stringify(requestParams)); + + getAdviceBaseInfo(requestParams).then((res) => { console.log('[adviceBaseList] getList() 响应数据:', { total: res.data?.total, recordsCount: res.data?.records?.length || 0, firstRecord: res.data?.records?.[0]?.adviceName || '无数据', - adviceType: queryParams.value.adviceType + adviceType: requestParams.adviceType }); adviceBaseList.value = res.data.records || []; total.value = res.data.total || 0; From 251920aabdb1f4fb73dc78dd88b77e845ae144e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 00:25:06 +0800 Subject: [PATCH 3/5] =?UTF-8?q?Fix=20Bug=20#446:=20=E3=80=90=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E7=AE=A1=E7=90=86-=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=AE=89=E6=8E=92=E3=80=91=E4=B8=B4=E6=97=B6=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E7=94=9F=E6=88=90=E5=90=8E=E7=95=8C=E9=9D=A2=E9=9D=9E?= =?UTF-8?q?=E6=B3=95=E5=85=B3=E9=97=AD=E4=B8=94=E6=8C=89=E9=92=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0/=E5=8A=9F=E8=83=BD=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 isSignedProp 父组件状态变化未同步到子组件本地 isSigned ref 的问题。 ref(props.isSignedProp) 仅在组件初始化时读取一次,父组件后续更新 temporarySigned 时子组件的 isSigned 不会自动更新,导致按钮文本和签名状态显示不一致。 添加 watch 监听 isSignedProp 变化,确保父子组件签名状态同步。 Co-Authored-By: Claude Opus 4.7 --- .../src/views/surgicalschedule/temporaryMedical.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/temporaryMedical.vue b/openhis-ui-vue3/src/views/surgicalschedule/temporaryMedical.vue index 51def6e1d..14b58b516 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/temporaryMedical.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/temporaryMedical.vue @@ -312,6 +312,13 @@ const getMethodCodeDict = computed(() => { // 响应式数据 - isSigned 从父组件传入的 prop 初始化 const isSigned = ref(props.isSignedProp) + +// 🔧 修复 Bug #446: 同步父组件 isSignedProp 的变化到本地 isSigned +// ref(props.isSignedProp) 只在初始化时读取一次,父组件后续更新不会自动同步 +watch(() => props.isSignedProp, (newVal) => { + isSigned.value = newVal +}) + const signatureTime = ref('') const showSignDialog = ref(false) const signPassword = ref('') From 7e0651cf4c04048b0a2d2a08579018af450a8a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 01:06:29 +0800 Subject: [PATCH 4/5] =?UTF-8?q?Fix=20Bug=20#441:=20=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E6=89=8B=E6=9C=AF=E5=AE=89=E6=8E=92=EF=BC=9A=E6=89=8B=E6=9C=AF?= =?UTF-8?q?=E5=AE=A4=E6=8A=A4=E5=A3=AB=E8=A7=92=E8=89=B2=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8F=90=E7=A4=BA"=E6=97=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90"=E4=B8=94"=E8=8E=B7=E5=8F=96=E5=8D=AB=E7=94=9F?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E5=88=97=E8=A1=A8=E5=A4=B1=E8=B4=A5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:loadDeptList/loadDoctorList/loadNurseList/loadOperatingRoomList 调用的API 没有设置 skipErrorMsg: true,当手术室护士等角色无权限时,axios响应拦截器会 弹出错误提示。只有 getTenantPageSilent 设置了 skipErrorMsg,其他均未设置。 修复:为所有字典加载API创建静默包装函数(deptTreeSelectSilent/listUserSilent/ listOperatingRoomSilent),统一使用 skipErrorMsg: true 跳过拦截器错误弹窗, 在 catch 块中静默降级为空数组。 --- .../src/views/surgicalschedule/index.vue | 43 +++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index c8f2f6640..3da81ff71 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -881,16 +881,13 @@ import { deleteSurgerySchedule, getSurgeryScheduleDetail } from '@/api/surgicalschedule' -import { listUser } from '@/api/system/user' -import { deptTreeSelect } from '@/api/system/user' -import { listOperatingRoom } from '@/api/operatingroom' import { getSurgeryPage} from '@/views/inpatientDoctor/home/components/applicationShow/api.js' import { getContract } from '@/views/inpatientDoctor/home/components/api.js' import request from '@/utils/request' import SurgeryCharge from '../charge/surgerycharge/index.vue' import TemporaryMedical from './temporaryMedical.vue' -// 静默获取卫生机构列表(跳过拦截器错误提示,手术室护士等角色可能无此权限) +// 静默获取字典列表(跳过拦截器错误提示,手术室护士等角色可能无此权限) function getTenantPageSilent(query) { return request({ url: '/system/tenant/page', @@ -900,6 +897,36 @@ function getTenantPageSilent(query) { }) } +// 静默获取科室树(跳过拦截器错误提示) +function deptTreeSelectSilent(params = {}) { + return request({ + url: '/base-data-manage/organization/organization', + method: 'get', + params: { typeEnum: 2, ...params }, + skipErrorMsg: true + }) +} + +// 静默获取用户列表(跳过拦截器错误提示) +function listUserSilent(query) { + return request({ + url: '/base-data-manage/practitioner/user-practitioner-page', + method: 'get', + params: query, + skipErrorMsg: true + }) +} + +// 静默获取手术室列表(跳过拦截器错误提示) +function listOperatingRoomSilent(query) { + return request({ + url: '/base-data-manage/operating-room/list', + method: 'get', + params: query, + skipErrorMsg: true + }) +} + const { proxy } = getCurrentInstance() const userStore = useUserStore() const loading = ref(true) @@ -1148,7 +1175,7 @@ function loadOrgList() { // 加载科室列表 function loadDeptList() { - deptTreeSelect() + deptTreeSelectSilent() .then(res => { if (res.code === 200) { const tree = res.data?.records || res.data || [] @@ -1168,7 +1195,7 @@ function loadDeptList() { // 加载医生列表 function loadDoctorList() { - listUser({ pageNo: 1, pageSize: 1000 }) + listUserSilent({ pageNo: 1, pageSize: 1000 }) .then(res => { if (res.code === 200) { const records = res.data?.records || [] @@ -1188,7 +1215,7 @@ function loadDoctorList() { // 加载护士列表 function loadNurseList() { - listUser({ pageNo: 1, pageSize: 1000 }) + listUserSilent({ pageNo: 1, pageSize: 1000 }) .then(res => { if (res.code === 200) { const records = res.data?.records || [] @@ -1208,7 +1235,7 @@ function loadNurseList() { // 加载手术室列表 function loadOperatingRoomList() { - listOperatingRoom({ pageNo: 1, pageSize: 1000, statusEnum: 1 }) + listOperatingRoomSilent({ pageNo: 1, pageSize: 1000, statusEnum: 1 }) .then(res => { if (res.code === 200) { const records = res.data?.records || [] From db84aa384699b33567eb96051cf560f9b51f4631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Thu, 14 May 2026 01:11:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?Fix=20Bug=20#444:=20=E3=80=90=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E7=AE=A1=E7=90=86-=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=AE=89=E6=8E=92=E3=80=91=E7=94=9F=E6=88=90=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E5=8C=BB=E5=98=B1=E7=95=8C=E9=9D=A2=EF=BC=8C"?= =?UTF-8?q?=E5=B7=B2=E5=BC=95=E7=94=A8=E8=AE=A1=E8=B4=B9=E8=8D=AF=E5=93=81?= =?UTF-8?q?"=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4=E9=9D=9E=E8=8D=AF?= =?UTF-8?q?=E5=93=81=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因分析: - 后端 /doctor-station/advice/request-base-info 接口返回所有类型的医嘱请求数据 - adviceType 字段区分:1=药品, 2=耗材, 3=诊疗项目 - 前端 handleMedicalAdvice 和 handleQuoteBilling 两处过滤逻辑均未按 adviceType 过滤 - 导致手术诊疗项目(如"小腿烧伤扩创交腿皮瓣修复术")和检查项目(如"心脏彩色多普勒超声")出现在"已引用计费药品"列表中 修复方案: - 在两处 filter 中增加 adviceType !== 1 的过滤条件,只保留药品类型数据 --- openhis-ui-vue3/src/views/surgicalschedule/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index 3da81ff71..3598edc04 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -1540,6 +1540,8 @@ function handleMedicalAdvice(row) { const filteredItems = res.data.filter(item => { // 匹配 encounterId if (item.encounterId !== row.visitId) return false; + // 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) + if (item.adviceType !== 1) return false; // 过滤掉名称为空的项目 const medicineName = item.adviceName || item.advice_name; if (!medicineName || medicineName.trim() === '') return false; @@ -1798,10 +1800,12 @@ function handleQuoteBilling() { temporaryBillingMedicines.value = [] temporaryAdvices.value = [] - // 🔧 修复:显示所有药品请求数据,不管有没有计费项目 + // 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) const filteredItems = res.data.filter(item => { // 匹配 encounterId if (item.encounterId !== temporaryPatientInfo.value.visitId) return false; + // 只保留药品类型(adviceType=1),过滤掉耗材(2)和诊疗项目(3) + if (item.adviceType !== 1) return false; // 过滤掉名称为空的项目 const medicineName = item.adviceName || item.advice_name; return medicineName && medicineName.trim() !== '';