Browse Source

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 1 day ago
parent
commit
6b300ca152
16 changed files with 173 additions and 45 deletions
  1. 30 0
      src/pages/launchSystemV3/monitorEWList/tableConfig.tsx
  2. 12 10
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/addCsGroup.tsx
  3. 10 4
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/index.tsx
  4. 11 0
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/tableConfig.tsx
  5. 5 5
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/landingPageTieUp/addLandingPageTieUp.tsx
  6. 1 1
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/landingPageTieUp/index.tsx
  7. 5 5
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/pageTieUp/addPageTieUp.tsx
  8. 1 1
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/pageTieUp/index.tsx
  9. 1 1
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/addTencentGroup.tsx
  10. 3 2
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/bandLocal.tsx
  11. 43 6
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/index.tsx
  12. 5 4
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/tableConfig.tsx
  13. 9 5
      src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/index.tsx
  14. 6 0
      src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/addUserPotatePolicy.tsx
  15. 16 0
      src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/index.tsx
  16. 15 1
      src/services/adqV3/global.ts

+ 30 - 0
src/pages/launchSystemV3/monitorEWList/tableConfig.tsx

@@ -61,6 +61,16 @@ export const CorpUserDayListTableConfig = (): ColumnsType<never> => {
                 return <span style={{ fontSize: 12 }}>{value}</span>
             },
         },
+        {
+            title: '客服号当前所在部门名称',
+            dataIndex: 'localCorpUserDepartment',
+            key: 'localCorpUserDepartment',
+            width: 120,
+            ellipsis: true,
+            render(value) {
+                return <span style={{ fontSize: 12 }}>{value}</span>
+            },
+        },
         {
             title: '新增用户数',
             dataIndex: 'addUserCount',
@@ -81,6 +91,16 @@ export const CorpUserDayListTableConfig = (): ColumnsType<never> => {
                 return <span style={{ fontSize: 12 }}>{value}</span>
             },
         },
+        {
+            title: '当前粉丝总数',
+            dataIndex: 'corpExternalUserCount',
+            key: 'corpExternalUserCount',
+            width: 100,
+            align: 'right',
+            render(value) {
+                return <span style={{ fontSize: 12 }}>{value}</span>
+            },
+        },
         {
             title: 'dn双删详情',
             dataIndex: 'dnOutUserCount',
@@ -144,6 +164,16 @@ export const LocalCsgroupDayListTableConfig = (): ColumnsType<never> => {
                 return <span style={{ fontSize: 12 }}>{value}</span>
             },
         },
+        {
+            title: '企业名称',
+            dataIndex: 'corpName',
+            key: 'corpName',
+            width: 100,
+            ellipsis: true,
+            render(value) {
+                return <span style={{ fontSize: 12 }}>{value}</span>
+            },
+        },
         {
             title: '本地客服组名称',
             dataIndex: 'localCsgroupName',

+ 12 - 10
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/addCsGroup.tsx

@@ -9,16 +9,18 @@ interface AddCsGroupProps {
     corpWechatList: { label: string; value: string }[];
     userRotatePolicy: { label: string; value: string }[];
     localCorpCsgroupList: { label: string; value: string }[];
+    accountId: number;
     visible?: boolean;
     onClose?: () => void;
     onChange?: () => void;
     initialValues?: any; // 用于表单的初始值
 }
-const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolicy, localCorpCsgroupList, visible, onClose, onChange, initialValues }) => {
+const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolicy, localCorpCsgroupList, accountId, visible, onClose, onChange, initialValues }) => {
 
     /**************************************/
     const [form] = Form.useForm();
     const type = useWatch('type', form)
+    const parentId = useWatch('parentId', form)
 
     const addLocalCorpCsgroup = useAjax((params) => addLocalCorpCsgroupApi(params))
     const modifyLocalCorpCsgroup = useAjax((params) => modifyLocalCorpCsgroupApi(params))
@@ -28,19 +30,19 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
         form.validateFields().then(values => {
             console.log(values)
             if (initialValues?.id) {
-                modifyLocalCorpCsgroup.run({ ...values, id: initialValues?.id }).then(res => {
+                modifyLocalCorpCsgroup.run({ ...values, accountId, id: initialValues?.id }).then(res => {
                     if (res) {
                         message.success('修改成功')
                         onChange?.()
                     }
                 })
             } else {
-            addLocalCorpCsgroup.run(values).then((res) => {
-                if (res) {
-                    message.success('新增成功')
-                    onChange?.()
-                }
-            })
+                addLocalCorpCsgroup.run({ ...values, accountId }).then((res) => {
+                    if (res) {
+                        message.success('新增成功')
+                        onChange?.()
+                    }
+                })
             }
         })
     }
@@ -98,7 +100,7 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
                     options={localCorpCsgroupList}
                 />
             </Form.Item>}
-            <Form.Item label={<strong>切号策略</strong>} name="policyId">
+            {!parentId && <Form.Item label={<strong>切号策略</strong>} name="policyId">
                 <Select
                     showSearch
                     placeholder="请选择切号策略"
@@ -108,7 +110,7 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
                     allowClear
                     options={userRotatePolicy}
                 />
-            </Form.Item>
+            </Form.Item>}
         </Form>
     </Modal>
 };

+ 10 - 4
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/index.tsx

@@ -10,7 +10,7 @@ import AddCsGroup from './addCsGroup';
 const Group: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
 
     /**********************************/
-    const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupListProps>({ pageNum: 1, pageSize: 20 })
+    const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupListProps>({ pageNum: 1, pageSize: 20, accountId: adAccountId })
 
     const [visible, setVisible] = useState<boolean>(false);
     const [corpWechatList, setCorpWechatList] = useState<{ label: string, value: string }[]>([]);
@@ -35,11 +35,16 @@ const Group: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
                 setUserRotatePolicy(res.map((item: { policyName: string; id: string; }) => ({ label: item.policyName, value: item.id })));
             }
         })
-        getList()
     }, [])
 
+    useEffect(() => {
+        if (adAccountId) {
+            getList()
+        }
+    }, [adAccountId])
+
     const getList = () => {
-        getLocalCorpCsgroupListAll.run({ type: 0 }).then((res) => {
+        getLocalCorpCsgroupListAll.run({ type: 0, accountId: adAccountId }).then((res) => {
             if (res && res.length > 0) {
                 setLocalCorpCsgroupList(res.map((item: { csgroupName: string; id: string; }) => ({ label: item.csgroupName, value: item.id })));
             }
@@ -48,7 +53,7 @@ const Group: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
 
     useEffect(() => {
         if (adAccountId) {
-            getCustomerServiceGroupList.run({ ...queryParamsNew, adAccountId })
+            getCustomerServiceGroupList.run({ ...queryParamsNew, accountId: adAccountId })
         }
     }, [queryParamsNew, adAccountId])
 
@@ -148,6 +153,7 @@ const Group: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
         {/* 新增客服组 */}
         {visible && <AddCsGroup
             visible={visible}
+            accountId={adAccountId as number}
             initialValues={initialValues}
             corpWechatList={corpWechatList}
             userRotatePolicy={userRotatePolicy}

+ 11 - 0
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/group/tableConfig.tsx

@@ -11,10 +11,20 @@ const columns = (handleEdit: (data: any) => void, adAccountId?: number): TablePr
             dataIndex: 'csgroupName',
             key: 'csgroupName',
             width: 280,
+            fixed: 'left',
             render(value, records) {
                 return <span style={{ fontSize: 12 }}>{value}(ID:{records.id})</span>
             }
         },
+        {
+            title: '媒体账户',
+            dataIndex: 'accountId',
+            key: 'accountId',
+            width: 80,
+            render(value, records) {
+                return <span style={{ fontSize: 12 }}>{value}</span>
+            }
+        },
         {
             title: '是否组集',
             dataIndex: 'type',
@@ -89,6 +99,7 @@ const columns = (handleEdit: (data: any) => void, adAccountId?: number): TablePr
             dataIndex: 'cz',
             key: 'cz',
             width: 200,
+            fixed: 'right',
             render(_, record) {
                 return <Space>
                     {/* <UserInfo userInfoList={record.userInfoList} createTime={record.createTime} groupMemberCnt={record.groupMemberCnt} /> */}

+ 5 - 5
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/landingPageTieUp/addLandingPageTieUp.tsx

@@ -32,7 +32,7 @@ const AddLandingPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visi
 
 
     useEffect(() => {
-        getLocalCorpCsgroupListAll.run({}).then(res => {
+        getLocalCorpCsgroupListAll.run({ accountId: adAccountId }).then(res => {
             if (res && res.length > 0) {
                 const list = res.map((item: { csgroupName: string; id: string; type: 0 | 1 }) => ({ label: item.csgroupName, value: item.id }))
                 setGroupList(list)
@@ -43,14 +43,14 @@ const AddLandingPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visi
     const handleOk = () => {
         form.validateFields().then(values => {
             if (initialValues?.pageId) {
-                modifyLandingPageCustomerGroup.run({ ...values, pageId: initialValues.pageId, pageType: initialValues.pageType }).then((res) => {
+                modifyLandingPageCustomerGroup.run({ ...values, pageId: initialValues.pageId, pageType: initialValues.pageType, accountId: adAccountId }).then((res) => {
                     if (res) {
                         message.success('修改成功')
                         onChange?.()
                     }
                 })
             } else {
-                addLandingPageCustomerGroup.run(values).then((res) => {
+                addLandingPageCustomerGroup.run({ ...values, accountId: adAccountId }).then((res) => {
                     if (res) {
                         message.success('新增成功')
                         onChange?.()
@@ -80,10 +80,10 @@ const AddLandingPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visi
             {!initialValues?.pageId && <Form.Item label={<strong>原生落地页</strong>} name="landingPageList" rules={[{ required: true, message: '请选择官方落地页!' }]}>
                 <SelectLandingPage accountId={adAccountId} />
             </Form.Item>}
-            <Form.Item label={<strong>本地客服组</strong>} name="localCsgroupId" rules={[{ required: !!initialValues?.pageId, message: '请选择本地客服组!' }]}>
+            <Form.Item label={<strong>本地客服组/集</strong>} name="localCsgroupId" rules={[{ required: !!initialValues?.pageId, message: '请选择本地客服组!' }]}>
                 <Select
                     showSearch
-                    placeholder="请选择客服组"
+                    placeholder="请选择客服组/集"
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }

+ 1 - 1
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/landingPageTieUp/index.tsx

@@ -22,7 +22,7 @@ const LandingPageTieUp: React.FC<{ adAccountId?: number }> = ({ adAccountId }) =
     /** 获取关系列表 */
     useEffect(() => {
         if (adAccountId) {
-            getLandingPageCustomerGroupList.run({ ...queryParamsNew, adAccountId })
+            getLandingPageCustomerGroupList.run({ ...queryParamsNew, accountId: adAccountId })
         }
     }, [adAccountId, queryParamsNew])
 

+ 5 - 5
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/pageTieUp/addPageTieUp.tsx

@@ -32,7 +32,7 @@ const AddPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visible, on
 
 
     useEffect(() => {
-        getLocalCorpCsgroupListAll.run({}).then(res => {
+        getLocalCorpCsgroupListAll.run({ accountId: adAccountId }).then(res => {
             if (res && res.length > 0) {
                 const list = res.map((item: { csgroupName: string; id: string; type: 0 | 1 }) => ({ label: item.csgroupName, value: item.id }))
                 setGroupList(list)
@@ -43,14 +43,14 @@ const AddPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visible, on
     const handleOk = () => {
         form.validateFields().then(values => {
             if (initialValues?.pageId) {
-                modifyPageCustomerGroup.run({ ...values, pageId: initialValues.pageId, pageType: initialValues.pageType }).then((res) => {
+                modifyPageCustomerGroup.run({ ...values, pageId: initialValues.pageId, pageType: initialValues.pageType, accountId: adAccountId }).then((res) => {
                     if (res) {
                         message.success('修改成功')
                         onChange?.()
                     }
                 })
             } else {
-                addPageCustomerGroup.run(values).then((res) => {
+                addPageCustomerGroup.run({ ...values, accountId: adAccountId }).then((res) => {
                     if (res) {
                         message.success('新增成功')
                         onChange?.()
@@ -80,10 +80,10 @@ const AddPageTieUp: React.FC<Props> = ({ adAccountId, initialValues, visible, on
             {!initialValues?.pageId && <Form.Item label={<strong>官方落地页</strong>} name="landingPageList" rules={[{ required: true, message: '请选择官方落地页!' }]}>
                 <SelectPage accountId={adAccountId} />
             </Form.Item>}
-            <Form.Item label={<strong>本地客服组</strong>} name="localCsgroupId" rules={[{ required: !!initialValues?.pageId, message: '请选择本地客服组!' }]}>
+            <Form.Item label={<strong>本地客服组/集</strong>} name="localCsgroupId" rules={[{ required: !!initialValues?.pageId, message: '请选择本地客服组!' }]}>
                 <Select
                     showSearch
-                    placeholder="请选择客服组"
+                    placeholder="请选择客服组/集"
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }

+ 1 - 1
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/pageTieUp/index.tsx

@@ -22,7 +22,7 @@ const PageTieUp: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
     /** 获取关系列表 */
     useEffect(() => {
         if (adAccountId) {
-            getPageCustomerGroupList.run({ ...queryParamsNew, adAccountId })
+            getPageCustomerGroupList.run({ ...queryParamsNew, accountId: adAccountId })
         }
     }, [adAccountId, queryParamsNew])
 

+ 1 - 1
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/addTencentGroup.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 import '../../../../../tencentAdPutIn/index.less'
 import { Form, Input, message, Modal, Select } from 'antd';
 import { useAjax } from '@/Hook/useAjax';
-import { addTencentCorpCsgroupApi, modifyLocalCorpCsgroupApi } from '@/services/adqV3/global';
+import { addTencentCorpCsgroupApi } from '@/services/adqV3/global';
 import SelectKF from './selectKF';
 
 interface AddCsGroupProps {

+ 3 - 2
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/bandLocal.tsx

@@ -7,13 +7,14 @@ import { useAjax } from '@/Hook/useAjax';
 
 interface BandLocalProps {
     data: { [x: string]: any };
+    accountId: number;
     visible?: boolean;
     onClose?: () => void;
     onChange?: () => void;
 }
 
 
-const BandLocal: React.FC<BandLocalProps> = ({ data, visible, onClose, onChange }) => {
+const BandLocal: React.FC<BandLocalProps> = ({ data, accountId, visible, onClose, onChange }) => {
 
     /*********************************/
     const [form] = Form.useForm();
@@ -23,7 +24,7 @@ const BandLocal: React.FC<BandLocalProps> = ({ data, visible, onClose, onChange
     /*********************************/
 
     useEffect(() => {
-        getLocalCorpCsgroupListAll.run({ type: 1 })
+        getLocalCorpCsgroupListAll.run({ accountId, type: 1 })
     }, [])
 
     const handleOk = () => {

+ 43 - 6
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/index.tsx

@@ -1,9 +1,9 @@
-import { Button, Input, Table } from 'antd';
+import { Button, Input, message, Select, Table } from 'antd';
 import React, { useEffect, useState } from 'react';
 import '../../../../../tencentAdPutIn/index.less'
 import { useAjax } from '@/Hook/useAjax';
-import { getCorpWechatAllApi, getTencentCorpCsgroupListApi, GetTencentCorpCsgroupListProps } from '@/services/adqV3/global';
-import { PlusOutlined, SearchOutlined } from '@ant-design/icons';
+import { getCorpWechatAllApi, getTencentCorpCsgroupListApi, GetTencentCorpCsgroupListProps, syncencentCorpCsgroupApi } from '@/services/adqV3/global';
+import { PlusOutlined, SearchOutlined, SyncOutlined } from '@ant-design/icons';
 import columns from './tableConfig';
 import AddTencentGroup from './addTencentGroup';
 import BandLocal from './bandLocal';
@@ -18,6 +18,7 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
 
     const getTencentCorpCsgroupList = useAjax((params) => getTencentCorpCsgroupListApi(params))
     const getCorpWechatAll = useAjax((params) => getCorpWechatAllApi(params))
+    const syncencentCorpCsgroup = useAjax((params) => syncencentCorpCsgroupApi(params))
     /**********************************/
 
     useEffect(() => {
@@ -30,7 +31,7 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
 
     useEffect(() => {
         if (adAccountId) {
-            getTencentCorpCsgroupList.run({ ...queryParamsNew })
+            getTencentCorpCsgroupList.run({ ...queryParamsNew, accountId: adAccountId })
         }
     }, [queryParamsNew, adAccountId])
 
@@ -40,6 +41,22 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
     };
 
 
+    const syncGroup = (value?: any) => {
+        const hide = message.loading('同步中...', 0);
+        let params: { [x: string]: any } = { accountId: adAccountId }
+        if (value?.groupId) {
+            params.tencentCorpId = value.tencentCorpId
+            params.groupId = value.groupId
+        } else {
+            params.tencentCorpId = queryParamsNew.tencentCorpId
+        }
+        syncencentCorpCsgroup.run(params).then(() => {
+            hide()
+            getTencentCorpCsgroupList.refresh()
+        }).catch(() => hide())
+    }
+
+
     return <>
         <div className="flexStart" style={{ gap: 8, marginBottom: 16 }}>
             <Input.Search
@@ -49,6 +66,18 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
                 onSearch={(e) => setQueryParamsNew({ ...queryParamsNew, groupName: e, pageNum: 1 })}
                 allowClear
             />
+            <Select
+                showSearch
+                placeholder="请选择企业"
+                filterOption={(input, option) =>
+                    ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
+                }
+                style={{ width: 150 }}
+                value={queryParamsNew?.tencentCorpId}
+                onChange={(e) => setQueryParamsNew({ ...queryParamsNew, tencentCorpId: e, pageNum: 1 })}
+                allowClear
+                options={corpWechatList}
+            />
             <Button type="primary" icon={<SearchOutlined />} loading={getTencentCorpCsgroupList.loading} onClick={() => getTencentCorpCsgroupList.refresh()}>刷新</Button>
             <Button
                 type="primary"
@@ -57,9 +86,17 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
                     setAddData({ visible: true, initialValues: undefined })
                 }}
             >新增</Button>
+            <Button
+                type="primary"
+                style={{ backgroundColor: '#FAAD14', borderColor: '#FAAD14' }}
+                icon={<SyncOutlined />}
+                disabled={queryParamsNew?.tencentCorpId === undefined}
+                onClick={syncGroup}
+                loading={syncencentCorpCsgroup.loading}
+            >同步</Button>
         </div>
         <Table
-            columns={columns(handleBand)}
+            columns={columns(handleBand, syncGroup)}
             dataSource={getTencentCorpCsgroupList.data?.records}
             size="small"
             loading={getTencentCorpCsgroupList?.loading}
@@ -75,7 +112,6 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
                 const { current, pageSize } = pagination
                 setQueryParamsNew({ ...queryParamsNew, pageNum: current as number, pageSize: pageSize as number || 20 })
             }}
-
         />
 
         {/* 设置修改腾讯组 */}
@@ -95,6 +131,7 @@ const TencentGroup: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => {
         {/* 绑定本地客服组 */}
         {bandData?.visible && <BandLocal
             {...bandData}
+            accountId={adAccountId as number}
             onClose={() => {
                 setBandData({ visible: false, data: undefined })
             }}

+ 5 - 4
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/components/tencentGroup/tableConfig.tsx

@@ -1,9 +1,9 @@
-import {  Button, Space, TableProps } from "antd"
+import { Button, Space, TableProps } from "antd"
 import React from "react"
 import UserInfo from "./userInfo"
-import { ApiOutlined } from "@ant-design/icons"
+import { ApiOutlined, SyncOutlined } from "@ant-design/icons"
 
-let columns = (handleBand: (value: any) => void): TableProps<any>['columns'] => {
+let columns = (handleBand: (value: any) => void, sync: (value: any) => void): TableProps<any>['columns'] => {
 
     return [
         {
@@ -21,7 +21,7 @@ let columns = (handleBand: (value: any) => void): TableProps<any>['columns'] =>
             key: 'localCsgroupName',
             width: 150,
             render(value, records) {
-                return <span style={{ fontSize: 12 }}>{value ? value + `(${records.localCsgroupId})`: '--'}</span>
+                return <span style={{ fontSize: 12 }}>{value ? value + `(${records.localCsgroupId})` : '--'}</span>
             }
         },
         {
@@ -62,6 +62,7 @@ let columns = (handleBand: (value: any) => void): TableProps<any>['columns'] =>
                 return <Space>
                     <UserInfo data={record} />
                     <Button icon={<ApiOutlined />} style={{ border: 'none', fontSize: 12 }} size='small' onClick={() => handleBand(record)}>与本地客服组绑定关系</Button>
+                    <Button icon={<SyncOutlined />} style={{ border: 'none', fontSize: 12, color: '#FAAD14' }} size='small' onClick={() => sync(record)}>同步</Button>
                 </Space>
             }
         }

+ 9 - 5
src/pages/launchSystemV3/tencenTasset/corpWechat/csgroup/index.tsx

@@ -15,6 +15,7 @@ const EnterpriseWechat: React.FC = () => {
 
     /**********************************/
     const [adAccountId, setAdAccountId] = React.useState<number>();
+    const [accessKey, setAccessKey] = React.useState<string>('1');
     /**********************************/
 
     return <Card
@@ -25,7 +26,8 @@ const EnterpriseWechat: React.FC = () => {
                 isReturnFirstValue
                 value={adAccountId ? [adAccountId] : undefined}
                 type="radio"
-                onChange={(value) => {
+                onChange={(value, row) => {
+                    console.log(row)
                     setAdAccountId(value as number)
                 }}
                 allowClear={false}
@@ -33,11 +35,13 @@ const EnterpriseWechat: React.FC = () => {
         </div>
         
         <Tabs
+            accessKey={accessKey}
+            onChange={(key) => setAccessKey(key)}
             items={[
-                { label: '客服组', key: '1', children: <Group adAccountId={adAccountId} /> },
-                { label: '腾讯客服组', key: '2', children: <TencentGroup adAccountId={adAccountId} /> },
-                { label: '官方落地页与客服组关系', key: '3', children: <PageTieUp adAccountId={adAccountId} /> },
-                { label: '原生落地页与客服组关系', key: '4', children: <LandingPageTieUp adAccountId={adAccountId} /> },
+                { label: '客服组', key: '1', children: accessKey === '1' ? <Group adAccountId={adAccountId} /> : undefined },
+                { label: '腾讯客服组', key: '2', children: accessKey === '2' ? <TencentGroup adAccountId={adAccountId} /> : undefined },
+                { label: '官方落地页与客服组关系', key: '3', children: accessKey === '3' ? <PageTieUp adAccountId={adAccountId} /> : undefined },
+                { label: '原生落地页与客服组关系', key: '4', children: accessKey === '4' ? <LandingPageTieUp adAccountId={adAccountId} /> : undefined },
             ]}
             size="small"
         />

+ 6 - 0
src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/addUserPotatePolicy.tsx

@@ -77,6 +77,12 @@ const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visibl
             >
                 <InputNumber style={{ width: '100%' }} placeholder='请输入加粉成本异常值' />
             </Form.Item>
+            <Form.Item
+                label={<strong>{`有消耗无加粉异常 (单位:/分)`}</strong>}
+                name="noFansCostValue"
+            >
+                <InputNumber style={{ width: '100%' }} placeholder='请输入有消耗无加粉异常' />
+            </Form.Item>
             <Form.Item
                 label={<strong>单号单日最小加粉数量,默认20,加粉数少于该值永远不触发风控</strong>}
                 name="minAddFansCount"

+ 16 - 0
src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/index.tsx

@@ -98,6 +98,22 @@ const UserRotatePolicy: React.FC = () => {
                         return '--'
                     },
                 },
+                {
+                    title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                        <span>有消耗无加粉异常</span>
+                        <Tooltip title="单位:/分">
+                            <QuestionCircleFilled />
+                        </Tooltip>
+                    </div>,
+                    dataIndex: 'noFansCostValue',
+                    key: 'noFansCostValue',
+                    width: 90,
+                    align: 'center',
+                    render(value) {
+                        if (value || value === 0) return value
+                        return '--'
+                    },
+                },
                 {
                     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                         <span>单号单日最小加粉数量</span>

+ 15 - 1
src/services/adqV3/global.ts

@@ -1030,6 +1030,7 @@ export async function getApplicationDetailApi(id: number) {
 export interface GetCustomerServiceGroupListProps {
     pageNum: number,
     pageSize: number,
+    accountId?: number,
     csgroupName?: string, // 客服组名称
     tencentCorpId?: string, // 企业微信ID
     parentId?: number, // 父级ID
@@ -1053,7 +1054,7 @@ export async function getCustomerServiceGroupListApi(data: GetCustomerServiceGro
  * @param params 
  * @returns 
  */
-export async function getLocalCorpCsgroupListAllApi(params: { type?: 0 | 1 }) {
+export async function getLocalCorpCsgroupListAllApi(params: { accountId?: number, type?: 0 | 1 }) {
     return request(api + `/adq/localCorpCsgroup/listOfType`, {
         method: 'GET',
         params
@@ -1206,6 +1207,7 @@ export async function getCorpDepartmentListApi(params: { corpName: string }) {
 
 export interface GetTencentCorpCsgroupListProps {
     groupName?: string, // 客服组名称
+    tencentCorpId?: string,
     pageNum: number, // 页码
     pageSize: number, // 页大小
 }
@@ -1222,6 +1224,18 @@ export async function getTencentCorpCsgroupListApi(data: GetTencentCorpCsgroupLi
     })
 }
 
+/**
+ * 同步腾讯客服组
+ * @param data 
+ * @returns 
+ */
+export async function syncencentCorpCsgroupApi(data: { tencentCorpId: string, accountId: number, groupId: number }) {
+    return request(api + `/adq/tencentCorpCsgroup/sync`, {
+        method: 'POST',
+        data
+    })
+}
+
 /**
  * 腾讯客服组-查询组内成员
  * @param params