检查类型
| 曝光次数 |
费用套餐 |
- 金额 |
- 序号 |
+ 金额 |
+ 序号 |
服务范围 |
下级医技类型 |
备注 |
@@ -475,7 +476,7 @@
- {{ getCheckTypeLabel(item.checkType) || '无' }}
+ {{ getCheckTypeLabelForMethodPart(item.checkType) || '无' }}
@@ -503,6 +504,7 @@
filterable
clearable
:filter-method="filterPackageOptions"
+ @change="(val) => handlePackageChange(val, item)"
>
|
-
-
-
-
-
- {{ item.exposureNum || '0' }}
-
- |
@@ -534,25 +528,25 @@
|
-
+
{{ item.number || '999999' }}
|
-
+ |
-
+
- {{ getServiceScopeLabel(item.serviceScope) || '无' }}
+ {{ getCheckTypeLabelForMethodPart(item.checkType) || '无' }}
|
@@ -675,19 +669,47 @@ const checkTypeOptions = ref([]);
const serviceScopeDicts = ref([]);
const checkMethods = ref([]);
- // 根据字典值获取检查类型标签
+// 根据字典值获取检查类型标签
const getInspectionTypeLabel = (value) => {
const dictItem = inspectionTypeDicts.value.find(item => item.dictValue === value);
return dictItem ? dictItem.dictLabel : value;
};
- // 根据值从检查类型选项中获取标签
+ // 根据值从检查类型选项中获取标签(用于检查类型页面)
const getCheckTypeLabel = (value) => {
if (!value) return '';
const option = checkTypeOptions.value.find(item => item.value === 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 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 checkMethodData = reactive([]);
@@ -873,14 +907,14 @@ onMounted(async () => {
}));
}
- // 获取检查类型数据(从数据字典获取)
+ // 获取检查类型数据(从数据字典获取,用于检查类型页面)
const typeResponse = await getDicts('inspection_type');
if (typeResponse && typeResponse.data) {
// 保存完整的字典数据
inspectionTypeDicts.value = typeResponse.data;
// 从数据字典获取检查类型值
checkTypes.value = typeResponse.data.map(item => item.dictValue);
- // 从数据字典获取检查类型下拉选项
+ // 从数据字典获取检查类型下拉选项(用于检查类型页面的检查类型字段)
checkTypeOptions.value = typeResponse.data.map(item => ({
value: item.dictValue,
label: item.dictLabel,
@@ -892,6 +926,9 @@ onMounted(async () => {
inspectionTypeDicts.value = [];
}
+ // 从检查类型维护页面获取检查类型数据,用于检查方法和检查部位的下拉选项
+ await loadCheckTypeOptionsForMethodPart();
+
// 获取检查类型表格数据(分页获取)
await loadCheckTypeDataWithPagination();
@@ -2100,6 +2137,7 @@ th {
line-height: 24px;
text-align: center;
border-bottom: 2px solid #e8e8e8;
+ border-right: 1px solid #e8e8e8;
color: #1890FF;
letter-spacing: 0.3px;
}
@@ -2111,6 +2149,37 @@ td {
font-weight: 400;
line-height: 24px;
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;
}
|