From a714f0a52642bca184eea09dc6233f24a7aa112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B1=95=E9=B9=8F?= Date: Tue, 9 Dec 2025 16:57:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=A2=84=E7=BA=A6=E7=B3=BB=E7=BB=9F):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=9C=8D=E5=A4=87=E6=B3=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=8F=8A=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在公告页面和预约管理页面添加客服备注功能 - 为客服备注添加专用样式区分于客户备注 - 实现通过模态框编辑和保存客服备注的AJAX功能 - 将原备注字段明确标记为客户备注 --- announcement.php | 36 +++++++++++++++++--- bookings.php | 87 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 117 insertions(+), 6 deletions(-) diff --git a/announcement.php b/announcement.php index 742abbb..b67aa05 100644 --- a/announcement.php +++ b/announcement.php @@ -245,6 +245,29 @@ try { font-size: 0.9rem; } + /* 客服备注样式 */ + .service-notes { + margin-top: 12px; + padding: 12px; + background-color: #f8f9fa; + border-left: 4px solid #007bff; + border-radius: 4px; + } + + .service-notes h4 { + margin-top: 0; + margin-bottom: 8px; + font-size: 14px; + color: #007bff; + } + + .service-notes p { + margin: 0; + font-size: 13px; + color: #495057; + line-height: 1.5; + } + .no-bookings { text-align: center; padding: 60px 20px; @@ -353,9 +376,6 @@ try { if (!empty($booking['services'])) { $services = explode(',', $booking['services']); } - if (!empty($booking['custom_services'])) { - $services[] = $booking['custom_services']; - } ?>
@@ -410,11 +430,19 @@ try {
+ + + +
+

客服备注:

+

+
+
- 备注 + 客户备注
diff --git a/bookings.php b/bookings.php index 73a7de6..d501be7 100644 --- a/bookings.php +++ b/bookings.php @@ -25,6 +25,13 @@ if (isset($_POST['action']) && isset($_POST['booking_id'])) { $stmt = $pdo->prepare("UPDATE bookings SET start_time = ?, end_time = ? WHERE id = ?"); $stmt->execute([$new_start_time, $new_end_time, $booking_id]); $success_message = '预约时间更新成功!'; + } elseif ($action == 'update_notes' && isset($_POST['notes_content'])) { + // 更新客服备注 + $notes_content = $_POST['notes_content']; + $stmt = $conn->prepare("UPDATE bookings SET custom_services = ? WHERE id = ?"); + $stmt->execute([$notes_content, $booking_id]); + echo 'success'; + exit(); } } catch (Exception $e) { $error_message = '更新失败:' . $e->getMessage(); @@ -214,10 +221,24 @@ try {
- 备注: + 客户备注:
+ + +
+ 客服备注: + + +
+ +
+ 客服备注: + + +
+
预约时间: @@ -262,6 +283,27 @@ try { 返回预约页面
+ + +