diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php
index 7d6db00..010d881 100644
--- a/Laravel/app/Services/Admin/YeWu/PlanListService.php
+++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php
@@ -3060,6 +3060,10 @@ public function PreCheckYuYue($groups, $appointment_type, $do_type, $is_emergenc
date_default_timezone_set('PRC');
$nowdatetime = date("Y-m-d H:i:s");
+ // 读取执行科室提示配置
+ $deptCheckConfig = DB::table('configs')->where('label', '执行科室提示')->first();
+ $deptCheckEnabled = $deptCheckConfig ? $deptCheckConfig->value : '0';
+
$allList = [];
$hasMismatch = false;
$hasFail = false;
@@ -3296,6 +3300,7 @@ public function PreCheckYuYue($groups, $appointment_type, $do_type, $is_emergenc
}
return \Yz::Return(true, '检查完成', [
+ 'dept_check_enabled' => $deptCheckEnabled,
'has_mismatch' => $hasMismatch,
'has_fail' => $hasFail,
'list' => $allList,
diff --git a/YiJi-admin/src/components/Yewu/YuYue202506.vue b/YiJi-admin/src/components/Yewu/YuYue202506.vue
index 052c8f8..a063c78 100644
--- a/YiJi-admin/src/components/Yewu/YuYue202506.vue
+++ b/YiJi-admin/src/components/Yewu/YuYue202506.vue
@@ -244,12 +244,7 @@
{{ scope.row.check_msg }}
-
-
- 通过
- 失败
-
-
+
取消
@@ -1537,11 +1532,50 @@ let TanChuangMsgDialogVisible=ref(false)
return
}
- preCheckList.value = res.data.list || []
- preCheckHasMismatch.value = res.data.has_mismatch || false
- preCheckHasFail.value = res.data.has_fail || false
- preCheckDotype.value = type
- preCheckDialogVisible.value = true
+ // 第一层:判断执行科室提示配置
+ if (res.data.dept_check_enabled !== '1') {
+ // 配置未开启 → 直接弹简单确认框
+ const msg = type === 2 ? '确定改约至此时间吗?' : '确定预约此时间吗?'
+ ElMessageBox.confirm(msg, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }).then(() => {
+ startYuYue(type)
+ }).catch(() => {})
+ return
+ }
+
+ // 第二层:配置开启,走完整预检判断
+ if (res.data.has_fail) {
+ // 有校验失败 → 列表 dialog,仅展示失败信息,不可预约
+ preCheckList.value = res.data.list || []
+ preCheckHasMismatch.value = res.data.has_mismatch || false
+ preCheckHasFail.value = true
+ preCheckDotype.value = type
+ preCheckDialogVisible.value = true
+ return
+ }
+
+ if (res.data.has_mismatch) {
+ // 校验通过,但执行科室有变化 → 列表 dialog,让用户确认
+ preCheckList.value = res.data.list || []
+ preCheckHasMismatch.value = true
+ preCheckHasFail.value = false
+ preCheckDotype.value = type
+ preCheckDialogVisible.value = true
+ return
+ }
+
+ // 校验全通过,执行科室无变化 → 简单确认弹窗
+ const msg = type === 2 ? '确定改约至此时间吗?' : '确定预约此时间吗?'
+ ElMessageBox.confirm(msg, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }).then(() => {
+ startYuYue(type)
+ }).catch(() => {})
}
const startYuYue = async (type) => {
planLoading.value = true