wjx 7 months ago
parent
commit
d2e050acd7

+ 2 - 2
src/pages/gameDataStatistics/order/logA.tsx

@@ -1,7 +1,7 @@
 import { useAjax } from "@/Hook/useAjax"
 import { getBackLogApi } from "@/services/gameData/order"
 import { Modal, Table } from "antd"
-import React, { useEffect, useState } from "react"
+import React, { useState } from "react"
 import columnsLog from "./logTableConfig"
 
 
@@ -36,7 +36,7 @@ const LogA: React.FC<Props> = ({ orderId, backTableName }) => {
             width={900}
             bodyStyle={{padding: '0 10px'}}
         >
-            <Table columns={columnsLog()} rowKey={'id'} scroll={{ x: 1000 }} dataSource={getBackLog?.data} />
+            <Table columns={columnsLog()} rowKey={'id'} scroll={{ x: 1000 }} dataSource={getBackLog?.data} loading={getBackLog.loading}/>
         </Modal>}
     </>
 }

+ 38 - 7
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -79,7 +79,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                 },
                 {
                     title: '玩家注册游戏应用类型', dataIndex: 'classify', label: '订单明细', align: 'center', width: 80, default: 11,
-                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                    render: (a: string) => (<span>{gameClassifyEnum[a as keyof typeof gameClassifyEnum]}</span>)
                 },
                 {
                     title: '归因投放人员', dataIndex: 'zxPitcherName', label: '订单明细', align: 'center', width: 65, default: 12,
@@ -91,7 +91,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                 },
                 {
                     title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 80, default: 14,
-                    render: (a: string, b: any) => (<WidthEllipsis value={gameClassifyEnum[a]} />)
+                    render: (a: string, b: any) => (<WidthEllipsis value={gameClassifyEnum[a as keyof typeof gameClassifyEnum]} />)
                 },
                 {
                     title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 95, default: 15, sorter: true,
@@ -137,11 +137,11 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                 },
                 {
                     title: '支付方式', dataIndex: 'payway', label: '订单明细', align: 'center', width: 65, default: 18,
-                    render: (a: string, b: any) => (<WidthEllipsis value={PayType[a]} />)
+                    render: (a: string, b: any) => (<WidthEllipsis value={PayType[a as keyof typeof PayType]} />)
                 },
                 {
                     title: '支付场景', dataIndex: 'payScene', label: '订单明细', align: 'center', width: 95, default: 19,
-                    render: (a: string, b: any) => (<WidthEllipsis value={PayScene[a]} />)
+                    render: (a: string, b: any) => (<WidthEllipsis value={PayScene[a as keyof typeof PayScene]} />)
                 },
                 {
                     title: '收款账户名', dataIndex: 'merchantName', label: '订单明细', align: 'center', width: 95, default: 20,
@@ -212,7 +212,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                     title: '最近充值时间距今',
                     dataIndex: 'payUntilNow',
                     align: 'center',
-                    width: 135,
+                    width: 150,
                     default: 32,
                     render: (a: number) => {
                         if (a) {
@@ -231,7 +231,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                 },
                 {
                     title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 33,
-                    render: (a: string, b: any) => (<WidthEllipsis value={PayStatus[a]} />)
+                    render: (a: string, b: any) => PayStatus[a as keyof typeof PayStatus]
                 },
                 {
                     title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 39,
@@ -242,6 +242,37 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                         return '--'
                     }
                 },
+                {
+                    title: '游戏类型', dataIndex: 'category', label: '订单明细', align: 'center', width: 80,
+                    render: (a: string, b: any) => {
+                        const c = {
+                            CATEGORY_WX_APPLET: '微信小游戏',
+                            CATEGORY_H5: 'h5游戏',
+                            CATEGORY_IOS_APP: 'IOS APP',
+                            CATEGORY_ANDROID_APP: 'Android APP',
+                            CATEGORY_DY_APPLET: '抖音小游戏',
+                            CATEGORY_APP: 'APP'
+                        }
+                        return <WidthEllipsis value={c[a as keyof typeof c]} />
+                    }
+                },
+                {
+                    title: '投放类型', dataIndex: 'putType', label: '订单明细', align: 'center', width: 80,
+                    render: (a: string, b: any) => {
+                        const c = {
+                            '0': '导量APP',
+                            '1': '头条直投APP',
+                            '2': '腾讯直投APP',
+                            '3': '头条私域投APP',
+                            '4': '腾讯私域投APP'
+                        }
+                        return <WidthEllipsis value={c[a as keyof typeof c]} />
+                    }
+                },
+                {
+                    title: '拆单笔数', dataIndex: 'backCount', label: '订单明细', align: 'center', width: 80, sorter: true,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
                 {
                     title: '操作',
                     dataIndex: 'cz',
@@ -252,7 +283,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                     render: (a: any, b: any) => {
                         if (b?.day !== '总计') {
                             return <Space>
-                                <LogA orderId={b?.orderId} backTableName={b?.backTableName} />
+                                <LogA orderId={b?.orderId} backTableName={b?.backTableName || 'oceanengine_app'}/>
                                 {(b?.backStatus !== 2 && b?.backStatus !== 1) && <a onClick={() => back(b)}>回传</a>}
                                 <a onClick={() => onDetail(b)}>订单详情</a>
                             </Space>

+ 10 - 1
src/services/gameData/order.ts

@@ -133,7 +133,7 @@ export async function setBackApi({ type, ...data }: { type: 'byte' | 'tencent_mi
  * @param param0 
  * @returns 
  */
-export async function getBackLogApi({ type, orderId }: { type: 'byte' | 'tencent_mini' | 'tencent_h5', orderId: string }) {
+export async function getBackLogApi({ type, orderId }: { type: 'byte' | 'tencent_mini' | 'tencent_h5' | 'oceanengine_app' | 'tencent_app' | 'tencent_app_api', orderId: string }) {
     switch (type) {
         case 'byte':
             return request(erpApi + `/gameBack/oceanengine/orderSplitList/${orderId}`, {
@@ -147,5 +147,14 @@ export async function getBackLogApi({ type, orderId }: { type: 'byte' | 'tencent
             return request(erpApi + `/gameBack/tencent/orderSplitList/${orderId}`, {
                 method: 'GET'
             });
+        case 'oceanengine_app':
+            return request(erpApi + `/gameBack/oceanengineApp/orderSplitList/${orderId}`, {
+                method: 'GET'
+            });
+        case 'tencent_app': // 腾讯app
+        case 'tencent_app_api': // 腾讯企微app先宇19:29
+            return request(erpApi + `/gameBack/xxxxx/${orderId}`, {
+                method: 'GET'
+            });
     }
 }