From 1fdaafb1e8de355c48339480c28b1460cccb42f9 Mon Sep 17 00:00:00 2001 From: duzhongxu <15039018447@163.com> Date: Fri, 20 Mar 2026 10:22:53 +0800 Subject: [PATCH] =?UTF-8?q?202=20=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE-=E3=80=8B=E6=A3=80=E9=AA=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=9A=E7=82=B9=E5=87=BB=E3=80=90=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E3=80=91=E6=8C=89=E9=92=AE=E6=A3=80=E9=AA=8C=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=9A=84=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/maintainSystem/Inspection/index.vue | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue index 1819c81f..e9d1e8dc 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue @@ -1061,10 +1061,6 @@ const handlePackageVisibleChange = (visible) => { // 可选:如果希望页面一打开就预加载一次,保留 onMounted // 如果希望完全由用户点击触发,可以注释掉 onMounted -onMounted(() => { - // getFeePackages(); -}); - // ============================== // 【修复】级联下拉框逻辑 (包含直接请求代码) @@ -1190,9 +1186,7 @@ const handleEditRow = (row) => { }; onMounted(() => { - // ... 其他初始化代码 - loadParentTypes(); // <--- 确保这一行存在 - // ... + loadParentTypes(); }); @@ -1334,8 +1328,8 @@ const packageFilter = ref(''); // 过滤后的检验项目数据(仅保留费用套餐的前端过滤,其他过滤已由后端处理) const filteredInspectionItems = computed(() => { return inspectionItems.value.filter(item => { - // 按费用套餐过滤(费用套餐是前端自定义字段,需要前端过滤) - if (packageFilter.value && item.package !== packageFilter.value) { + // 按费用套餐过滤(用 feePackageId 与选中的套餐 id 比对) + if (packageFilter.value && String(item.feePackageId) !== String(packageFilter.value)) { return false; } return true; @@ -1888,7 +1882,7 @@ const addNewItem = () => { amount: 0.00, sortOrder: inspectionItems.value.length + 1, serviceRange: '全部', - sub医技Type: '', + subItemName: '', remark: '', status: true }; @@ -2058,8 +2052,8 @@ const deleteItem = async (id) => { }; const cancelEdit = (item) => { - // 如果是新添加的行,则直接删除 - if (item.id.toString().length > 10) { // 临时ID,使用Date.now()生成 + // 如果是新添加的行,则直接删除(临时ID为数字类型) + if (typeof item.id === 'number') { const index = inspectionItems.value.findIndex(i => i.id === item.id); if (index !== -1) { inspectionItems.value.splice(index, 1);