wjx 1 year ago
parent
commit
6882dee650

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

@@ -102,4 +102,15 @@ export enum SourceSystemEnum {
     BG_NEW = '布谷-new',
     ZX_SDK = '布谷-zx',
     ZX_ONE = '赞象'
+}
+
+/**
+ * 支付场景
+ */
+export const PayScene = {
+    '1': 'PC支付',
+    '2': 'H5支付',
+    '3': 'App支付',
+    '4': '小程序支付',
+    '5': '米大师支付'
 }

+ 1 - 1
src/pages/gameDataStatistics/components/TableData/index.tsx

@@ -146,7 +146,7 @@ function TableData(props: Prosp) {
             })
             setOriginalColumns(c)
         }
-    }, { wait: 500 });
+    }, { wait: 200 });
     /**重组选中的字段 */
     useEffect(() => {
         let oldConfigName = oldName.current || ''

+ 3 - 3
src/pages/gameDataStatistics/order/details.tsx

@@ -1,5 +1,5 @@
 import { useAjax } from "@/Hook/useAjax"
-import { PayStatus, PayType, gameClassifyEnum } from "@/components/QueryForm/const"
+import { PayScene, PayStatus, PayType, gameClassifyEnum } from "@/components/QueryForm/const"
 import Tables from "@/components/Tables"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { CpLogListProps, getOrderCpNoticeApi } from "@/services/gameData/order"
@@ -30,7 +30,7 @@ const Details: React.FC<Props> = ({ visible, onClose, initialValues = {} }) => {
 
     const getList = () => {
         getOrderCpNotice.run(queryFrom).then(res => {
-            setLogList(res?.data)
+            setLogList(res)
         })
     }
 
@@ -52,7 +52,7 @@ const Details: React.FC<Props> = ({ visible, onClose, initialValues = {} }) => {
             <Descriptions.Item label="产品名称" contentStyle={{ width: 240 }}>{initialValues?.productName || '<空>'}</Descriptions.Item>
             <Descriptions.Item label="渠道" contentStyle={{ width: 240 }}>{initialValues?.agentName || '<空>'}</Descriptions.Item>
             <Descriptions.Item label="支付方式" contentStyle={{ width: 240 }}>{PayType[initialValues?.payway] || '<空>'}</Descriptions.Item>
-            <Descriptions.Item label="支付场景" contentStyle={{ width: 240 }}>{initialValues?.payScene || '<空>'}</Descriptions.Item>
+            <Descriptions.Item label="支付场景" contentStyle={{ width: 240 }}>{PayScene[initialValues?.payScene] || '<空>'}</Descriptions.Item>
             <Descriptions.Item label="收款商户" contentStyle={{ width: 240 }}>{initialValues?.merchantName || '<空>'}</Descriptions.Item>
             <Descriptions.Item label="订单金额" contentStyle={{ width: 240 }}><Statistic value={initialValues?.amount || 0} precision={2} /></Descriptions.Item>
             <Descriptions.Item label="订单实付金额" contentStyle={{ width: 240 }}><Statistic value={initialValues?.realAmount || 0} precision={2} /></Descriptions.Item>

+ 35 - 39
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -1,4 +1,4 @@
-import { PayStatus, PayType, gameClassifyEnum } from "@/components/QueryForm/const"
+import { PayScene, PayStatus, PayType, gameClassifyEnum } from "@/components/QueryForm/const"
 import WidthEllipsis from "@/components/widthEllipsis"
 import { Statistic } from "antd"
 import React from "react"
@@ -79,67 +79,63 @@ function columns12(onDetail: (data: any) => void): { label: string, fieldSHow?:
                     render: (a: string, b: any) => (<WidthEllipsis value={gameClassifyEnum[a]} />)
                 },
                 {
-                    title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 15,
-                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
-                },
-                {
-                    title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 95, default: 16, sorter: true,
+                    title: '订单金额', dataIndex: 'amount', label: '订单明细', align: 'center', width: 95, default: 15, sorter: true,
                     render: (a: any, b: any) => <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} precision={2} />
                 },
                 {
-                    title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 95, default: 17, sorter: true,
+                    title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 95, default: 16, sorter: true,
                     render: (a: any, b: any) => <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} precision={2} />
                 },
                 {
-                    title: '购买商品', dataIndex: 'productName', label: '订单明细', align: 'center', width: 95, default: 18,
+                    title: '购买商品', dataIndex: 'productName', label: '订单明细', align: 'center', width: 95, default: 17,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付方式', dataIndex: 'payway', label: '订单明细', align: 'center', width: 65, default: 19,
+                    title: '支付方式', dataIndex: 'payway', label: '订单明细', align: 'center', width: 65, default: 18,
                     render: (a: string, b: any) => (<WidthEllipsis value={PayType[a]} />)
                 },
                 {
-                    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: 19,
+                    render: (a: string, b: any) => (<WidthEllipsis value={PayScene[a]} />)
                 },
                 {
-                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 21,
+                    title: '收款账户', dataIndex: 'payAccountId', label: '订单明细', align: 'center', width: 95, default: 20,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '原始服务器名', dataIndex: 'sourceServerName', label: '订单明细', align: 'center', width: 85, default: 22,
+                    title: '原始服务器名', dataIndex: 'sourceServerName', label: '订单明细', align: 'center', width: 85, default: 21,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 85, default: 23,
+                    title: '游戏区服', dataIndex: 'serverName', label: '订单明细', align: 'center', width: 85, default: 22,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 85, default: 24,
+                    title: '游戏角色', dataIndex: 'roleName', label: '订单明细', align: 'center', width: 85, default: 23,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 50, default: 25,
+                    title: '角色等级', dataIndex: 'roleLevel', label: '订单明细', align: 'center', width: 50, default: 24,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 45, default: 26,
+                    title: '角色VIP', dataIndex: 'roleVip', label: '订单明细', align: 'center', width: 45, default: 25,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 65, default: 27,
+                    title: '操作系统', dataIndex: 'os', label: '订单明细', align: 'center', width: 65, default: 26,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 28,
+                    title: '是否切量', dataIndex: 'orderIsSwitch', label: '订单明细', align: 'center', width: 45, default: 27,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '下单时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 29, sorter: true,
+                    title: '下单时间', dataIndex: 'orderCreateTime', label: '订单明细', align: 'center', width: 135, default: 28, sorter: true,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付时间', dataIndex: 'payTime', label: '订单明细', align: 'center', width: 135, default: 30, sorter: true,
+                    title: '支付时间', dataIndex: 'payTime', label: '订单明细', align: 'center', width: 135, default: 29, sorter: true,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
@@ -147,7 +143,7 @@ function columns12(onDetail: (data: any) => void): { label: string, fieldSHow?:
                     dataIndex: 'regUntilPay',
                     align: 'center',
                     width: 140,
-                    default: 31,
+                    default: 30,
                     render: (a: number) => {
                         if (a) {
                             function secondsToDhms(seconds: any) {
@@ -168,7 +164,7 @@ function columns12(onDetail: (data: any) => void): { label: string, fieldSHow?:
                     dataIndex: 'payUntilNow',
                     align: 'center',
                     width: 135,
-                    default: 32,
+                    default: 31,
                     render: (a: number) => {
                         if (a) {
                             function secondsToDhms(seconds: any) {
@@ -185,11 +181,11 @@ function columns12(onDetail: (data: any) => void): { label: string, fieldSHow?:
                     }
                 },
                 {
-                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 33,
+                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 32,
                     render: (a: string, b: any) => (<WidthEllipsis value={PayStatus[a]} />)
                 },
                 {
-                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 34,
+                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 33,
                     render: (a: any, b: any) => {
                         if (b?.day !== '总计') {
                             return a == 1 ? '是' : '否'
@@ -197,21 +193,21 @@ function columns12(onDetail: (data: any) => void): { label: string, fieldSHow?:
                         return '--'
                     }
                 },
-                // {
-                //     title: '操作', 
-                //     dataIndex: 'cz', 
-                //     label: '订单明细', 
-                //     align: 'center', 
-                //     width: 70, 
-                //     default: 34,
-                //     render: (a: any, b: any) => {
-                //         if (b?.day !== '总计') {
-                //             return <a onClick={() => onDetail(b)}>订单详情</a>
-                //         }
-                //         return '--'
+                {
+                    title: '操作', 
+                    dataIndex: 'cz', 
+                    label: '订单明细', 
+                    align: 'center', 
+                    width: 70, 
+                    default: 34,
+                    render: (a: any, b: any) => {
+                        if (b?.day !== '总计') {
+                            return <a onClick={() => onDetail(b)}>订单详情</a>
+                        }
+                        return '--'
 
-                //     }
-                // }
+                    }
+                }
             ]
         },
     ]