Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
wangjian963
2026-03-16 14:40:39 +08:00
2 changed files with 34 additions and 8 deletions

View File

@@ -486,6 +486,14 @@
{{ getCheckTypeLabel(item.checkType) || '' }}
</template>
</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>
<template v-if="item.editing">
<el-select
@@ -1221,13 +1229,29 @@ async function handleConfirm(index) {
ElMessage.error('名称不能为空');
return;
}
if (!item.type || item.type.trim() === '') {
ElMessage.error('检查类型不能为空');
return;
// 根据不同菜单验证检查类型字段
if (activeMenu.value === '检查方法') {
if (!item.checkType || item.checkType.trim() === '') {
ElMessage.error('检查类型不能为空');
return;
}
} else if (activeMenu.value === '检查类型') {
if (!item.type || item.type.trim() === '') {
ElMessage.error('检查类型不能为空');
return;
}
} else if (activeMenu.value === '检查部位') {
if (!item.checkType || item.checkType.trim() === '') {
ElMessage.error('检查类型不能为空');
return;
}
}
if (!item.department || item.department.trim() === '') {
ElMessage.error('执行科室不能为空');
return;
// 检查类型才需要验证执行科室
if (activeMenu.value === '检查类型') {
if (!item.department || item.department.trim() === '') {
ElMessage.error('执行科室不能为空');
return;
}
}
try {