import { TYPE, gameClassifyEnum } from "@/components/QueryForm/const"
import WidthEllipsis from "@/components/widthEllipsis"
import { Statistic } from "antd"
import React from "react"
import { ADSTATUSEnum, LANDINGTYPEEnum, PRICINGEnum } from './const'
import './index.less'

function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {

    const data = [{ lable: '次日', value: 2 }, { lable: 'D3', value: 3 }, { lable: 'D7', value: 7 }, { lable: 'D15', value: 15 }]
    let date = data.map(item => {
        let field = `d${item.value}Trend`
        return {
            title: item.lable,
            dataIndex: `D${item.value}`,
            label: '付费数据',
            align: 'center',
            width: 85,
            className: 'payDataBackColorClass',
            children: [
                {
                    title: 'ROI',
                    dataIndex: 'roi',
                    key: 'roi',
                    width: 60,
                    align: 'center',
                    render: (_: any, b: any) => {
                        let data: any = {}
                        if (b?.[field]) {
                            data = b?.[field]
                            return <Statistic value={data?.roi ? data?.roi * 100 : 0} precision={2} valueStyle={!data?.roi ? {} : data?.roi >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                        }
                        return '--'
                    }
                },
                {
                    title: '付费',
                    dataIndex: 'rechargeMoney',
                    key: 'rechargeMoney',
                    width: 60,
                    align: 'center',
                    render: (_: any, b: any) => {
                        let data: any = {}
                        if (b?.[field]) {
                            data = b?.[field]
                            return <Statistic value={data?.rechargeMoney || 0} />
                        }
                        return '--'
                    }
                },
                {
                    title: '倍数',
                    dataIndex: 'multiples',
                    key: 'multiples',
                    width: 40,
                    align: 'center',
                    render: (_: any, b: any) => {
                        let data: any = {}
                        if (b?.[field]) {
                            data = b?.[field]
                            return <span>{data?.multiples || 0}</span>
                        }
                        return '--'
                    }
                },
            ]
        }
    })

    return [
        {
            label: '时间',
            data: [
                {
                    title: '日期', dataIndex: 'dt', label: '时间', align: 'center', width: 100, default: 1,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                }
            ]
        },
        {
            label: '账户信息',
            data: [
                {
                    title: '推广账号名称', dataIndex: 'accountName', label: '账户信息', align: 'center', width: 100, default: 2,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '推广账号ID', dataIndex: 'accountId', label: '账户信息', align: 'center', width: 120, default: 3,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                {
                    title: '备注', dataIndex: 'notes', label: '账户信息', align: 'center', width: 120,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '投手', dataIndex: 'pitcherName', label: '账户信息', align: 'center', width: 70,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '投放渠道', dataIndex: 'agentName', label: '账户信息', align: 'center', width: 75, default: 4,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '服务商', dataIndex: 'service', label: '账户信息', align: 'center', width: 95,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '投放媒体', dataIndex: 'accountType', label: '账户信息', align: 'center', width: 70,
                    render: (a: string, b: any) => (<WidthEllipsis value={TYPE[a]} />)
                },
                {
                    title: '余额', dataIndex: 'balance', label: '账户信息', align: 'center', width: 70, sorter: true,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                }
            ]
        },
        {
            label: '推广内容',
            data: [
                {
                    title: '推广游戏名称', dataIndex: 'gameName', label: '推广内容', align: 'center', width: 70,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '推广游戏应用类型', dataIndex: 'classify', label: '推广内容', align: 'center', width: 95,
                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
                }
            ]
        },
        {
            label: '广告信息',
            data: [
                {
                    title: '推广广告名称', dataIndex: 'promotionName', label: '广告信息', align: 'center', width: 130, default: 5,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                {
                    title: '广告ID', dataIndex: 'promotionId', label: '广告信息', align: 'center', width: 90, default: 6,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                {
                    title: '项目名称', dataIndex: 'projectName', label: '广告信息', align: 'center', width: 130,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                {
                    title: '项目ID', dataIndex: 'projectId', label: '广告信息', align: 'center', width: 90,
                    render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />)
                },
                {
                    title: '广告状态', dataIndex: 'status', label: '广告信息', align: 'left', width: 120, default: 7,
                    render: (a: string, b: any) => (<WidthEllipsis value={ADSTATUSEnum[a]} />)
                },
                {
                    title: '推广目标', dataIndex: 'landingType', label: '广告信息', align: 'center', width: 80,
                    render: (a: string, b: any) => (<WidthEllipsis value={LANDINGTYPEEnum[a]} />)
                },
                {
                    title: '出价方式', dataIndex: 'pricing', label: '广告信息', align: 'center', width: 100, default: 8,
                    render: (a: string, b: any) => (<WidthEllipsis value={PRICINGEnum[a]} />)
                },
                {
                    title: '当前出价', dataIndex: 'cpaBid', label: '广告信息', align: 'center', width: 70, default: 9,
                    render: (a: any) => <Statistic value={a || '--'} />
                },
                {
                    title: '深度转化ROI系数', dataIndex: 'roiGoal', label: '广告信息', align: 'center', width: 65, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '日预算', dataIndex: 'budget', label: '广告信息', align: 'center', width: 70, default: 10, sorter: true,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '投放时间', dataIndex: 'scheduleTime', label: '广告信息', align: 'center', width: 135, default: 11,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                }
            ]
        },
        {
            label: '消耗',
            data: [
                {
                    title: '今日消耗', dataIndex: 'todayCost', label: '消耗', align: 'center', width: 85, sorter: true, default: 12,
                    render: (a: any) => <Statistic valueStyle={{ fontWeight: 'bold', fontSize: 14 }} value={a || 0} />
                },
                {
                    title: '总消耗', dataIndex: 'promotionTotalCost', label: '消耗', align: 'center', width: 100, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                }
            ]
        },
        {
            label: '广告媒体端数据',
            data: [
                {
                    title: '曝光量', dataIndex: 'showCount', label: '广告媒体端数据', align: 'center', width: 60, sorter: true, default: 13, className: "adDataBackColorClass",
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '千次曝光成本', dataIndex: 'thousandDisplayPrice', label: '广告媒体端数据', align: 'center', width: 65, sorter: true, className: "adDataBackColorClass", default: 15,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '点击量', dataIndex: 'clickCount', label: '广告媒体端数据', align: 'center', width: 60, sorter: true, className: "adDataBackColorClass", default: 14,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '点击均价', dataIndex: 'avgClickCost', label: '广告媒体端数据', align: 'center', width: 60, sorter: true, className: "adDataBackColorClass", default: 16,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '点击率', dataIndex: 'ctr', label: '广告媒体端数据', align: 'center', width: 60, sorter: true, className: "adDataBackColorClass", default: 17,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '转化目标', dataIndex: 'convertTarget', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70,
                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                },
                {
                    title: '转化目标量', dataIndex: 'convertCount', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 60, 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,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '注册人数(广告)', dataIndex: 'active', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 18,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '注册成本(广告)', dataIndex: 'activeCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 19,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日转化数(广告)', dataIndex: 'firstConvertCount', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 20,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日转化成本(广告)', dataIndex: 'firstConvertCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 21,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首次付费率(广告)', dataIndex: 'firstActivePayRate', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 85, sorter: true, default: 22,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日付费金额(广告)', dataIndex: 'firstAttributionGameInAppLtv1day', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 23,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日付费ROI(广告)', dataIndex: 'firstAttributionGameInAppRoi1day', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 85, sorter: true, default: 24,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '付费次数(广告)', dataIndex: 'gamePayCount', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true, default: 25,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '付费次数成本(广告)', dataIndex: 'gamePayCountCost', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 80, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: 'ltv1(广告)', dataIndex: 'ltvDay1', label: '广告媒体端数据', align: 'center', width: 60, sorter: true, default: 26, className: 'adDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: 'ltv1(实际数据) ', dataIndex: 'ltvDay1ActualData', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 70, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '7日首次付费数(广告)', dataIndex: 'firstAttributionGamePay7dCount', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 90, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '激活后一日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi2days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后二日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi3days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后三日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi4days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后四日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi5days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后五日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi6days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后六日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi7days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '激活后七日付费ROI(广告)', dataIndex: 'attributionGameInAppRoi8days', label: '广告媒体端数据', align: 'center', className: "adDataBackColorClass", width: 100, sorter: true,
                    render: (a: number) => <Statistic value={a ? a : 0} precision={2} valueStyle={!a ? {} : a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
            ]
        },
        {
            label: '用户数据',
            data: [
                {
                    title: '注册人数',
                    tips: '新增用户数（首次注册用户）',
                    dataIndex: 'regNum',
                    label: '用户数据',
                    align: 'center',
                    width: 70,
                    sorter: true,
                    default: 31,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总注册人数', dataIndex: 'regTotalNum', label: '用户数据', align: 'center', width: 70, tips: '广告的总注册人数', sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日创角人数', dataIndex: 'firstRoleNum', label: '用户数据', align: 'center', width: 60, sorter: true, default: 33,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '新用户累计创角人数', dataIndex: 'newUserTotalRoleNum', label: '用户数据', align: 'center', width: 70, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总创角人数', dataIndex: 'roleTotalNum', label: '用户数据', align: 'center', width: 60, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, sorter: true, default: 32,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总注册成本', dataIndex: 'regTotalCost', label: '用户数据', align: 'center', width: 70, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日创角成本', dataIndex: 'firstRoleCost', label: '用户数据', align: 'center', width: 60, sorter: true, default: 34,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '新用户创角成本', dataIndex: 'newUserTotalRoleCost', label: '用户数据', align: 'center', width: 65, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总创角成本', dataIndex: 'roleTotalCost', label: '用户数据', align: 'center', width: 60, sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日创角率', dataIndex: 'firstRoleRate', label: '用户数据', align: 'center', width: 70, sorter: true, default: 35,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '新用户创角率', dataIndex: 'newUserTotalRoleRate', label: '用户数据', align: 'center', width: 70, sorter: true,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '总创角率', dataIndex: 'roleTotalRate', label: '用户数据', align: 'center', width: 80, sorter: true,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
            ]
        },
        {
            label: '付费数据',
            data: [
                {
                    title: '首日充值次数', tips: "新增付费次数（首次注册并充值的总次数）", dataIndex: 'firstNewUserAmountCount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass', default: 27,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日充值人数', tips: '新增付费人数（首次注册并充值人数）', dataIndex: 'firstNewUserAmountNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass', default: 28,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日充值金额', tips: '新增付费金额（首次注册并充值金额）', dataIndex: 'firstNewUserAmount', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass', default: 29,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费次数', dataIndex: 'newUserTotalAmountCount', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费人数', dataIndex: 'newUserTotalAmountNum', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费金额', dataIndex: 'newUserTotalAmount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '新用户24小时充值金额', dataIndex: 'twentyFourHoursAmount', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总充值次数', dataIndex: 'totalAmountCount', label: '付费数据', align: 'center', width: 50, className: 'payDataBackColorClass', sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总充值人数', dataIndex: 'totalAmountNum', label: '付费数据', align: 'center', width: 50, className: 'payDataBackColorClass', sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总充值金额', dataIndex: 'totalAmount', label: '付费数据', align: 'center', width: 70, className: 'payDataBackColorClass', sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日ROI', dataIndex: 'firstRoi', label: '付费数据', align: 'center', width: 65, sorter: true, default: 36, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '24小时ROI', dataIndex: 'twentyFourHoursRoi', label: '付费数据', align: 'center', width: 70, sorter: true, default: 37, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '总ROI', dataIndex: 'totalRoi', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '广告总ROI', dataIndex: 'promotionTotalRoi', label: '付费数据', align: 'center', width: 70, className: 'payDataBackColorClass', sorter: true,
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日充值成本', tips: '新增付费成本（首次注册并充值的用户成本）', dataIndex: 'firstNewUserRechargeCost', label: '付费数据', align: 'center', width: 80, sorter: true, default: 30, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费成本', dataIndex: 'newUserTotalRechargeCost', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '总付费成本', tips: '总付费成本（广告总付费用户成本）', dataIndex: 'totalRechargeCost', label: '付费数据', align: 'center', width: 70, className: 'payDataBackColorClass', sorter: true,
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日付费用户ARPPU', tips: '首日充值金额/首日充值人数', dataIndex: 'firstNewUserArppu', label: '付费数据', align: 'center', width: 70, sorter: true, default: 39, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费ARPPU', dataIndex: 'newUserTotalAmountArppu', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日付费100+用户数', tips: '首次注册并在注册当天单笔充值金额大于100的用户人数', dataIndex: 'firstNewUserHundredUserNum', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日付费100+用户付费成本', tips: '今日消耗/首日付费100+用户数', dataIndex: 'firstNewUserHundredUserCost', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费100+用户付费成本', dataIndex: 'newUserTotalHundredUserCost', label: '付费数据', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首充50~100元用户数', dataIndex: 'firstRechargeFiftyHundredNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首充50~100元占比', dataIndex: 'firstRechargeFiftyHundredRate', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日付费200+人数', tips: '首次注册并在注册当天单笔充值金额大于200的用户人数', dataIndex: 'firstNewUserTwoHundredUserNum', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日付费200+用户付费成本', tips: '今日消耗/首日付费200+用户数', dataIndex: 'firstNewUserTwoHundredUserCost', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费100+用户数', dataIndex: 'newUserTotalHundredUserNum', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日IOS付费次数', dataIndex: 'firstIosAmountCount', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日IOS付费人数', dataIndex: 'firstIosAmountNum', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日IOS付费金额', dataIndex: 'firstIosAmount', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日IOS付费人数占比', dataIndex: 'firstIosAmountNumRate', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日IOS付费金额占比', dataIndex: 'firstIosAmountRate', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日IOS付费ROI', dataIndex: 'firstIosAmountRoi', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日Android付费次数', dataIndex: 'firstAndroidAmountCount', label: '付费数据', align: 'center', width: 78, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日Android付费人数', dataIndex: 'firstAndroidAmountNum', label: '付费数据', align: 'center', width: 78, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日Android付费金额', dataIndex: 'firstAndroidAmount', label: '付费数据', align: 'center', width: 78, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '首日Android付费人数占比', dataIndex: 'firstAndroidAmountNumRate', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日Android付费金额占比', dataIndex: 'firstAndroidAmountRate', label: '付费数据', align: 'center', width: 95, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日Android付费ROI', dataIndex: 'firstAndroidAmountRoi', label: '付费数据', align: 'center', width: 80, sorter: true, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日付费率', dataIndex: 'firstAmountRate', label: '付费数据', align: 'center', width: 70, sorter: true, default: 38, className: 'payDataBackColorClass',
                    render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                },
                {
                    title: '首日客单价', tips: '首日客单价（数新增客单价）=首日新用户充值金额/首日新用户充值次', dataIndex: 'firstNewUserAvgPrice', label: '付费数据', align: 'center', width: 70, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今客单价', dataIndex: 'newUserTotalAvgPrice', label: '付费数据', align: 'center', width: 60, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '每日扣单数', dataIndex: 'subOrderNum', label: '付费数据', align: 'center', width: 60, sorter: true, default: 40, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '每日扣单金额', dataIndex: 'subOrderAmount', label: '付费数据', align: 'center', width: 60, sorter: true, default: 41, 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} />
                },
                {
                    title: '7日付费100+用户数', dataIndex: 'day7OneHundredAmountNum', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '7日付费100+用户付费成本', dataIndex: 'day7OneHundredAmountNumCost', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '7日付费200+用户数', dataIndex: 'day7TwoHundredAmountNum', label: '付费数据', align: 'center', width: 75, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '7日付费200+用户付费成本', dataIndex: 'day7TwoHundredAmountNumCost', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费200+用户数', dataIndex: 'newUserTwoHundredUserNum', label: '付费数据', align: 'center', width: 85, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                {
                    title: '至今付费200+用户付费成本', dataIndex: 'newUserTwoHundredUserNumCost', label: '付费数据', align: 'center', width: 90, sorter: true, className: 'payDataBackColorClass',
                    render: (a: any) => <Statistic value={a || 0} />
                },
                ...date
            ]
        }
    ]
}

export default columns12