wjx 1 年之前
父节点
当前提交
bbf7f8aa96

+ 7 - 1
src/global.less

@@ -298,9 +298,11 @@ body {
 .ant-radio-button-wrapper:last-child {
   border-radius: 0 6px 6px 0 !important;
 }
+
 .ant-table-cell {
   padding: 2px 5px !important;
 }
+
 .progress {
   padding: 0 !important;
 
@@ -323,6 +325,10 @@ body {
   }
 }
 
-.header_table_body td{
+.header_table_body td {
   font-weight: 600;
+}
+
+.ant-table-tbody > tr.ant-table-row:hover > td {
+  background-color: #e9e9e9 !important;
 }

+ 0 - 48
src/pages/gameDataStatistics/adlist/monitor/const.ts

@@ -1,48 +0,0 @@
-
-/** 广告状态 */
-export enum ADSTATUSEnum {
-    NOT_DELETED = '不限',
-    ALL = '不限(包含已删除)',
-    OK = '投放中',
-    DELETED = '已删除',
-    PROJECT_OFFLINE_BUDGET = '项目超出预算',
-    PROJECT_PREOFFLINE_BUDGET = '项目接近预算',
-    TIME_NO_REACH = '未到达投放时间',
-    TIME_DONE = '已完成',
-    NO_SCHEDULE = '不在投放时段',
-    AUDIT = '新建审核中',
-    REAUDIT = '修改审核中',
-    FROZEN = '已终止',
-    AUDIT_DENY = '审核不通过',
-    OFFLINE_BUDGET = '广告超出预算',
-    OFFLINE_BALANCE = '账户余额不足',
-    PREOFFLINE_BUDGET = '广告接近预算',
-    DISABLED = '已暂停',
-    PROJECT_DISABLED = '已被项目暂停',
-    LIVE_ROOM_OFF = '关联直播间不可投',
-    PRODUCT_OFFLINE = '关联商品不可投',
-    AWEME_ACCOUNT_DISABLED = '关联抖音账号不可投',
-    AWEME_ANCHOR_DISABLED = '锚点不可投',
-    DISABLE_BY_QUOTA = '已暂停(配额达限)'
-}
-
-/** 出价方式 */
-export enum PRICINGEnum {
-    PRICING_CPC = 'CPC(点击付费)',
-    PRICING_CPM = 'CPM(展示付费)',
-    PRICING_OCPC = 'OCPC(已下线)',
-    PRICING_OCPM = 'OCPM(转化量付费)',
-    PRICING_CPV = 'CPV',
-    PRICING_CPA = 'CPA(已下线)',
-    PRICING_CPC_OCPM = 'CPC - OCPM两阶段出价(仅搜索广告可用)'
-}
-
-export enum LANDINGTYPEEnum {
-    APP = '应用推广',
-    LINK = '销售线索推广',
-    MICRO_GAME = '小程序',
-    SHOP = '电商店铺推广',
-    QUICK_APP = '快应用',
-    NATIVE_ACTION = '原生互动',
-    DPA = '商品目录'
-}

+ 50 - 0
src/pages/gameDataStatistics/adlist/monitor/const.tsx

@@ -0,0 +1,50 @@
+import { Badge } from "antd";
+import React from "react";
+
+/** 广告状态 */
+export const ADSTATUSEnum = {
+    'NOT_DELETED': '不限',
+    'ALL': '不限(包含已删除)',
+    'OK': <Badge status="processing" text='投放中' />,
+    'DELETED': <Badge status="error" text='已删除' />,
+    'PROJECT_OFFLINE_BUDGET': <Badge status="error" text='项目超出预算' />,
+    'PROJECT_PREOFFLINE_BUDGET': <Badge status="warning" text='项目接近预算' />,
+    'TIME_NO_REACH': '未到达投放时间',
+    'TIME_DONE': <Badge status="success" text='已完成' />,
+    'NO_SCHEDULE': '不在投放时段',
+    'AUDIT': '新建审核中',
+    'REAUDIT': '修改审核中',
+    'FROZEN': '已终止',
+    'AUDIT_DENY': '审核不通过',
+    'OFFLINE_BUDGET': '广告超出预算',
+    'OFFLINE_BALANCE': '账户余额不足',
+    'PREOFFLINE_BUDGET': '广告接近预算',
+    'DISABLED': <Badge status="default" text='已暂停' />,
+    'PROJECT_DISABLED': <Badge status="default" text='已被项目暂停' />,
+    'LIVE_ROOM_OFF': '关联直播间不可投',
+    'PRODUCT_OFFLINE': '关联商品不可投',
+    'AWEME_ACCOUNT_DISABLED': '关联抖音账号不可投',
+    'AWEME_ANCHOR_DISABLED': '锚点不可投',
+    'DISABLE_BY_QUOTA': '已暂停(配额达限)'
+}
+
+/** 出价方式 */
+export enum PRICINGEnum {
+    PRICING_CPC = 'CPC(点击付费)',
+    PRICING_CPM = 'CPM(展示付费)',
+    PRICING_OCPC = 'OCPC(已下线)',
+    PRICING_OCPM = 'OCPM(转化量付费)',
+    PRICING_CPV = 'CPV',
+    PRICING_CPA = 'CPA(已下线)',
+    PRICING_CPC_OCPM = 'CPC - OCPM两阶段出价(仅搜索广告可用)'
+}
+
+export enum LANDINGTYPEEnum {
+    APP = '应用推广',
+    LINK = '销售线索推广',
+    MICRO_GAME = '小程序',
+    SHOP = '电商店铺推广',
+    QUICK_APP = '快应用',
+    NATIVE_ACTION = '原生互动',
+    DPA = '商品目录'
+}

+ 1 - 1
src/pages/gameDataStatistics/adlist/monitor/index.tsx

@@ -11,7 +11,7 @@ import { getPresets } from "@/components/QueryForm/const"
 const Monitor = () => {
 
     /***************************************/
-    const [queryForm, setQueryForm] = useState<PromotionDataDay>({ pageNum: 1, pageSize: 20, sourceSystem: 'ZX_ONE', costBeginDate: moment().format('YYYY-MM-DD'), costEndDate: moment().format('YYYY-MM-DD') })
+    const [queryForm, setQueryForm] = useState<PromotionDataDay>({ pageNum: 1, pageSize: 100, sourceSystem: 'ZX_ONE', costBeginDate: moment().format('YYYY-MM-DD'), costEndDate: moment().format('YYYY-MM-DD') })
     const [totalData, setTotalData] = useState<any[]>([])
 
     const getPromotionDataDatList = useAjax((params) => getPromotionDataDatListApi(params))

+ 40 - 21
src/pages/gameDataStatistics/adlist/monitor/tableConfig.tsx

@@ -138,7 +138,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                 },
                 {
-                    title: '广告状态', dataIndex: 'status', label: '广告信息', align: 'center', width: 85, default: 6,
+                    title: '广告状态', dataIndex: 'status', label: '广告信息', align: 'left', width: 120, default: 6,
                     render: (a: string, b: any) => (<WidthEllipsis value={ADSTATUSEnum[a]} />)
                 },
                 {
@@ -172,7 +172,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
             data: [
                 {
                     title: '今日消耗', dataIndex: 'todayCost', label: '消耗', align: 'center', width: 85, sorter: true, default: 11,
-                    render: (a: any) => <Statistic value={a || 0} />
+                    render: (a: any) => <Statistic valueStyle={{ fontWeight: 'bold', fontSize: 14 }} value={a || 0} />
                 },
                 {
                     title: '总消耗', dataIndex: 'promotionTotalCost', label: '消耗', align: 'center', width: 100,
@@ -212,8 +212,8 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '转化目标成本', dataIndex: 'convertCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 75, sorter: true,
-                    render: (a: any) => <Statistic value={a || 0} />
+                    title: '转化目标成本', dataIndex: 'convertCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 85, sorter: true,
+                    render: (a: any) => <Statistic value={a || 0} valueStyle={a > 700 ? { color: 'red', fontWeight: 'bold' } : {}} />
                 },
                 {
                     title: '目标转化率', dataIndex: 'convertRate', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 60, sorter: true,
@@ -250,6 +250,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 {
                     title: '付费次数(广告)', dataIndex: 'gamePayCount', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 24,
                     render: (a: any) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '付费次数成本(广告)', dataIndex: 'gamePayCountCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 80, 
+                    render: (a: any) => <Statistic value={a || 0} />
                 }
             ]
         },
@@ -257,11 +261,18 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
             label: '用户数据',
             data: [
                 {
-                    title: '新增用户数', dataIndex: 'regNum', label: '用户数据', align: 'center', width: 60, sorter: true, default: 29,
+                    title: '注册人数',
+                    tips: '新增用户数(首次注册用户)',
+                    dataIndex: 'regNum',
+                    label: '用户数据',
+                    align: 'center',
+                    width: 70,
+                    sorter: true,
+                    default: 29,
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总注册人数', dataIndex: 'regTotalNum', label: '用户数据', align: 'center', width: 60,
+                    title: '总注册人数', dataIndex: 'regTotalNum', label: '用户数据', align: 'center', width: 70, tips: '广告的总注册人数',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -314,15 +325,15 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
             label: '付费数据',
             data: [
                 {
-                    title: '新增付费次数', dataIndex: 'firstNewUserAmountCount', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass', default: 25,
+                    title: '首日充值次数', tips: "新增付费次数(首次注册并充值的总次数)", dataIndex: 'firstNewUserAmountCount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass', default: 25,
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费人数', dataIndex: 'firstNewUserAmountNum', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass', default: 26,
+                    title: '首日充值人数', tips: '新增付费人数(首次注册并充值人数)', dataIndex: 'firstNewUserAmountNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass', default: 26,
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费金额', dataIndex: 'firstNewUserAmount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass', default: 27,
+                    title: '首日充值金额', tips: '新增付费金额(首次注册并充值金额)', dataIndex: 'firstNewUserAmount', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass', default: 27,
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -341,10 +352,6 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '新用户24小时充值金额', dataIndex: 'twentyFourHoursAmount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
-                {
-                    title: '总充值金额', dataIndex: 'totalAmount', label: '付费数据', align: 'center', width: 60, className: 'payDataBackColorClass',
-                    render: (a: any) => <Statistic value={a || 0} />
-                },
                 {
                     title: '总充值次数', dataIndex: 'totalAmountCount', label: '付费数据', align: 'center', width: 50, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
@@ -374,7 +381,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '新增付费成本', dataIndex: 'firstNewUserRechargeCost', label: '付费数据', align: 'center', width: 70, sorter: true, default: 28, className: 'payDataBackColorClass',
+                    title: '首日充值成本', tips: '新增付费成本(首次注册并充值的用户成本)', dataIndex: 'firstNewUserRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, default: 28, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -382,11 +389,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '总付费成本', dataIndex: 'totalRechargeCost', label: '付费数据', align: 'center', width: 70, className: 'payDataBackColorClass',
+                    title: '总付费成本', tips: '总付费成本(广告总付费用户成本)', dataIndex: 'totalRechargeCost', label: '付费数据', align: 'center', width: 70, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费ARPPU', dataIndex: 'firstNewUserArppu', label: '付费数据', align: 'center', width: 60, sorter: true, default: 37, className: 'payDataBackColorClass',
+                    title: '首日付费用户ARPPU', tips: '首日充值金额/首日充值人数', dataIndex: 'firstNewUserArppu', label: '付费数据', align: 'center', width: 70, sorter: true, default: 37, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -394,11 +401,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费100+用户数', dataIndex: 'firstNewUserHundredUserNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
+                    title: '首日付费100+用户数', tips: '首次注册并在注册当天单笔充值金额大于100的用户人数', dataIndex: 'firstNewUserHundredUserNum', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费100+用户付费成本', dataIndex: 'firstNewUserHundredUserCost', label: '付费数据', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    title: '首日付费100+用户付费成本', tips: '今日消耗/首日付费100+用户数', dataIndex: 'firstNewUserHundredUserCost', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -414,11 +421,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '新增付费200+人数', dataIndex: 'firstNewUserTwoHundredUserNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
+                    title: '首日付费200+人数', tips: '首次注册并在注册当天单笔充值金额大于200的用户人数', dataIndex: 'firstNewUserTwoHundredUserNum', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '新增付费200+用户付费成本', dataIndex: 'firstNewUserTwoHundredUserCost', label: '付费数据', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
+                    title: '首日付费200+用户付费成本', tips: '今日消耗/首日付费200+用户数', dataIndex: 'firstNewUserTwoHundredUserCost', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -478,7 +485,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
-                    title: '新增客单价', dataIndex: 'firstNewUserAvgPrice', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass',
+                    title: '首日客单价', tips: '首日客单价(数新增客单价)=首日新用户充值金额/首日新用户充值次', dataIndex: 'firstNewUserAvgPrice', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
                 {
@@ -497,6 +504,18 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '每日扣单金额', dataIndex: 'subOrderAmount', label: '付费数据', align: 'center', width: 60, sorter: true, default: 40, className: 'payDataBackColorClass',
                     render: (a: any) => <Statistic value={a || 0} />
                 },
+                {
+                    title: '总充值次数成本', dataIndex: 'totalAmountCountCost', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: any) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '新增付费次数成本', dataIndex: 'firstNewUserAmountCountCost', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: any) => <Statistic value={a || 0} />
+                },
+                {
+                    title: '至今付费次数成本', dataIndex: 'newUserTotalAmountCountCost', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
+                    render: (a: any) => <Statistic value={a || 0} />
+                },
                 ...date
             ]
         }

+ 12 - 2
src/pages/gameDataStatistics/components/TableData/index.tsx

@@ -1,6 +1,6 @@
 import CustomListModel from '@/components/CustomList'
 import Tables from '@/components/Tables'
-import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SearchOutlined, SettingOutlined } from '@ant-design/icons'
+import { FullscreenExitOutlined, FullscreenOutlined, QuestionCircleOutlined, RedoOutlined, SearchOutlined, SettingOutlined } from '@ant-design/icons'
 import { useDebounceFn, useFullscreen, useThrottleFn } from 'ahooks'
 import { Button, Card, Col, Row, Space, Tooltip, } from 'antd'
 import React, { useEffect, useRef, useState, useCallback } from 'react'
@@ -79,7 +79,17 @@ function TableData(props: Prosp) {
                     } else {
                         oldItem['fixed'] = false
                     }
-                    let { label, default: a, ...ite } = oldItem
+                    let { label, default: a, tips, title, ...ite } = oldItem
+                    if (tips) {
+                        ite.title = <Space size={2}>
+                            {title}
+                            <Tooltip title={tips} placement='bottom'>
+                                <QuestionCircleOutlined />
+                            </Tooltip>
+                        </Space>
+                    } else {
+                        ite.title = title
+                    }
                     c.push(ite)
                 }
             })