wjx 1 년 전
부모
커밋
14dd1dad07

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

@@ -437,7 +437,7 @@ const QueryForm: React.FC<Props> = (props) => {
                 >
                     <Select.Option value={'1'}>待处理</Select.Option>
                     <Select.Option value={'2'}>成功</Select.Option>
-                    <Select.Option value={'-1'}>失败</Select.Option>
+                    <Select.Option value={'3'}>失败</Select.Option>
                 </Select>
             </Form.Item></Col>}
 
@@ -625,11 +625,11 @@ const QueryForm: React.FC<Props> = (props) => {
             </Form.Item></Col>}
             {/* 收款商户号 */}
             {isMerchantOrderNo && <Col><Form.Item name='merchantOrderNo'>
-                <Input placeholder="商户订单号" allowClear style={{ width: 140 }} />
+                <Input placeholder="第三方支付订单号" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
             {/* 收款商户号 */}
             {isOrderId && <Col><Form.Item name='orderId'>
-                <Input placeholder="商户订单ID" allowClear style={{ width: 140 }} />
+                <Input placeholder="商户订单" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
 
             {/* 支付状态 */}

+ 1 - 1
src/components/QueryForm/intervalTime.tsx

@@ -36,7 +36,7 @@ const IntervalTime: React.FC<Props> = ({ value = [undefined, undefined], onChang
         <InputNumber value={data[0]} style={{ width: 110 }} min={0} placeholder="最小间隔时间" onChange={(num) => handleOk(num, 0)} />
         ~
         <InputNumber value={data[1]} style={{ width: 110 }} min={0} placeholder="最大间隔时间" onChange={(num) => handleOk(num, 1)} />
-        <Tooltip title="充值到支付的间隔时间(分)">
+        <Tooltip title="充值距注册时间区间(分钟)">
             <QuestionCircleOutlined />
         </Tooltip>
     </Space>

+ 3 - 110
src/components/VirtualTable/index.tsx

@@ -1,117 +1,10 @@
-import { Table } from 'antd';
 import type { TableProps } from 'antd';
-import classNames from 'classnames';
-import ResizeObserver from 'rc-resize-observer';
-import React, { useEffect, useRef, useState } from 'react';
-import { VariableSizeGrid as Grid } from 'react-window';
+import React from 'react';
 
 const VirtualTable = <RecordType extends object>(props: TableProps<RecordType>) => {
-    const { columns, scroll } = props;
-    const [tableWidth, setTableWidth] = useState(0);
+    
 
-    const widthColumnCount = columns!.filter(({ width }) => !width).length;
-    const mergedColumns = columns!.map(column => {
-        if (column.width) {
-            return column;
-        }
-
-        return {
-            ...column,
-            width: Math.floor(tableWidth / widthColumnCount),
-        };
-    });
-
-    const gridRef = useRef<any>();
-    const [connectObject] = useState<any>(() => {
-        const obj = {};
-        Object.defineProperty(obj, 'scrollLeft', {
-            get: () => {
-                if (gridRef.current) {
-                    return gridRef.current?.state?.scrollLeft;
-                }
-                return null;
-            },
-            set: (scrollLeft: number) => {
-                if (gridRef.current) {
-                    gridRef.current.scrollTo({ scrollLeft });
-                }
-            },
-        });
-
-        return obj;
-    });
-
-    const resetVirtualGrid = () => {
-        gridRef.current?.resetAfterIndices({
-            columnIndex: 0,
-            shouldForceUpdate: true,
-        });
-    };
-
-    useEffect(() => resetVirtualGrid, [tableWidth]);
-
-    const renderVirtualList = (rawData: object[], { scrollbarSize, ref, onScroll }: any) => {
-        ref.current = connectObject;
-        const totalHeight = rawData.length * 54;
-
-        return (
-            <Grid
-                ref={gridRef}
-                className="virtual-grid"
-                columnCount={mergedColumns.length}
-                columnWidth={(index: number) => {
-                    const { width } = mergedColumns[index];
-                    return totalHeight > (scroll!.y! as any) && index === mergedColumns.length - 1
-                        ? (width as number) - scrollbarSize - 1
-                        : (width as number);
-                }}
-                height={scroll!.y as number}
-                rowCount={rawData.length}
-                rowHeight={() => 54}
-                width={tableWidth}
-                onScroll={({ scrollLeft }: { scrollLeft: number }) => {
-                    onScroll({ scrollLeft });
-                }}
-            >
-                {({
-                    columnIndex,
-                    rowIndex,
-                    style,
-                }: {
-                    columnIndex: number;
-                    rowIndex: number;
-                    style: React.CSSProperties;
-                }) => (
-                    <div
-                        className={classNames('virtual-table-cell', {
-                            'virtual-table-cell-last': columnIndex === mergedColumns.length - 1,
-                        })}
-                        style={style}
-                    >
-                        {(rawData[rowIndex] as any)[(mergedColumns as any)[columnIndex].dataIndex]}
-                    </div>
-                )}
-            </Grid>
-        );
-    };
-
-    return (
-        <ResizeObserver
-            onResize={({ width }) => {
-                setTableWidth(width);
-            }}
-        >
-            <Table
-                {...props}
-                className="virtual-table"
-                columns={mergedColumns}
-                pagination={false}
-                components={{
-                    body: renderVirtualList as any,
-                }}
-            />
-        </ResizeObserver>
-    );
+    return <div>1111</div>
 };
 
 export default React.memo(VirtualTable)

+ 5 - 25
src/pages/gameDataStatistics/order/index.tsx

@@ -32,7 +32,7 @@ const Order: React.FC = () => {
             leftChild={<QueryForm
                 initialValues={{ sourceSystem: 'ZX_ONE' }}
                 onChange={(data: any) => {
-                    const { os, regStartDay, orderStatus, gameUserId, regEndDay, payTime, placeAnOrderTime, agentId, ...params } = data
+                    const { os, regStartDay, orderStatus, gameUserId, regEndDay, payTime, placeAnOrderTime, agentId, regPayIntervalTime, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
                     newQueryForm.deviceSystem = os
@@ -62,6 +62,10 @@ const Order: React.FC = () => {
                         delete newQueryForm.endDate
                     }
 
+                    if (regPayIntervalTime?.length > 0 && (regPayIntervalTime[0] || regPayIntervalTime[1])) {
+                        newQueryForm.regPayIntervalTimeMin = regPayIntervalTime[0]
+                        newQueryForm.regPayIntervalTimeMax = regPayIntervalTime[1]
+                    }
                     setQueryForm({ ...newQueryForm, ...params })
                 }}
                 isSource
@@ -100,7 +104,6 @@ const Order: React.FC = () => {
             pageSize={queryForm.pageSize}
             title='订单明细'
             onChange={(props: any) => {
-                console.log('props--->', props)
                 let { pagination, sortData } = props
                 let { current, pageSize } = pagination
                 let newQueryForm = JSON.parse(JSON.stringify(queryForm))
@@ -117,29 +120,6 @@ const Order: React.FC = () => {
             }}
             config={columns12()}
             configName={'订单明细'}
-        // summary={() => {
-        //     let defSelectData = localStorage.getItem(`myAdMonitorConfig1.0.0_订单明细`)
-        //     let newDefSelectData: any[] = []
-        //     if (defSelectData) {
-        //         newDefSelectData = JSON.parse(defSelectData)
-        //     } else {
-        //         newDefSelectData = columns12()[0]?.data
-        //     }
-        //     return <Table.Summary fixed={'top'}>
-        //         <Table.Summary.Row>
-        //             {newDefSelectData?.map((item: { dataIndex: string }, index: number) => {
-        //                 if (item.dataIndex === 'amount') {
-        //                     return <Table.Summary.Cell index={index} align='center' key={index}><Statistic valueStyle={{ color: 'red', fontWeight: 600 }} value={getOrderList?.data?.totalData?.totalAmount || 0} precision={2}/></Table.Summary.Cell>
-        //                 } else if (item.dataIndex === 'realAmount') {
-        //                     return <Table.Summary.Cell index={index} align='center' key={index}><Statistic valueStyle={{ color: 'red', fontWeight: 600 }} value={getOrderList?.data?.totalData?.totalRealAmount || 0} precision={2}/></Table.Summary.Cell>
-        //                 } else if (index === 0) {
-        //                     return <Table.Summary.Cell index={index} align='center' key={index}><span style={{ fontSize: 16, fontWeight: 'bold' }}>汇总</span></Table.Summary.Cell>
-        //                 }
-        //                 return <Table.Summary.Cell index={index} align='center' key={index}><span>--</span></Table.Summary.Cell>
-        //             })}
-        //         </Table.Summary.Row>
-        //     </Table.Summary>
-        // }}
         />
     </div>
 }

+ 10 - 4
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -26,7 +26,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     title: '第三方支付订单号', dataIndex: 'merchantOrderNo', label: '订单明细', align: 'center', width: 85, default: 4,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
-                { title: '玩家ID', dataIndex: 'gameUserId', label: '订单明细', align: 'center', width: 65, default: 5 },
+                {
+                    title: '玩家ID', dataIndex: 'gameUserId', label: '订单明细', align: 'center', width: 65, default: 5,
+                    render: (a: string, b: any) => (<WidthEllipsis value={a} />)
+                },
                 {
                     title: '玩家账号', dataIndex: 'username', label: '订单明细', align: 'center', width: 95, default: 6,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
@@ -73,7 +76,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '玩家充值游戏应用类型', dataIndex: 'orderGameClassify', label: '订单明细', align: 'center', width: 80, default: 14,
-                    render: (a: string) => (<span>{gameClassifyEnum[a]}</span>)
+                    render: (a: string, b: any) => (<WidthEllipsis value={gameClassifyEnum[a]} />)
                 },
                 {
                     title: '充值产品名称', dataIndex: 'productName', label: '订单明细', align: 'center', width: 85, default: 15,
@@ -85,7 +88,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                 },
                 {
                     title: '订单实付金额', dataIndex: 'realAmount', label: '订单明细', align: 'center', width: 80, default: 17, sorter: true,
-                    render: (a: any) => <Statistic value={a || 0} precision={2} />
+                    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,
@@ -103,7 +106,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     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: '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: 23,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)