wjx 1 year ago
parent
commit
6a749c0a95

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

@@ -225,6 +225,8 @@ interface Props {
     isWakeUp?: boolean
     /** 是否开启 回传状态 搜索 */
     isBackStatus?: boolean
+    /** 是否开启 选择游戏维度 搜索 */
+    isGameDimension?: boolean
 }
 /**
  * 游戏数据系统 请求参数
@@ -239,7 +241,7 @@ const QueryForm: React.FC<Props> = (props) => {
         isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isSysUserIds, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
         payTimeDay, placeAnOrderDay, isPayIntervalTime, isActiveTypes, isNickname, isMobile, isRegIp, isIsAuth, isIsBindMobile, isIsRecharge, isUserStatus, isCreateRole, isRoleCount, isVipLevel, isCreateRoleDay, isIsChange, isIsSendMail, isWeChatCompany, isWeChat,
         isCustomerServerId, isOperatorId, isGsId, isServerIds, isRankingNum, isIsMergeServer, isSuperParentGameId, isGameServerName, isIp, isDeviceType, isLoginType, isServerIdUn, isSourceServerName, isProjectId1, isRemoveGame, isRemoveGameForSystem, isOrderLy, isAddCorpWechat,
-        isWakeUp, isBackStatus
+        isWakeUp, isBackStatus, isGameDimension
     } = props
     const [form] = Form.useForm()
     const parentId = Form.useWatch('parentId', form)
@@ -249,6 +251,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const serverIds = Form.useWatch('serverIds', form)
     const sourceSystem = Form.useWatch('sourceSystem', form)
     const parentGameIds = Form.useWatch('parentGameIds', form)
+    const gameDimension = Form.useWatch('gameDimension', form)
     const [accountList, setAccountList] = useState<any[]>([])
     const [userIdList, setUserIdList] = useState<any[]>([])
     const [gsList, setGsList] = useState<any[]>([])
@@ -386,7 +389,6 @@ const QueryForm: React.FC<Props> = (props) => {
             }
         }
     }, [isAgentId, sourceSystem])
-    console.log('agentData--->', agentData)
 
     /** 游戏应用类型 */
     useEffect(() => {
@@ -742,6 +744,10 @@ const QueryForm: React.FC<Props> = (props) => {
             {isGameName && <Col><Form.Item name='gameName'>
                 <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
             </Form.Item></Col>}
+            {/* 是否 开启 添加父游戏维度筛选 */}
+            {isGameDimension && <Col><Form.Item name='gameDimension' valuePropName="checked">
+                <Checkbox onChange={() => form.setFieldsValue({ gameId: undefined })}>是否父游戏</Checkbox>
+            </Form.Item></Col>}
             {/* 游戏ID搜索 */}
             {isGameId && <Col><Form.Item name='gameId'>
                 <Select
@@ -771,7 +777,7 @@ const QueryForm: React.FC<Props> = (props) => {
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                 >
-                    {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
+                    {gameDimension ? parentGameList?.map((item: any) => <Select.Option value={item.parent_game_id} key={item.parent_game_id} data-super-id={item.super_game_id}>{item.parent_game_name}</Select.Option>) : getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
                 </Select>
             </Form.Item></Col>}
             {/* 充值游戏ID */}

+ 4 - 2
src/pages/gameDataStatistics/gameData/active/index.tsx

@@ -45,9 +45,10 @@ const Active: React.FC = () => {
                 initialValues={{ regDay: [moment(), moment()], sourceSystem: 'ZX_ONE', tableTypes: 'buy', activeTypes: 'reg' }}
                 onChange={(data: any) => {
                     console.log(data)
-                    const { regStartDay, gameClassify, regEndDay, rechargeDay, ...params } = data
+                    const { regStartDay, gameClassify, regEndDay, rechargeDay, gameDimension, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
+                    newQueryForm.gameDimension = gameDimension ? 2 : 1
                     if (regStartDay && regEndDay) {
                         newQueryForm.registeredBeginDate = regStartDay
                         newQueryForm.registeredEndDate = regEndDay
@@ -60,10 +61,11 @@ const Active: React.FC = () => {
                 }}
                 isSource
                 isRegDay={{ ranges: getPresets() }}
-                isGameId
+                isGameIds
                 isBGGameClassify
                 isUserEnterType
                 isActiveTypes
+                isGameDimension
             />}
             isZj
             totalData={totalData}

+ 4 - 2
src/pages/gameDataStatistics/gameData/again/index.tsx

@@ -40,9 +40,10 @@ const Again: React.FC = () => {
                 initialValues={{ regDay: [moment(), moment()], sourceSystem: 'ZX_ONE', tableTypes: 'buy' }}
                 onChange={(data: any) => {
                     console.log(data)
-                    const { regStartDay, gameClassify, regEndDay, rechargeDay, ...params } = data
+                    const { regStartDay, gameClassify, regEndDay, rechargeDay, gameDimension, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
+                    newQueryForm.gameDimension = gameDimension ? 2 : 1
                     if (regStartDay && regEndDay) {
                         newQueryForm.registeredBeginDate = regStartDay
                         newQueryForm.registeredEndDate = regEndDay
@@ -55,9 +56,10 @@ const Again: React.FC = () => {
                 }}
                 isSource
                 isRegDay={{ ranges: getPresets() }}
-                isGameId
+                isGameIds
                 isBGGameClassify
                 isUserEnterType
+                isGameDimension
             />}
             isZj
             totalData={totalData}

+ 3 - 2
src/pages/gameDataStatistics/gameData/everyday/index.tsx

@@ -50,10 +50,10 @@ const Everyday: React.FC = () => {
             leftChild={<QueryForm
                 initialValues={{ regDay: [moment(), moment()], sourceSystem: 'ZX_ONE', tableTypes: 'buy' }}
                 onChange={(data: any) => {
-                    console.log(data)
-                    const { regStartDay, regEndDay, rechargeDay, ...params } = data
+                    const { regStartDay, regEndDay, rechargeDay, gameDimension, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
+                    newQueryForm.gameDimension = gameDimension ? 2 : 1
                     if (regStartDay && regEndDay) {
                         newQueryForm.registeredBeginDate = regStartDay
                         newQueryForm.registeredEndDate = regEndDay
@@ -74,6 +74,7 @@ const Everyday: React.FC = () => {
                 isSource
                 isRegDay={{ ranges: getPresets() }}
                 isGameIds
+                isGameDimension
             />}
             isZj
             totalData={totalData}

+ 3 - 1
src/pages/gameDataStatistics/gameData/ltv/index.tsx

@@ -49,9 +49,10 @@ const Ltv: React.FC = () => {
                 initialValues={{ regDay: [moment(), moment()], sourceSystem: 'ZX_ONE', tableTypes: 'buy' }}
                 onChange={(data: any) => {
                     console.log(data)
-                    const { regStartDay, gameClassify, regEndDay, rechargeDay, ...params } = data
+                    const { regStartDay, gameClassify, regEndDay, rechargeDay, gameDimension, ...params } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
+                    newQueryForm.gameDimension = gameDimension ? 2 : 1
                     if (regStartDay && regEndDay) {
                         newQueryForm.registeredBeginDate = regStartDay
                         newQueryForm.registeredEndDate = regEndDay
@@ -67,6 +68,7 @@ const Ltv: React.FC = () => {
                 isGameId
                 isBGGameClassify
                 isUserEnterType
+                isGameDimension
             />}
             isZj
             totalData={totalData}

+ 31 - 9
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -9,14 +9,6 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
         {
             label: '回传信息',
             data: [
-                {
-                    title: '角色累计充值金额', dataIndex: 'roleTotalAmount', label: '回传信息', align: 'center', width: 100, default: 34,
-                    render: (a: any, b: any) => <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} precision={2} />
-                },
-                {
-                    title: '角色累计充值次数', dataIndex: 'roleTotalAmountCount', label: '回传信息', align: 'center', width: 90, default: 35,
-                    render: (a: any, b: any) => <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} />
-                },
                 {
                     title: '回传状态', dataIndex: 'backStatus', label: '回传信息', width: 100, default: 38,
                     render: (a: any) => {
@@ -24,7 +16,7 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                     }
                 },
                 {
-                    title: '回传金额', dataIndex: 'backMoney', label: '回传信息', align: 'center', width: 90, default: 36,
+                    title: '回传金额', dataIndex: 'backMoney', label: '回传信息', align: 'center', width: 100, default: 36,
                     render: (a: any, b: any) => <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} precision={2} />
                 },
                 {
@@ -108,6 +100,36 @@ function columns12(onDetail: (data: any) => void, back: (b: any) => void): { lab
                     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: 'roleTotalAmount', label: '订单明细', align: 'center', width: 100, default: 34,
+                    render: (a: any, b: any) => {
+                        if (b?.day === '总计') {
+                            return '--'
+                        } else {
+                            return <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} precision={2} />
+                        }
+                    }
+                },
+                {
+                    title: '角色累计充值次数', dataIndex: 'roleTotalAmountCount', label: '订单明细', align: 'center', width: 90, default: 35,
+                    render: (a: any, b: any) => {
+                        if (b?.day === '总计') {
+                            return '--'
+                        } else {
+                            return <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} />
+                        }
+                    }
+                },
+                {
+                    title: '角色注册7日内订单数', dataIndex: 'roleOrder7DayTotal', label: '订单明细', align: 'center', width: 90,
+                    render: (a: any, b: any) => {
+                        if (b?.day === '总计') {
+                            return '--'
+                        } else {
+                            return <Statistic value={a || 0} valueStyle={b?.day === '总计' ? { color: 'red' } : {}} />
+                        }
+                    }
+                },
                 {
                     title: '购买商品', dataIndex: 'productName', label: '订单明细', align: 'center', width: 95, default: 17,
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)