From 7699397bdacbdcefa7e67c1a1810cb247eaecbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Fri, 26 Sep 2025 16:13:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B7=9F=E9=80=B2=E6=8F=90?= =?UTF-8?q?=E9=86=92=E5=92=8C=E5=BE=85=E8=BE=A6=E4=BA=8B=E9=A0=85=E6=A8=A1?= =?UTF-8?q?=E6=85=8B=E6=A1=86=E5=8A=9F=E8=83=BD=EF=BC=9A=E5=9C=A8=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E7=AA=97=E5=8F=A3=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=9B=B8?= =?UTF-8?q?=E6=87=89=E7=9A=84=E7=8B=80=E6=85=8B=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=99=95=E7=90=86=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E7=94=A8=E6=88=B6=E4=BA=92=E5=8B=95=E9=AB=94=E9=A9=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FollowupReminderModal/index.module.scss | 224 +++++++++++++++ .../FollowupReminderModal/index.tsx | 251 +++++++++++++++++ .../TodoListModal/index.module.scss | 266 ++++++++++++++++++ .../components/TodoListModal/index.tsx | 251 +++++++++++++++++ .../weChat/components/ChatWindow/index.tsx | 53 +++- 5 files changed, 1038 insertions(+), 7 deletions(-) create mode 100644 Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.module.scss create mode 100644 Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.tsx create mode 100644 Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/TodoListModal/index.module.scss create mode 100644 Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/TodoListModal/index.tsx diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.module.scss b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.module.scss new file mode 100644 index 00000000..35ce75ed --- /dev/null +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.module.scss @@ -0,0 +1,224 @@ +// 跟进提醒模态框样式 +.followupModal { + :global(.ant-modal-header) { + border-bottom: none; + padding: 16px 20px 0 20px; + } + + :global(.ant-modal-body) { + padding: 0 20px 20px 20px; + max-height: 60vh; + overflow: hidden; + } + + :global(.ant-modal-close) { + top: 12px; + right: 12px; + } +} + +.modalHeader { + .modalTitle { + font-size: 16px; + font-weight: 600; + color: #262626; + margin: 0; + } + + .modalSubtitle { + font-size: 12px; + color: #8c8c8c; + margin: 2px 0 0 0; + } +} + +.modalContent { + display: flex; + flex-direction: column; + height: 100%; + + .addReminderSection { + margin-bottom: 16px; + padding: 16px; + background: #fafafa; + border-radius: 6px; + border: 1px solid #f0f0f0; + flex-shrink: 0; + + .reminderForm { + .formRow { + display: flex; + gap: 12px; + margin-bottom: 12px; + + .formItem { + flex: 1; + margin-bottom: 0; + + :global(.ant-form-item-label) { + padding-bottom: 4px; + + label { + font-size: 14px; + font-weight: 500; + color: #262626; + } + } + } + } + + .selectInput, + .dateInput, + .contentInput { + border: 1px solid #d9d9d9; + border-radius: 6px; + transition: all 0.3s; + + &:hover { + border-color: #40a9ff; + } + + &:focus, + &:focus-within { + border-color: #40a9ff; + box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); + } + } + + .contentInput { + resize: none; + } + + .addButton { + height: 36px; + border-radius: 6px; + font-size: 13px; + font-weight: 500; + background: #1890ff; + border-color: #1890ff; + box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2); + + &:hover { + background: #40a9ff; + border-color: #40a9ff; + transform: translateY(-1px); + box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3); + } + + .anticon { + margin-right: 4px; + } + } + } + } + + .remindersList { + flex: 1; + overflow-y: auto; + max-height: 200px; + border: 1px solid #f0f0f0; + border-radius: 6px; + background: #fff; + + :global(.ant-list) { + padding: 0; + } + + :global(.ant-list-item) { + padding: 12px 16px; + border-bottom: 1px solid #f0f0f0; + + &:last-child { + border-bottom: none; + } + } + + .reminderItem { + padding: 10px; + + .reminderContent { + width: 100%; + + .reminderHeader { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 6px; + + .typeTag { + font-size: 11px; + padding: 1px 6px; + border-radius: 10px; + font-weight: 500; + + .anticon { + margin-right: 3px; + } + } + + .recipient { + font-size: 12px; + color: #595959; + font-weight: 500; + } + } + + .reminderBody { + margin-bottom: 6px; + + .reminderText { + font-size: 13px; + color: #262626; + line-height: 1.4; + } + } + + .reminderFooter { + .clockIcon { + color: #8c8c8c; + font-size: 11px; + } + + .scheduledTime { + font-size: 11px; + color: #8c8c8c; + } + } + } + } + } +} + +// 响应式设计 +@media (max-width: 768px) { + .followupModal { + :global(.ant-modal) { + margin: 0; + max-width: 100vw; + top: 0; + padding-bottom: 0; + } + + :global(.ant-modal-body) { + padding: 0 16px 16px 16px; + } + } + + .modalContent { + .addReminderSection { + padding: 12px; + margin-bottom: 12px; + + .reminderForm { + .formRow { + flex-direction: column; + gap: 8px; + } + } + } + + .remindersList { + max-height: 150px; + } + } +} diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.tsx new file mode 100644 index 00000000..b13a2ab1 --- /dev/null +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/FollowupReminderModal/index.tsx @@ -0,0 +1,251 @@ +import React, { useState } from "react"; +import { + Modal, + Form, + Select, + DatePicker, + Input, + Button, + List, + Tag, + Space, + Typography, +} from "antd"; +import { + PlusOutlined, + ClockCircleOutlined, + PhoneOutlined, + MessageOutlined, +} from "@ant-design/icons"; +import styles from "./index.module.scss"; + +const { Option } = Select; +const { TextArea } = Input; +const { Text } = Typography; + +interface FollowupReminder { + id: string; + type: "电话" | "消息"; + status: "待处理" | "已完成" | "已取消"; + content: string; + scheduledTime: string; + recipient: string; +} + +interface FollowupReminderModalProps { + visible: boolean; + onClose: () => void; + recipientName?: string; +} + +const FollowupReminderModal: React.FC = ({ + visible, + onClose, + recipientName = "客户", +}) => { + const [form] = Form.useForm(); + const [reminders, setReminders] = useState([ + { + id: "1", + type: "电话", + status: "待处理", + content: "周三14点回访", + scheduledTime: "2024/3/6 14:00:00", + recipient: "李先生", + }, + { + id: "2", + type: "消息", + status: "待处理", + content: "发送产品演示视频", + scheduledTime: "2024/3/7 09:00:00", + recipient: "张总", + }, + { + id: "3", + type: "消息", + status: "待处理", + content: "发送产品演示视频", + scheduledTime: "2024/3/7 09:00:00", + recipient: "张总", + }, + { + id: "4", + type: "消息", + status: "待处理", + content: "发送产品演示视频", + scheduledTime: "2024/3/7 09:00:00", + recipient: "张总", + }, + ]); + + // 跟进方式选项 + const followupMethods = [ + { value: "电话回访", label: "电话回访" }, + { value: "微信消息", label: "微信消息" }, + { value: "邮件", label: "邮件" }, + { value: "短信", label: "短信" }, + ]; + + // 处理添加提醒 + const handleAddReminder = async () => { + try { + const values = await form.validateFields(); + const newReminder: FollowupReminder = { + id: Date.now().toString(), + type: values.method === "电话回访" ? "电话" : "消息", + status: "待处理", + content: values.content, + scheduledTime: values.dateTime.format("YYYY/M/D HH:mm:ss"), + recipient: recipientName, + }; + + setReminders([...reminders, newReminder]); + form.resetFields(); + } catch (error) { + console.error("表单验证失败:", error); + } + }; + + // 获取状态标签颜色 + const getStatusColor = (status: string) => { + switch (status) { + case "待处理": + return "warning"; + case "已完成": + return "success"; + case "已取消": + return "default"; + default: + return "default"; + } + }; + + // 获取类型图标 + const getTypeIcon = (type: string) => { + return type === "电话" ? : ; + }; + + return ( + +
跟进提醒设置
+
设置客户跟进时间和方式
+ + } + open={visible} + onCancel={onClose} + footer={null} + width={480} + className={styles.followupModal} + > +
+ {/* 添加新提醒区域 */} +
+
+
+ + + + + + + +
+ + +