wjx 2 weeks ago
parent
commit
e26c110980

+ 32 - 0
src/pages/weComTask/API/groupChat/index.ts

@@ -103,6 +103,38 @@ export async function getProjectLogDetailsListApi(taskLogId: number) {
     });
 }
 
+/**
+ * 客服号详情
+ * @param taskLogId 
+ * @returns 
+ */
+export async function getProjectKfhDetailsListApi(taskLogId: number) {
+    return request({
+        url: api + `/corpOperation/corp/pullGroup/project/logChat/corpUserInfoList/${taskLogId}`,
+        method: 'GET'
+    });
+}
+
+export interface GetLogChatUserInfoListProps {
+    id: number,
+    pageNum: number,
+    pageSize: number,
+    status?: number
+}
+
+/**
+ * 客户详情
+ * @param data 
+ * @returns 
+ */
+export async function getLogChatUserInfoListApi(data: GetLogChatUserInfoListProps) {
+    return request({
+        url: api + `/corpOperation/corp/pullGroup/project/logChat/userInfoList`,
+        method: 'POST',
+        data
+    });
+}
+
 
 /**
  * 删除计划

+ 45 - 6
src/pages/weComTask/page/groupChat/taskList/details.tsx

@@ -6,6 +6,8 @@ import React, { useEffect, useState } from "react"
 import { QuestionCircleFilled } from "@ant-design/icons"
 import { businessPlanData, LQTaskStatus, TIME_TYPE_ZJ } from "../../businessPlan/create/const";
 import PreviewTime from "@/pages/weComTask/components/previewTime";
+import KfhDetails from "./kfhDetails";
+import UserInfo from "./userInfo";
 const { Text, Paragraph, Title } = Typography;
 
 interface Props {
@@ -457,9 +459,17 @@ const TaskDetails: React.FC<{
                     title: '群名称',
                     dataIndex: 'chatName',
                     key: 'chatName',
-                    width: 120,
+                    width: 200,
                     ellipsis: true,
                 },
+                {
+                    title: '手机UUID',
+                    dataIndex: 'corpUserPhoneUuid',
+                    key: 'corpUserPhoneUuid',
+                    width: 140,
+                    ellipsis: true,
+                    align: 'center'
+                },
                 {
                     title: '群主号名称',
                     dataIndex: 'corpUserName',
@@ -467,33 +477,47 @@ const TaskDetails: React.FC<{
                     width: 120,
                     ellipsis: true,
                 },
+                {
+                    title: '客服号详情',
+                    dataIndex: 'kfhxq',
+                    key: 'kfhxq',
+                    width: 80,
+                    align: 'center',
+                    render: (a, b: any) => { 
+                        return <KfhDetails chatLogId={b.id} />
+                    }
+                },
                 {
                     title: '预计拉群客户数',
                     dataIndex: 'pullGroupUserCount',
                     key: 'pullGroupUserCount',
                     width: 80,
-                    align: 'center'
+                    align: 'center',
+                    render: (a, b) => <UserInfo count={a} id={b.id} title="预计拉群客户详情"/>
                 },
                 {
                     title: '实际拉群客户数',
                     dataIndex: 'actualPullGroupUserCount',
                     key: 'actualPullGroupUserCount',
                     width: 80,
-                    align: 'center'
+                    align: 'center',
+                    render: (a, b) => <UserInfo count={a} id={b.id} title="实际拉群客户详情"/>
                 },
                 {
                     title: '删除或拉黑客户数',
                     dataIndex: 'deleteOrBlockUserCount',
                     key: 'deleteOrBlockUserCount',
                     width: 80,
-                    align: 'center'
+                    align: 'center',
+                    render: (a, b) => <UserInfo count={a} id={b.id} title="删除或拉黑客户详情"/>
                 },
                 {
                     title: '发送邀请客户数',
                     dataIndex: 'sendInviteUserCount',
                     key: 'sendInviteUserCount',
                     width: 80,
-                    align: 'center'
+                    align: 'center',
+                    render: (a, b) => <UserInfo count={a} id={b.id} title="发送邀请客户详情"/>
                 }
             ]}
         />
@@ -533,9 +557,24 @@ const FailedUserDetails: React.FC<{
                     title: '企业ID',
                     dataIndex: 'corpId',
                     key: 'corpId',
-                    width: 120,
+                    width: 150,
                     ellipsis: true,
                 },
+                {
+                    title: '群名称',
+                    dataIndex: 'chatName',
+                    key: 'chatName',
+                    width: 200,
+                    ellipsis: true,
+                },
+                {
+                    title: '手机UUID',
+                    dataIndex: 'corpUserPhoneUuid',
+                    key: 'corpUserPhoneUuid',
+                    width: 140,
+                    ellipsis: true,
+                    align: 'center'
+                },
                 {
                     title: '客服名称',
                     dataIndex: 'corpUserName',

+ 105 - 0
src/pages/weComTask/page/groupChat/taskList/kfhDetails.tsx

@@ -0,0 +1,105 @@
+import { useAjax } from "@/Hook/useAjax";
+import { getProjectKfhDetailsListApi } from "@/pages/weComTask/API/groupChat";
+import { Modal, Table } from "antd";
+import React, { useEffect, useState } from "react";
+
+
+const KfhDetails: React.FC<{ chatLogId: number }> = ({ chatLogId }) => {
+
+    /****************************************/
+    const [visible, setVisible] = useState<boolean>(false);
+
+    const getProjectKfhDetailsList = useAjax((params) => getProjectKfhDetailsListApi(params))
+    /****************************************/
+
+    useEffect(() => {
+        if (chatLogId && visible) {
+            getProjectKfhDetailsList.run(chatLogId);
+        }
+    }, [chatLogId, visible])
+
+    return <>
+        <a onClick={() => setVisible(true)}>详情</a>
+        {visible && <Modal
+            title={<strong>客服号详情</strong>}
+            open={visible}
+            onCancel={() => setVisible(false)}
+            width={1200}
+            footer={null}
+        >
+            <Table
+                size='small'
+                bordered
+                rowKey={'corpUserId'}
+                dataSource={getProjectKfhDetailsList?.data?.data || []}
+                scroll={{ y: 1000 }}
+                columns={[
+                    {
+                        title: '拉客户的企微ID',
+                        dataIndex: 'corpId',
+                        key: 'corpId',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '拉客户的群企微号ID',
+                        dataIndex: 'corpUserId',
+                        key: 'corpUserId',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '客服号名称',
+                        dataIndex: 'corpUserName',
+                        key: 'corpUserName',
+                        width: 120,
+                        ellipsis: true,
+                    },
+                    {
+                        title: '手机UUID',
+                        dataIndex: 'corpUserPhoneUuid',
+                        key: 'corpUserPhoneUuid',
+                        width: 140,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '标签组ID',
+                        dataIndex: 'tagGroupId',
+                        key: 'tagGroupId',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '标签名',
+                        dataIndex: 'tagName',
+                        key: 'tagName',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '标签ID',
+                        dataIndex: 'tagId',
+                        key: 'tagId',
+                        width: 180,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '标签名数量',
+                        dataIndex: 'tagNameCount',
+                        key: 'tagNameCount',
+                        width: 60,
+                        align: 'center'
+                    },
+                ]}
+            />
+        </Modal>}
+    </>
+}
+
+export default React.memo(KfhDetails);

+ 128 - 0
src/pages/weComTask/page/groupChat/taskList/userInfo.tsx

@@ -0,0 +1,128 @@
+import { useAjax } from "@/Hook/useAjax";
+import { getLogChatUserInfoListApi, GetLogChatUserInfoListProps } from "@/pages/weComTask/API/groupChat";
+import { Modal, Select, Table } from "antd";
+import React, { useEffect, useState } from "react";
+
+
+/**
+ * 客户详情
+ * @param param0 
+ * @returns 
+ */
+const UserInfo: React.FC<{ id: number, count: number, title?: string }> = ({ id, count, title }) => {
+
+    /*********************************************/
+    const [queryForm, setQueryForm] = useState<GetLogChatUserInfoListProps>({ id, pageNum: 1, pageSize: 20 })
+    const [visible, setVisible] = useState<boolean>(false);
+    const getLogChatUserInfoList = useAjax((params) => getLogChatUserInfoListApi(params))
+    /*********************************************/
+
+    useEffect(() => {
+        if (visible) {
+            getLogChatUserInfoList.run(queryForm);
+        }
+    }, [id, visible, queryForm])
+
+    return <>
+        <a onClick={() => setVisible(true)}>{count}</a>
+        {visible && <Modal
+            title={<strong>{title || '客户详情'}</strong>}
+            open={visible}
+            onCancel={() => setVisible(false)}
+            width={1100}
+            footer={null}
+        >
+            <Select
+                placeholder='状态'
+                allowClear
+                options={[{ label: '实际拉群', value: 1 }, { label: '删除或拉黑', value: 3 }, { label: '邀请', value: 4 }]}
+                showSearch
+                style={{ width: 150, marginBottom: 10 }}
+                filterOption={(input, option) =>
+                    (option?.label ?? '').toLowerCase().includes(input.toLowerCase())
+                }
+                value={queryForm?.status}
+                onChange={(value) => setQueryForm({ ...queryForm, status: value })}
+            />
+            <Table
+                dataSource={getLogChatUserInfoList?.data?.data?.records}
+                columns={[
+                    {
+                        title: '手机UUID',
+                        dataIndex: 'corpUserPhoneUuid',
+                        key: 'corpUserPhoneUuid',
+                        width: 100,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '客户名称',
+                        dataIndex: 'nickName',
+                        key: 'nickName',
+                        width: 100,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '客户ID',
+                        dataIndex: 'externalUserId',
+                        key: 'externalUserId',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '企业名称',
+                        dataIndex: 'corpName',
+                        key: 'corpName',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center',
+                        render: (text) => text || '--'
+                    },
+                    {
+                        title: '企业ID',
+                        dataIndex: 'corpId',
+                        key: 'corpId',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                    {
+                        title: '客服号名称',
+                        dataIndex: 'corpUserName',
+                        key: 'corpUserName',
+                        width: 120,
+                        ellipsis: true,
+                        align: 'center',
+                        render: (text) => text || '--'
+                    },
+                    {
+                        title: '客服号ID',
+                        dataIndex: 'corpUserId',
+                        key: 'corpUserId',
+                        width: 90,
+                        ellipsis: true,
+                        align: 'center'
+                    },
+                ]}
+                rowKey={'id'}
+                bordered={true}
+                size='small'
+                scroll={{ y: 500, x: 1000 }}
+                loading={getLogChatUserInfoList?.loading}
+                pagination={{
+                    current: getLogChatUserInfoList?.data?.data?.current,
+                    pageSize: getLogChatUserInfoList?.data?.data?.size,
+                    total: getLogChatUserInfoList?.data?.data?.total,
+                    showSizeChanger: true,
+                    onChange: (page, pageSize) => {
+                        setQueryForm({ ...queryForm, pageNum: page, pageSize })
+                    }
+                }}
+            />
+        </Modal>}
+    </>
+}
+
+export default React.memo(UserInfo);