wjx 1 rok pred
rodič
commit
884dd24b2f

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

@@ -2,7 +2,7 @@ import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row
 import React, { useEffect, useState } from "react"
 import moment from "moment"
 import { useAjax } from "@/Hook/useAjax"
-import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameServerUnListApi, getAccountListNewApi, getAgentListNewApi, getPitcherListNewApi, getGameListNewApi, getVipLevelApi } from "@/services/gameData"
+import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameServerUnListApi, getAccountListNewApi, getAgentListNewApi, getPitcherListNewApi, getGameListNewApi, getVipLevelApi, getGameServerNewApi } from "@/services/gameData"
 import { ActiveEnum, DeviceType, LoginType, PayStatus, TYPE, gameClassifyEnum } from "./const"
 import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
 import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
@@ -50,6 +50,7 @@ interface Props {
     isOrderGameId?: boolean
     /** 是否开启 父游戏ID 搜索 */
     isParentId?: boolean
+    isParentIds?: boolean
     /** 是否开启 超父游戏ID 搜索 */
     isSuperParentGameId?: boolean
     /** 是否开启 是否合服 搜索 */
@@ -232,7 +233,7 @@ const QueryForm: React.FC<Props> = (props) => {
     /**************************/
     const {
         onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isAgentKey, isAgentName, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isGameIds, isOrderGameId, isGameRoleId,
-        isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId, isProjectId, isProjectName, isPromotionId, isPromotionId1, isPromotionName,
+        isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId, isParentIds, isProjectId, isProjectName, isPromotionId, isPromotionId1, isPromotionName,
         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,
@@ -245,6 +246,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const serverName = Form.useWatch('serverName', form)
     const serverIds = Form.useWatch('serverIds', form)
     const sourceSystem = Form.useWatch('sourceSystem', form)
+    const parentGameIds = Form.useWatch('parentGameIds', form)
     const [accountList, setAccountList] = useState<any[]>([])
     const [userIdList, setUserIdList] = useState<any[]>([])
     const [gsList, setGsList] = useState<any[]>([])
@@ -268,6 +270,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const getVipLevel = useAjax(() => getVipLevelApi())
     const getRoleUserList = useAjax((params) => getRoleUserListApi(params))
     const getGameServerList = useAjax((params) => getGameServerListApi(params))
+    const getGameServerNew = useAjax((params) => getGameServerNewApi(params))
     const getGameServerUnList = useAjax((params) => getGameServerUnListApi(params))
     const getAccountListNew = useAjax((params) => getAccountListNewApi(params))
     const getAgentListNew = useAjax((params) => getAgentListNewApi(params))
@@ -321,7 +324,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
     /** 游戏列表 */
     useEffect(() => {
-        if (isGameId || isOrderGameId || isParentId || isGameIds || isSuperParentGameId) {
+        if (isGameId || isOrderGameId || isParentId || isParentIds || isGameIds || isSuperParentGameId) {
             getGameListNew.run({ sourceSystem }).then(res => {
                 const { gameList, parentGameList, superGameList } = res
                 if (['BG_OLD', 'BG_NEW', 'ZX_SDK'].includes(sourceSystem)) {
@@ -337,7 +340,7 @@ const QueryForm: React.FC<Props> = (props) => {
                 })
             }
         }
-    }, [isGameId, isGameIds, isOrderGameId, isParentId, isSuperParentGameId, sourceSystem])
+    }, [isGameId, isGameIds, isOrderGameId, isParentId, isParentIds, isSuperParentGameId, sourceSystem])
 
     useEffect(() => {
         if (isCpId) {
@@ -792,7 +795,7 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     style={{ minWidth: 140 }}
                     allowClear
-                    disabled={parentId}
+                    disabled={parentId || parentGameIds?.length > 0}
                     placeholder={'请选择超父游戏'}
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -844,6 +847,30 @@ const QueryForm: React.FC<Props> = (props) => {
                     {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>)}
                 </Select>
             </Form.Item></Col>}
+            {isParentIds && <Col><Form.Item name='parentGameIds'>
+                <Select
+                    maxTagCount={1}
+                    mode="multiple"
+                    showSearch
+                    style={{ minWidth: 140 }}
+                    allowClear
+                    disabled={superParentGameId}
+                    placeholder={'请选择父游戏'}
+                    filterOption={(input, option) =>
+                        (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                    }
+                    onChange={(e, option) => {
+                        if (isServerIds) {
+                            form.setFieldsValue({ serverIds: undefined })
+                        }
+                        if (isServerIdUn) {
+                            form.setFieldsValue({ serverId: undefined })
+                        }
+                    }}
+                >
+                    {parentGameList?.map((item: any) => <Select.Option value={item.parent_game_id} key={item.parent_game_id}>{item.parent_game_name}</Select.Option>)}
+                </Select>
+            </Form.Item></Col>}
 
             {(parentId || superParentGameId) && <>
                 {/* 广告区服名称 */}

+ 1 - 1
src/pages/gameDataStatistics/adlist/strategy/tableConfig.tsx

@@ -79,7 +79,7 @@ function columnsPos(
             key: 'effectiveScope',
             width: 250,
             render: (a: number[], b: any) => {
-                return <WidthEllipsis value={a.map(item => {
+                return <WidthEllipsis value={a?.map(item => {
                     if (b?.ruleDimension === 2) {
                         return getChannelChoiceList?.data?.find((i: { id: number }) => i.id === item)?.agentName
                     } else if (b?.ruleDimension === 3) {

+ 5 - 4
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/index.tsx

@@ -98,11 +98,11 @@ const RoleRechargeRanking: React.FC = () => {
                 initialValues={{ sourceSystem: 'ZX_ONE', rechargeDay: [moment(), moment()] }}
                 onChange={(data: any) => {
                     setSelectedRowKeys([])
-                    const { rechargeDay, createRoleDay, parentId, mobile, regPayIntervalTime, ...par } = data
+                    const { rechargeDay, createRoleDay, superParentGameId, mobile, regPayIntervalTime, ...par } = data
                     let newQueryForm = JSON.parse(JSON.stringify(queryForm))
                     newQueryForm.pageNum = 1
-                    newQueryForm.parentGameId = parentId
                     newQueryForm.phone = mobile
+                    newQueryForm.superGameId = superParentGameId
                     if (rechargeDay && rechargeDay?.length === 2) {
                         newQueryForm['rechargeBeginDate'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
                         newQueryForm['rechargeEndDate'] = moment(rechargeDay[1]).format('YYYY-MM-DD')
@@ -126,8 +126,9 @@ const RoleRechargeRanking: React.FC = () => {
                 isSource
                 rechargeDay={{ ranges: getPresetsRanking() }}
                 isCreateRoleDay={{ ranges: getPresetsRanking() }}
-                isParentId
-                isGameId
+                isSuperParentGameId
+                isParentIds
+                isGameIds
                 isIsChange
                 isMobile
                 isSysUserId

+ 5 - 0
src/services/gameData/index.ts

@@ -149,6 +149,11 @@ export async function getGameListNewApi(data: { sourceSystem: string }) {
     return request(api + `/gameData/choice/game/list`, { method: 'POST', data });
 }
 
+// 区服
+export async function getGameServerNewApi(data: { gameId?: number[], parentGameId?: number[], sourceSystem?: string }) {
+    return request(api + `/gameData/choice/gameServer/list`, { method: 'POST', data });
+}
+
 // 所有投手列表
 export async function getPitcherListNewApi(data: { sourceSystem: string }) {
     return request(api + `/gameData/choice/pitcher/list`, { method: 'POST', data });