188 检查项目设置-》检查部位:序号/服务范围字段的值重叠
187 检查项目设置-》检查部位:【新增】/【编辑】时选中费用套餐字段选项内容时系统未自动将套餐金额赋值给金额字段 189 检查项目设置-》检查部位:【新增】检查类型已选值点击【保存】提示“检查类型不能为空” 226 检查项目设置-》检查部位:筛选条件和表格的检查类型字段下拉选项取值错误
This commit is contained in:
@@ -219,7 +219,7 @@
|
|||||||
<label>检查类型</label>
|
<label>检查类型</label>
|
||||||
<el-select v-model="searchParamsMethod.checkType" placeholder="选择检查类型" style="width: 150px">
|
<el-select v-model="searchParamsMethod.checkType" placeholder="选择检查类型" style="width: 150px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in checkTypeOptions"
|
v-for="item in checkTypeOptionsForMethodPart"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
<template v-if="item.editing">
|
<template v-if="item.editing">
|
||||||
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
|
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in checkTypeOptions"
|
v-for="opt in checkTypeOptionsForMethodPart"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value"
|
:value="opt.value"
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ getCheckTypeLabel(item.checkType) || '无' }}
|
{{ getCheckTypeLabelForMethodPart(item.checkType) || '无' }}
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@@ -316,6 +316,7 @@
|
|||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
:filter-method="filterPackageOptions"
|
:filter-method="filterPackageOptions"
|
||||||
|
@change="(val) => handlePackageChange(val, item)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="pkg in filteredPackageOptions"
|
v-for="pkg in filteredPackageOptions"
|
||||||
@@ -390,7 +391,7 @@
|
|||||||
<label>检查类型</label>
|
<label>检查类型</label>
|
||||||
<el-select v-model="searchParamsPart.checkType" placeholder="选择检查类型" style="width: 150px">
|
<el-select v-model="searchParamsPart.checkType" placeholder="选择检查类型" style="width: 150px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in checkTypeOptions"
|
v-for="item in checkTypeOptionsForMethodPart"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -439,8 +440,8 @@
|
|||||||
<th style="width: 120px;">检查类型</th>
|
<th style="width: 120px;">检查类型</th>
|
||||||
<th style="width: 80px;">曝光次数</th>
|
<th style="width: 80px;">曝光次数</th>
|
||||||
<th style="width: 120px;">费用套餐</th>
|
<th style="width: 120px;">费用套餐</th>
|
||||||
<th style="width: 80px;">金额</th>
|
<th style="width: 100px;">金额</th>
|
||||||
<th style="width: 50px;">序号</th>
|
<th style="width: 100px;">序号</th>
|
||||||
<th style="width: 120px;">服务范围</th>
|
<th style="width: 120px;">服务范围</th>
|
||||||
<th style="width: 120px;">下级医技类型</th>
|
<th style="width: 120px;">下级医技类型</th>
|
||||||
<th style="width: 150px;">备注</th>
|
<th style="width: 150px;">备注</th>
|
||||||
@@ -475,7 +476,7 @@
|
|||||||
<template v-if="item.editing">
|
<template v-if="item.editing">
|
||||||
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
|
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in checkTypeOptions"
|
v-for="opt in checkTypeOptionsForMethodPart"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value"
|
:value="opt.value"
|
||||||
@@ -483,7 +484,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ getCheckTypeLabel(item.checkType) || '无' }}
|
{{ getCheckTypeLabelForMethodPart(item.checkType) || '无' }}
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -503,6 +504,7 @@
|
|||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
:filter-method="filterPackageOptions"
|
:filter-method="filterPackageOptions"
|
||||||
|
@change="(val) => handlePackageChange(val, item)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="pkg in filteredPackageOptions"
|
v-for="pkg in filteredPackageOptions"
|
||||||
@@ -516,14 +518,6 @@
|
|||||||
{{ item.packageName || '' }}
|
{{ item.packageName || '' }}
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<template v-if="item.editing">
|
|
||||||
<input type="number" min="0" placeholder="请输入曝光次数" v-model="item.exposureNum">
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
{{ item.exposureNum || '0' }}
|
|
||||||
</template>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<template v-if="item.editing">
|
<template v-if="item.editing">
|
||||||
<input type="number" step="0.01" min="0" placeholder="请输入金额" v-model="item.price">
|
<input type="number" step="0.01" min="0" placeholder="请输入金额" v-model="item.price">
|
||||||
@@ -534,7 +528,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<template v-if="item.editing">
|
<template v-if="item.editing">
|
||||||
<input type="number" min="0" placeholder="请输入序号" v-model="item.number">
|
<input type="text" placeholder="请输入序号" v-model="item.number">
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ item.number || '999999' }}
|
{{ item.number || '999999' }}
|
||||||
@@ -542,17 +536,17 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<template v-if="item.editing">
|
<template v-if="item.editing">
|
||||||
<el-select v-model="item.serviceScope" placeholder="选择服务范围" style="width: 100%">
|
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in serviceScopeDicts"
|
v-for="opt in checkTypeOptionsForMethodPart"
|
||||||
:key="dict.dictValue"
|
:key="opt.value"
|
||||||
:label="dict.dictLabel"
|
:label="opt.label"
|
||||||
:value="dict.dictValue"
|
:value="opt.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ getServiceScopeLabel(item.serviceScope) || '无' }}
|
{{ getCheckTypeLabelForMethodPart(item.checkType) || '无' }}
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -681,13 +675,41 @@ const checkTypeOptions = ref([]);
|
|||||||
return dictItem ? dictItem.dictLabel : value;
|
return dictItem ? dictItem.dictLabel : value;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据值从检查类型选项中获取标签
|
// 根据值从检查类型选项中获取标签(用于检查类型页面)
|
||||||
const getCheckTypeLabel = (value) => {
|
const getCheckTypeLabel = (value) => {
|
||||||
if (!value) return '';
|
if (!value) return '';
|
||||||
const option = checkTypeOptions.value.find(item => item.value === value);
|
const option = checkTypeOptions.value.find(item => item.value === value);
|
||||||
return option ? option.label : value;
|
return option ? option.label : value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 检查方法/检查部位专用的检查类型下拉选项(从检查类型维护获取)
|
||||||
|
const checkTypeOptionsForMethodPart = ref([]);
|
||||||
|
|
||||||
|
// 加载检查类型数据(用于检查方法和检查部位的下拉选项)
|
||||||
|
const loadCheckTypeOptionsForMethodPart = async () => {
|
||||||
|
try {
|
||||||
|
const allCheckTypesResponse = await getAllCheckTypes();
|
||||||
|
if (allCheckTypesResponse && allCheckTypesResponse.data) {
|
||||||
|
// 使用检查类型维护的 name 字段作为下拉选项
|
||||||
|
checkTypeOptionsForMethodPart.value = allCheckTypesResponse.data.map(item => ({
|
||||||
|
value: item.name,
|
||||||
|
label: item.name,
|
||||||
|
id: item.id,
|
||||||
|
code: item.code
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('获取检查类型列表失败', e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 根据值获取检查类型标签(用于检查方法/检查部位)
|
||||||
|
const getCheckTypeLabelForMethodPart = (value) => {
|
||||||
|
if (!value) return '';
|
||||||
|
const option = checkTypeOptionsForMethodPart.value.find(item => item.value === value);
|
||||||
|
return option ? option.label : value;
|
||||||
|
};
|
||||||
|
|
||||||
// 根据字典值获取服务范围标签
|
// 根据字典值获取服务范围标签
|
||||||
const getServiceScopeLabel = (value) => {
|
const getServiceScopeLabel = (value) => {
|
||||||
const dictItem = serviceScopeDicts.value.find(item => item.dictValue === value);
|
const dictItem = serviceScopeDicts.value.find(item => item.dictValue === value);
|
||||||
@@ -710,6 +732,18 @@ const filterPackageOptions = (query) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 处理费用套餐变更,自动赋值套餐金额到金额字段
|
||||||
|
const handlePackageChange = (packageName, item) => {
|
||||||
|
if (!packageName) {
|
||||||
|
item.price = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const selectedPackage = checkPackages.value.find(pkg => pkg.packageName === packageName);
|
||||||
|
if (selectedPackage && selectedPackage.packagePrice !== undefined) {
|
||||||
|
item.price = selectedPackage.packagePrice;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 表格数据 - 为每个菜单创建独立的数据存储
|
// 表格数据 - 为每个菜单创建独立的数据存储
|
||||||
const checkTypeData = reactive([]);
|
const checkTypeData = reactive([]);
|
||||||
const checkMethodData = reactive([]);
|
const checkMethodData = reactive([]);
|
||||||
@@ -873,14 +907,14 @@ onMounted(async () => {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取检查类型数据(从数据字典获取)
|
// 获取检查类型数据(从数据字典获取,用于检查类型页面)
|
||||||
const typeResponse = await getDicts('inspection_type');
|
const typeResponse = await getDicts('inspection_type');
|
||||||
if (typeResponse && typeResponse.data) {
|
if (typeResponse && typeResponse.data) {
|
||||||
// 保存完整的字典数据
|
// 保存完整的字典数据
|
||||||
inspectionTypeDicts.value = typeResponse.data;
|
inspectionTypeDicts.value = typeResponse.data;
|
||||||
// 从数据字典获取检查类型值
|
// 从数据字典获取检查类型值
|
||||||
checkTypes.value = typeResponse.data.map(item => item.dictValue);
|
checkTypes.value = typeResponse.data.map(item => item.dictValue);
|
||||||
// 从数据字典获取检查类型下拉选项
|
// 从数据字典获取检查类型下拉选项(用于检查类型页面的检查类型字段)
|
||||||
checkTypeOptions.value = typeResponse.data.map(item => ({
|
checkTypeOptions.value = typeResponse.data.map(item => ({
|
||||||
value: item.dictValue,
|
value: item.dictValue,
|
||||||
label: item.dictLabel,
|
label: item.dictLabel,
|
||||||
@@ -892,6 +926,9 @@ onMounted(async () => {
|
|||||||
inspectionTypeDicts.value = [];
|
inspectionTypeDicts.value = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 从检查类型维护页面获取检查类型数据,用于检查方法和检查部位的下拉选项
|
||||||
|
await loadCheckTypeOptionsForMethodPart();
|
||||||
|
|
||||||
// 获取检查类型表格数据(分页获取)
|
// 获取检查类型表格数据(分页获取)
|
||||||
await loadCheckTypeDataWithPagination();
|
await loadCheckTypeDataWithPagination();
|
||||||
|
|
||||||
@@ -2100,6 +2137,7 @@ th {
|
|||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-bottom: 2px solid #e8e8e8;
|
border-bottom: 2px solid #e8e8e8;
|
||||||
|
border-right: 1px solid #e8e8e8;
|
||||||
color: #1890FF;
|
color: #1890FF;
|
||||||
letter-spacing: 0.3px;
|
letter-spacing: 0.3px;
|
||||||
}
|
}
|
||||||
@@ -2111,6 +2149,37 @@ td {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
border-bottom: 1px solid #e8e8e8;
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
border-right: 1px solid #e8e8e8;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格内输入框样式 */
|
||||||
|
td input {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 8px;
|
||||||
|
border: 1px solid #D9D9D9;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
td input:focus {
|
||||||
|
border-color: #1890FF;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
td input[type="text"] {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 序号输入框特殊处理 */
|
||||||
|
td:nth-child(8) input {
|
||||||
|
width: 80px;
|
||||||
|
padding: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user