检验项目设置-检验类型的实现

This commit is contained in:
2026-01-04 13:50:05 +08:00
parent 5d82800976
commit ddf1553846
3 changed files with 60 additions and 16 deletions

View File

@@ -79,6 +79,7 @@
clearable
filterable
:disabled="form.isEditInfoDisable === 1"
no-data-text=""
>
<el-option
v-for="category in activity_category_code"
@@ -91,7 +92,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="业务类型" prop="typeEnum">
<el-select v-model="form.typeEnum" placeholder="" clearable filterable>
<el-select v-model="form.typeEnum" placeholder="" clearable filterable no-data-text="">
<el-option
v-for="item in typeEnumOptions"
:key="item.value"
@@ -130,6 +131,7 @@
filterable
style="width: 240px"
:disabled="form.isEditInfoDisable === 1 || form.isEditInfoDisable === 2"
no-data-text=""
>
<el-option
v-for="dict in med_chrgitm_type"
@@ -161,7 +163,7 @@
<el-col :span="8">
<el-form-item label="所需标本" prop="specimenCode">
<el-select v-model="form.specimenCode" clearable filterable>
<el-select v-model="form.specimenCode" clearable filterable no-data-text="">
<el-option
v-for="category in specimen_code"
:key="category.value"
@@ -181,6 +183,7 @@
clearable
filterable
:disabled="form.isEditInfoDisable === 1"
no-data-text=""
>
<el-option
v-for="item in chrgitm_lv"
@@ -194,9 +197,14 @@
<el-col :span="8">
<el-form-item label="使用单位" prop="permittedUnitCode">
<el-select v-model="form.permittedUnitCode" clearable filterable>
<el-select
v-model="form.permittedUnitCode"
clearable
filterable
:filter-method="filterUnitCode"
>
<el-option
v-for="category in unit_code"
v-for="category in isFilteringUnitCode ? filteredUnitCode : unit_code"
:key="category.value"
:label="category.label"
:value="category.value"
@@ -206,7 +214,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="财务类型" prop="itemTypeCode">
<el-select v-model="form.itemTypeCode" clearable filterable>
<el-select v-model="form.itemTypeCode" clearable filterable no-data-text="">
<!-- :disabled="form.isEditInfoDisable === 1" -->
<el-option
@@ -384,6 +392,10 @@ const statusFlagOptions = ref(undefined);
const exeOrganizations = ref(undefined);
const typeEnumOptions = ref(undefined);
const diagnosisTreatmentList = ref([]);
// 使用单位过滤后的选项
const filteredUnitCode = ref([]);
// 标记是否正在进行过滤查询
const isFilteringUnitCode = ref(false);
const data = reactive({
form: {},
@@ -489,6 +501,9 @@ function show() {
getBodyTree();
getDeptTree();
getItemList();
// 重置使用单位过滤
filteredUnitCode.value = [];
isFilteringUnitCode.value = false;
title.value = '';
title.value = props.title;
@@ -517,6 +532,9 @@ function edit() {
getBodyTree();
getDeptTree();
getItemList();
// 重置使用单位过滤
filteredUnitCode.value = [];
isFilteringUnitCode.value = false;
title.value = '';
title.value = props.title;
form.value = props.item;
@@ -682,6 +700,23 @@ function updatePrices(value) {
form.value.maximumRetailPrice = form.value.retailPrice;
}
// 使用单位过滤函数
function filterUnitCode(query) {
if (!query || query.trim() === '') {
// 查询为空时,重置过滤状态,显示所有选项
isFilteringUnitCode.value = false;
filteredUnitCode.value = [];
return;
}
// 有查询内容时,进行过滤
isFilteringUnitCode.value = true;
const queryLower = query.toLowerCase().trim();
filteredUnitCode.value = unit_code.value.filter((item) => {
const label = item.label || '';
return label.toLowerCase().includes(queryLower);
});
}
// 监听treatmentItems变化实时更新总价
watch(
() => treatmentItems.value,

View File

@@ -117,7 +117,7 @@
</el-descriptions-item>
</el-descriptions>
</div>
<div style="padding: 10px">
<div style="padding: 10px; position: relative">
<el-tabs
type="card"
style="width: 100%; height: 100%"
@@ -729,12 +729,14 @@ const onHospitalization = async () => {
.disabled-wrapper .overlay {
position: absolute;
top: 0;
top: 50px;
left: 0;
width: 100%;
height: 100%;
height: calc(100% - 50px);
z-index: 999;
/* 确保覆盖在内容上方 */
/* 确保覆盖在内容上方,但不覆盖顶部按钮区域 */
cursor: not-allowed;
background-color: rgba(255, 255, 255, 0.01);
pointer-events: auto;
}
</style>

View File

@@ -88,7 +88,6 @@
v-for="(item, index) in tableData"
:key="index"
:class="{ 'editing-row': item.editing, 'child-row': item.row.includes('.') }"
@click="handleEdit(index)"
>
<td>{{ item.row }}</td>
<td>
@@ -169,10 +168,13 @@
</template>
</td>
<td class="actions">
<template v-if="item.actions">
<template v-if="item.editing">
<button class="btn btn-confirm" @click.stop="handleConfirm(index)" title="保存">
</button>
<button class="btn btn-cancel" @click.stop="handleCancelEdit(index)" title="取消">
</button>
<button
v-if="!item.row.includes('.')"
class="btn btn-add"
@@ -181,13 +183,18 @@
>
+
</button>
<button class="btn btn-delete" @click.stop="handleDelete(index)" title="删除">
</button>
</template>
<template v-else>
<button class="btn btn-confirm" @click.stop="handleConfirm(index)" title="保存">
<button class="btn btn-edit" @click.stop="handleEdit(index)" title="修改">
</button>
<button
v-if="!item.row.includes('.')"
class="btn btn-add"
@click.stop="handleAdd(index)"
title="添加子项"
>
+
</button>
<button class="btn btn-delete" @click.stop="handleDelete(index)" title="删除">