wjx 1 سال پیش
والد
کامیت
9c4b3e4977

+ 0 - 7
src/app.tsx

@@ -55,13 +55,6 @@ export async function getInitialState(): Promise<{
             let menu: any = await getMenu().then((res: any) => {//获取菜单并处理
                 let { code, data } = res
                 let path = getMyMenu(code, data)
-                if (userInfo?.data?.userInfo?.account === 'admin' && path.length > 0) {//假如是ADMIN加入api测试
-                    path[0].routes.push({ key: 0, path: '/operatePage/apitest', name: 'api测试', icon: '', component: './operatePage/apitest', roles: 'admin' })
-                }
-                console.log(userInfo?.data?.userInfo)
-                if ([154, 123, 120].findIndex(i => i === userInfo?.data?.userInfo?.userId) !== -1 && path.length > 0) {
-                    path[0].routes.push({ key: 0, path: '/operatePage/qqAuth', name: '宝珠专用', icon: '', component: './operatePage/qqAuth', roles: 'admin' })
-                }
                 return { data: path }
             });
             localStorage.setItem('sex', userInfo?.data?.userInfo?.sex)

+ 9 - 0
src/components/QueryForm/const.tsx

@@ -1,4 +1,6 @@
+import { Badge } from "antd";
 import moment from "moment";
+import React from "react";
 
 export const rangePresets: any = {
     '今天排行': [moment(), moment()],
@@ -28,4 +30,11 @@ export const gameClassifyEnum = {
     '4': 'Ios App',
     '5': 'H5游戏',
     '6': '微信小游戏'
+}
+
+export const PayStatus = {
+    '0': <Badge status="default" text="预下单" />,
+    '1': <Badge status="processing" text="待支付" />,
+    '2': <Badge status="success" text="支付成功" />,
+    '3': <Badge status="error" text="已取消" />,
 }

+ 3 - 5
src/components/QueryForm/index.tsx

@@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react"
 import moment from "moment"
 import { useAjax } from "@/Hook/useAjax"
 import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi } from "@/services/gameData"
-import { TYPE, gameClassifyEnum } from "./const"
+import { PayStatus, TYPE, gameClassifyEnum } from "./const"
 
 
 interface Props {
@@ -513,9 +513,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    <Select.Option value={1}>待处理</Select.Option>
-                    <Select.Option value={2}>成功</Select.Option>
-                    <Select.Option value={3}>失败</Select.Option>
+                    {Object.keys(PayStatus).map(key => <Select.Option value={key} key={key}>{PayStatus[key]}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
             {/* 支付方式 */}
@@ -645,7 +643,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
             {/* 消耗日期 搜索 */}
             {isConsumeDay && <Col><Form.Item name='consumeDay'>
-                <DatePicker.RangePicker placeholder={['消耗开始日期', '消耗结束日期']} {...isConsumeDay}/>
+                <DatePicker.RangePicker placeholder={['消耗开始日期', '消耗结束日期']} {...isConsumeDay} />
             </Form.Item></Col>}
 
             {/* 消耗日期 搜索 */}

+ 18 - 3
src/pages/gameDataStatistics/allSurvey/lineC.tsx

@@ -37,12 +37,27 @@ const LineC: React.FC<Props> = (props) => {
             let b2Data: any = { legendName: '自然量充值' }
             let cData: any = { legendName: '首日ROI' }
             let d1Data: any = { legendName: '新增用户' }
-            res?.forEach((item: { amount: number, buyAmount: number, cost: number, dt: string, firstRoi: number, natureAmount: number, playerAccount: number }) => {
-                a1Data[item.dt] = item?.cost || 0
+            // 消耗 costLineList
+            // 新增用户 userLineList
+            /**
+             * amountLineList
+             * amount 充值
+             * buyAmount 买量充值
+             * natureAmount 自然量充值
+             * todayFirstNewUserAmount 首日新用户充值
+             * firstRoi 首日ROI
+             */
+            const { amountLineList = [], costLineList = [], userLineList = [] } = res
+            amountLineList?.forEach((item: { amount: number, buyAmount: number, natureAmount: number, firstRoi: number, dt: string }) => {
                 a2Data[item.dt] = item?.amount || 0
                 b1Data[item.dt] = item?.buyAmount || 0
                 b2Data[item.dt] = item?.natureAmount || 0
                 cData[item.dt] = item?.firstRoi || 0
+            })
+            costLineList?.forEach((item: { dt: string, cost: number }) => {
+                a1Data[item.dt] = item?.cost || 0
+            })
+            userLineList?.forEach((item: { dt: string, playerAccount: number }) => {
                 d1Data[item.dt] = item?.playerAccount || 0
             })
             setData({
@@ -63,7 +78,7 @@ const LineC: React.FC<Props> = (props) => {
                         <Radio.Button value="a">消耗&充值</Radio.Button>
                         <Radio.Button value="b">买量充值&自然量充值</Radio.Button>
                         <Radio.Button value="c">首日ROI</Radio.Button>
-                        <Radio.Button value="d">新增用户&创角人数</Radio.Button>
+                        <Radio.Button value="d">新增用户</Radio.Button>
                     </Radio.Group>
                     <DatePicker.RangePicker
                         placeholder={['开始日期', '结束日期']}

+ 5 - 4
src/pages/gameDataStatistics/extensionData/everyday/tableConfig.tsx

@@ -117,6 +117,7 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
             label: '用户数据',
             data: [
                 { title: '注册成本', dataIndex: 'regCost', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '注册人数', dataIndex: 'regUserCount', label: '用户数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
             ]
         },
         {
@@ -135,7 +136,7 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                 { title: '新用户累计充值人数', dataIndex: 'newUserRechargeUser', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '新用户累计充值金额', dataIndex: 'newUserRechargeMoney', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 {
-                    title: '首日回收率', dataIndex: 'todayRecoveryRate', label: '付费数据', align: 'center', width: 70, sorter: true,
+                    title: '首日回收率', dataIndex: 'firstRecoveryRate', label: '付费数据', align: 'center', width: 95, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
@@ -189,10 +190,10 @@ function columns12(gameType: any, rechargeTrendHandle: (data: any) => void): { l
                     title: '复充率', dataIndex: 'repeatRechargeRate', label: '付费数据', align: 'center', width: 70, sorter: true,
                     render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
-                { title: '新增注册ARPU', dataIndex: 'newRegARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '首日付费ARPU', dataIndex: 'firstRechargeARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '新增注册ARPU', dataIndex: 'newRegArpu', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
+                { title: '首日付费ARPU', dataIndex: 'firstRechargeArpu', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
                 { title: '当天付费ARPU', dataIndex: 'todayRechargeArpu', label: '付费数据', align: 'center', width: 80, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
-                { title: '账面ARPU', dataIndex: 'showRechargeARPU', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> }
+                { title: '账面ARPU', dataIndex: 'showRechargeArpu', label: '付费数据', align: 'center', width: 70, sorter: true, render: (a: string) => <Statistic value={a || 0} /> }
             ]
         },
         {

+ 1 - 1
src/pages/gameDataStatistics/order/index.tsx

@@ -68,7 +68,7 @@ const Order: React.FC = () => {
             />}
             scroll={{ x: 1000, y: 600 }}
             ajax={getOrderList}
-            fixed={{ left: 3, right: 0 }}
+            fixed={{ left: 3, right: 2 }}
             dataSource={getOrderList?.data?.records?.map((item: any, index: number) => ({ ...item, id: item?.orderId?.replace(/\D/g, '') || index }))}
             total={getOrderList?.data?.total}
             page={queryForm.pageNum}

+ 40 - 32
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -1,4 +1,4 @@
-import { gameClassifyEnum } from "@/components/QueryForm/const"
+import { PayStatus, gameClassifyEnum } from "@/components/QueryForm/const"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Badge, Statistic } from "antd"
 import React from "react"
@@ -36,11 +36,11 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '玩家注册渠道', dataIndex: 'agentId', label: '订单明细', align: 'center', width: 70, default: 8,
+                    title: '玩家注册渠道', dataIndex: 'agentName', label: '订单明细', align: 'center', width: 70, default: 8,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '玩家注册游戏', dataIndex: 'gameId', label: '订单明细', align: 'center', width: 70, default: 9,
+                    title: '玩家注册游戏', dataIndex: 'gameName', label: '订单明细', align: 'center', width: 70, default: 9,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
@@ -55,85 +55,93 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '归因投放人员', dataIndex: 'zxPitcherName', label: '订单明细', align: 'center', width: 65, default: 12,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
+                // {
+                //     title: '归因推广账号', dataIndex: 'accountId', label: '订单明细', align: 'center', width: 80, default: 13,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
+                // {
+                //     title: '归因媒体', dataIndex: 'accountType', label: '订单明细', align: 'center', width: 70, default: 14,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
+                // {
+                //     title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 70, default: 15,
+                //     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                // },
                 {
-                    title: '归因推广账号', dataIndex: 'accountId', label: '订单明细', align: 'center', width: 80, default: 13,
+                    title: '玩家充值游戏', dataIndex: 'orderGameName', label: '订单明细', align: 'center', width: 70, default: 13,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '归因媒体', dataIndex: 'accountType', label: '订单明细', align: 'center', width: 70, default: 14,
-                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                    title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 80, default: 14,
+                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
                 },
                 {
-                    title: '归因广告', dataIndex: 'adId', label: '订单明细', align: 'center', width: 70, default: 15,
+                    title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 15,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '玩家充值游戏', dataIndex: 'orderGameId', label: '订单明细', align: 'center', width: 70, default: 16,
-                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                    title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 80, default: 16,
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 80, default: 17,
-                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                    title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 80, default: 17,
+                    render: (a: any) => <Statistic value={a || 0} precision={2} />
                 },
                 {
-                    title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 18,
+                    title: '购买商品', dataIndex: 'productName', label: '订单明细', align: 'center', width: 95, default: 18,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 80, default: 19,
-                    render: (a: any) => <Statistic value={a || 0} precision={2} />
-                },
-                {
-                    title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 80, default: 20,
-                    render: (a: any) => <Statistic value={a || 0} precision={2} />
+                    title: '支付方式', dataIndex: 'payway', label: '订单明细', align: 'center', width: 65, default: 19,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付方式', dataIndex: 'payWay', label: '订单明细', align: 'center', width: 65, default: 21,
+                    title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 20,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 22,
+                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 21,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
+                { title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 85, default: 22 },
                 {
-                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 23,
+                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 85, default: 23,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 85, default: 24 },
                 {
-                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 85, default: 25,
+                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 50, default: 24,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 50, default: 26,
+                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 45, default: 25,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 45, default: 27,
+                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 65, default: 26,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 65, default: 28,
+                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 27,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 29,
+                    title: '下单时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 28,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 30,
+                    title: '支付时间', dataIndex: 'payTime', label: '订单明细', align: 'center', width: 135, default: 29,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 31,
+                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 30,
                     render: (a: string, b: any) => {
-                        return { '1': <Badge status="processing" text="待处理" />, '2': <Badge status="success" text="成功" />, '3': <Badge status="error" text="失败" /> }[a]
+                        return PayStatus[a]
                     }
                 },
                 {
-                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 32,
+                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 31,
                     render: (a: any) => {
-                        return a === 1 ? '是' : '否'
+                        return a == 1 ? '是' : '否'
                     }
                 },
             ]

+ 7 - 6
src/pages/gameDataStatistics/rankingList/account/tableConfig.tsx

@@ -1,3 +1,4 @@
+import { gameClassifyEnum } from "@/components/QueryForm/const"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import React from "react"
@@ -25,12 +26,12 @@ function columns12() {
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '推广游戏类型', dataIndex: 'gameClassify', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 5,
-                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                    title: '推广游戏类型', dataIndex: 'gameClassify', label: '推广账号消耗排行榜', align: 'center', width: 80, default: 5,
+                    render: (a: string) => (<WidthEllipsis value={gameClassifyEnum[a]} />)
                 },
                 {
                     title: '推广游戏CP名称', dataIndex: 'gameCp', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 6,
-                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                    render: (a: string, b: any) => (<WidthEllipsis value={a === 'null' ? '--' : a} />)
                 },
                 {
                     title: '消耗', dataIndex: 'cost', label: '推广账号消耗排行榜', align: 'center', width: 90, default: 7, sorter: true,
@@ -50,11 +51,11 @@ function columns12() {
                 },
                 {
                     title: '点击率', dataIndex: 'clickRate', label: '推广账号消耗排行榜', align: 'center', width: 80, default: 11, sorter: true,
-                    render: (a: number) => <Statistic value={a || 0} precision={5} valueStyle={a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
+                    render: (a: number) => <Statistic value={a || 0} valueStyle={a >= 100 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
                 },
                 {
                     title: '千次曝光成本', dataIndex: 'thousandDisplayPrice', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 12, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} precision={2}/>
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '注册人数', dataIndex: 'regUserCnt', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 13, sorter: true,
@@ -62,7 +63,7 @@ function columns12() {
                 },
                 {
                     title: '注册成本', dataIndex: 'regCost', label: '推广账号消耗排行榜', align: 'center', width: 100, default: 14, sorter: true,
-                    render: (a: string) => <Statistic value={a || 0} precision={2}/>
+                    render: (a: string) => <Statistic value={a || 0} precision={2} />
                 },
                 {
                     title: '首日创角人数', dataIndex: 'firstRole', label: '推广账号消耗排行榜', align: 'center', width: 70, default: 15, sorter: true,