index.tsx 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462
  1. import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row, Select, Space } from "antd"
  2. import React, { useEffect, useState } from "react"
  3. import moment from "moment"
  4. import { useAjax } from "@/Hook/useAjax"
  5. import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameServerUnListApi, getAccountListNewApi, getAgentListNewApi, getPitcherListNewApi, getGameListNewApi } from "@/services/gameData"
  6. import { ActiveEnum, DeviceType, LoginType, PayStatus, TYPE, gameClassifyEnum } from "./const"
  7. import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
  8. import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
  9. import IntervalTime from "./intervalTime"
  10. interface Props {
  11. onChange?: (data: any) => void
  12. /** 默认值 */
  13. initialValues?: any
  14. /** 开启数据源搜索 */
  15. isSource?: boolean,
  16. /** 是否开启 广告账号 搜索 */
  17. isAccount?: boolean
  18. /** 是否开启 广告账户ID 搜索 */
  19. isAccountId?: boolean
  20. /** 是否开启 公司ID 搜索 */
  21. isCompanyId?: boolean
  22. /** 是否开启 CPID 搜索 */
  23. isCpId?: boolean
  24. /** 是否开启 cp名 搜索 */
  25. isCpName?: boolean
  26. /** 是否开启 CP方订单ID 搜索 */
  27. isCpOrderId?: boolean
  28. /** 是否开启 CP通知状态 搜索 */
  29. isCpStatus?: boolean
  30. /** 是否开启 订单创建日期 搜索 */
  31. isCreateDay?: {
  32. ranges?: any
  33. }
  34. /** 是否开启 角色创建日期 搜索 */
  35. isCreateRoleDay?: {
  36. ranges?: any
  37. }
  38. /** 是否开启 操作设备 搜索 */
  39. isDevice?: boolean
  40. /** 是否开启 注册游戏名 搜索 */
  41. isRechargeGameName?: boolean
  42. /** 是否开启 游戏名 搜索 */
  43. isGameName?: boolean
  44. /** 是否开启 游戏ID 搜索 */
  45. isGameId?: boolean
  46. isGameIds?: boolean
  47. /** 是否开启 充值游戏ID 搜索 */
  48. isOrderGameId?: boolean
  49. /** 是否开启 父游戏ID 搜索 */
  50. isParentId?: boolean
  51. /** 是否开启 超父游戏ID 搜索 */
  52. isSuperParentGameId?: boolean
  53. /** 是否开启 是否合服 搜索 */
  54. isIsMergeServer?: boolean
  55. /** 是否开启 游戏应用类型 搜索 */
  56. isGameType?: boolean
  57. /** 是否开启 游戏角色名 搜索 */
  58. isGameRoleName?: boolean
  59. /** 是否开启 游戏角色名ID 搜索 */
  60. isGameRoleId?: boolean
  61. /** 是否开启 是否首充 搜索 */
  62. isFirstRecharge?: boolean
  63. /** 是否开启 是否切量 搜索 */
  64. isSwitch?: boolean
  65. /** 是否开启 收款商户号 搜索 */
  66. isMerchantNo?: boolean
  67. /** 是否开启 商户订单ID 搜索 */
  68. isOrderId?: boolean
  69. /** 是否开启 商户订单号 搜索 */
  70. isMerchantOrderNo?: boolean
  71. /** 是否开启 支付状态 搜索 */
  72. isPayStatus?: boolean
  73. /** 是否开启 支付方式 搜索 */
  74. isPayWay?: boolean
  75. /** 是否开启 产品名称 搜索 */
  76. isProductName?: boolean
  77. /** 是否开启 注册渠道名 搜索 */
  78. isRegAgent?: boolean
  79. /** 是否开启 渠道名称 搜索 */
  80. isAgentName?: boolean
  81. /** 是否开启 注册渠道ID 搜索 */
  82. isAgentId?: boolean
  83. /** 是否开启 渠道标识 搜索 */
  84. isAgentKey?: boolean
  85. /** 是否开启 投放渠道名 搜索 */
  86. isPutAgent?: boolean
  87. /** 是否开启 用户注册日期 搜索 */
  88. isRegDay?: {
  89. ranges?: any
  90. }
  91. /** 是否开启 投手名称 搜索 */
  92. isSysUserName?: boolean
  93. /** 是否开启 投手ID 搜索 */
  94. isSysUserId?: boolean
  95. /** 是否开启 玩家账号 搜索 */
  96. isUserName?: boolean
  97. /** 是否开启 用户ID 搜索 */
  98. isUserId?: boolean
  99. /** 是否开启 不同排行榜选择 搜索 */
  100. isSelectRanking?: boolean
  101. /** 是否开启 消耗日期 搜索 */
  102. isConsumeDay?: {
  103. ranges?: any
  104. }
  105. /** 是否开启 充值日期 搜索 */
  106. rechargeDay?: {
  107. ranges?: any
  108. }
  109. /** 是否开启 支付时间 搜索 */
  110. payTimeDay?: {
  111. ranges?: any
  112. }
  113. /** 是否开启 下单时间 搜索 */
  114. placeAnOrderDay?: {
  115. ranges?: any
  116. }
  117. /** 是否开启布谷 游戏类型 筛选 */
  118. isBGGameClassify?: boolean,
  119. /** 是否开启 单个充值日期 选择 */
  120. isRechargeDate?: boolean,
  121. /** 是否开启 开始时间 结束时间 搜索 */
  122. isBeginDay?: boolean
  123. /** 是否开启 玩家ID 搜索 */
  124. isGameUserId?: boolean
  125. /** 是否开启 操作系统 选择 */
  126. isOs?: boolean
  127. /** 是否开启 推广媒体 选择 */
  128. isType?: boolean
  129. /** 是否开启 计划ID 搜索 */
  130. isProjectId?: boolean
  131. /** 是否开启 计划名称 搜索 */
  132. isProjectName?: boolean
  133. /** 是否开启 广告ID 搜索 */
  134. isProjectId1?: boolean
  135. /** 是否开启 广告ID 搜索 */
  136. isPromotionId?: boolean
  137. /** 是否开启 计划ID 搜索 */
  138. isPromotionId1?: boolean
  139. /** 是否开启 广告名称 搜索 */
  140. isPromotionName?: boolean
  141. /** 是否开启 头条广告状态 搜索 */
  142. isAdTTStatus?: boolean
  143. /** 是否开启 腾讯广告状态 搜索 */
  144. isAdTXStatus?: boolean
  145. /** 是否开启 展示数据类型(买量,自然,总) 搜索 */
  146. isUserEnterType?: boolean
  147. /** 是否开启 区服名称 搜索 */
  148. isServerName?: boolean
  149. /** 是否开启 所在原始服务器名称 搜索 */
  150. isSourceServerName?: boolean
  151. /** 是否开启区服ID 搜索 */
  152. isServerId?: boolean
  153. /** 是否开启 开服时间 搜索 */
  154. isServerDay?: {
  155. ranges?: any
  156. }
  157. /** 是否开启 充值到支付的间隔时间 搜索 */
  158. isPayIntervalTime?: {
  159. tips?: string
  160. }
  161. /** 是否开启 充值到支付的间隔时间 搜索 */
  162. isRoleCount?: {
  163. tips?: string
  164. }
  165. /** 是否开启 留存数据的类型 搜索 */
  166. isActiveTypes?: boolean
  167. /** 是否开启 玩家昵称 搜索 */
  168. isNickname?: boolean
  169. /** 是否开启 绑定手机 搜索 */
  170. isMobile?: boolean
  171. /** 是否开启 注册IP 搜索 */
  172. isRegIp?: boolean
  173. /** 是否开启 IP 搜索 */
  174. isIp?: boolean
  175. /** 是否开启 是否实名认证 搜索 */
  176. isIsAuth?: boolean
  177. /** 是否开启 是否绑定手机 搜索 */
  178. isIsBindMobile?: boolean
  179. /** 是否开启 是否充值 搜索 */
  180. isIsRecharge?: boolean
  181. /** 是否开启 玩家状态 搜索 */
  182. isUserStatus?: boolean
  183. /** 是否开启 是否创角 搜索 */
  184. isCreateRole?: boolean
  185. /** 是否开启 角色VIP 搜索 */
  186. isVipLevel?: boolean
  187. /** 是否开启 是否转端 搜索 */
  188. isIsChange?: boolean
  189. /** 是否开启 邮件是否发送 搜索 */
  190. isIsSendMail?: boolean
  191. /** 是否开启 企业微信号 搜索 */
  192. isWeChatCompany?: boolean
  193. /** 是否开启 企业微信号 搜索 */
  194. isWeChat?: boolean
  195. /** 是否开启 客服 搜索*/
  196. isCustomerServerId?: boolean
  197. /** 是否开启 运营 搜索 */
  198. isOperatorId?: boolean
  199. /** 是否开启GS 搜索 */
  200. isGsId?: boolean
  201. /** 是否开启多个区服id搜索 */
  202. isServerIds?: boolean
  203. /** 是否开启 游戏区服 搜索 */
  204. isGameServerName?: boolean
  205. /** 是否开启多个区服id搜索 */
  206. isRankingNum?: boolean
  207. /** 是否开启 客户端类型 搜索 */
  208. isDeviceType?: boolean
  209. /** 是否开启 登录类型 搜索 */
  210. isLoginType?: boolean
  211. /** 是否开启 原始区服列表 搜索 */
  212. isServerIdUn?: boolean
  213. /** 是否开启 是否退游 搜索 */
  214. isRemoveGame?: boolean
  215. /** 是否开启 是否退游系统 搜索 */
  216. isRemoveGameForSystem?: boolean
  217. isOrderLy?: boolean
  218. /** 是否开启 是否添加企微 搜索 */
  219. isAddCorpWechat?: boolean
  220. /** 是否开启 是否唤醒 搜索 */
  221. isWakeUp?: boolean
  222. }
  223. /**
  224. * 游戏数据系统 请求参数
  225. * @returns
  226. */
  227. const QueryForm: React.FC<Props> = (props) => {
  228. /**************************/
  229. const {
  230. onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isAgentKey, isAgentName, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isGameIds, isOrderGameId, isGameRoleId,
  231. isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId, isProjectId, isProjectName, isPromotionId, isPromotionId1, isPromotionName,
  232. isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
  233. payTimeDay, placeAnOrderDay, isPayIntervalTime, isActiveTypes, isNickname, isMobile, isRegIp, isIsAuth, isIsBindMobile, isIsRecharge, isUserStatus, isCreateRole, isRoleCount, isVipLevel, isCreateRoleDay, isIsChange, isIsSendMail, isWeChatCompany, isWeChat,
  234. isCustomerServerId, isOperatorId, isGsId, isServerIds, isRankingNum, isIsMergeServer, isSuperParentGameId, isGameServerName, isIp, isDeviceType, isLoginType, isServerIdUn, isSourceServerName, isProjectId1, isRemoveGame, isRemoveGameForSystem, isOrderLy, isAddCorpWechat,
  235. isWakeUp
  236. } = props
  237. const [form] = Form.useForm()
  238. const parentId = Form.useWatch('parentId', form)
  239. const superParentGameId = Form.useWatch('superParentGameId', form)
  240. const isMergeServer = Form.useWatch('isMergeServer', form)
  241. const serverName = Form.useWatch('serverName', form)
  242. const serverIds = Form.useWatch('serverIds', form)
  243. const sourceSystem = Form.useWatch('sourceSystem', form)
  244. const [accountList, setAccountList] = useState<any[]>([])
  245. const [userIdList, setUserIdList] = useState<any[]>([])
  246. const [gsList, setGsList] = useState<any[]>([])
  247. const [customerList, setCustomerList] = useState<any[]>([])
  248. const [operateList, setOperateList] = useState<any[]>([])
  249. const [gameList, setGameList] = useState<any[]>([])
  250. const [parentGameList, setParentGameList] = useState<any[]>([])
  251. const [superGameList, setSuperGameList] = useState<any[]>([])
  252. const [agentData, setAgentData] = useState<{ label: string, value: string }[]>([])
  253. const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
  254. const getTtAllUserList = useAjax(() => getTtAllUserListApi())
  255. const getGameChoiceList = useAjax(() => getGameChoiceListApi())
  256. const getSubUserWithSelfList = useAjax(() => getSubUserWithSelfListApi())
  257. const getChannelChoiceList = useAjax(() => getChannelChoiceListApi())
  258. const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
  259. const getUserSystemTypeChoiceList = useAjax(() => getUserSystemTypeChoiceListApi())
  260. const getCpChoiceList = useAjax(() => getCpChoiceListApi())
  261. const getPayList = useAjax(() => getPayListApi())
  262. const getUserVipLevelChoiceList = useAjax(() => getUserVipLevelChoiceListApi())
  263. const getRoleUserList = useAjax((params) => getRoleUserListApi(params))
  264. const getGameServerList = useAjax((params) => getGameServerListApi(params))
  265. const getGameServerUnList = useAjax((params) => getGameServerUnListApi(params))
  266. const getAccountListNew = useAjax((params) => getAccountListNewApi(params))
  267. const getAgentListNew = useAjax((params) => getAgentListNewApi(params))
  268. const getPitcherListNew = useAjax((params) => getPitcherListNewApi(params))
  269. const getGameListNew = useAjax((params) => getGameListNewApi(params))
  270. /**************************/
  271. useEffect(() => {
  272. if (isCustomerServerId || isOperatorId || isGsId) {
  273. const getList = async () => {
  274. // 游戏GS
  275. let gs = await getRoleUserList.run({ authType: 'GS' })
  276. setGsList(gs ? Object.keys(gs)?.map(key => ({ userId: key, nickname: gs[key] })) : [])
  277. // 运营
  278. let operate = await getRoleUserList.run({ authType: 'OPERATE' })
  279. setOperateList(operate ? Object.keys(operate)?.map(key => ({ userId: key, nickname: operate[key] })) : [])
  280. // 客服
  281. let customer = await getRoleUserList.run({ authType: 'CUSTOMER' })
  282. setCustomerList(customer ? Object.keys(customer)?.map(key => ({ userId: key, nickname: customer[key] })) : [])
  283. }
  284. getList()
  285. }
  286. }, [isCustomerServerId, isOperatorId, isGsId])
  287. useEffect(() => {
  288. if (isAccountId) {
  289. // 请求广告账号列表
  290. async function getAccount() {
  291. if (sourceSystem === 'ZX_ONE') {
  292. let data: any[] = []
  293. let res1 = await getAllOfOwnerUser.run()
  294. let data1 = []
  295. if (res1) {
  296. data1 = res1?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.corporationName }))
  297. }
  298. let res2 = await getTtAllUserList.run()
  299. let data2 = []
  300. if (res2) {
  301. data2 = res2?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName }))
  302. }
  303. data = [...data1, ...data2]
  304. setAccountList(data)
  305. } else if (['BG_OLD', 'BG_NEW', 'ZX_SDK'].includes(sourceSystem)) {
  306. let res1 = await getAccountListNew.run({ sourceSystem })
  307. setAccountList(res1?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: '' })))
  308. }
  309. }
  310. getAccount()
  311. }
  312. }, [isAccountId, sourceSystem])
  313. /** 游戏列表 */
  314. useEffect(() => {
  315. if (isGameId || isOrderGameId || isParentId || isGameIds || isSuperParentGameId) {
  316. getGameListNew.run({ sourceSystem }).then(res => {
  317. const { gameList, parentGameList, superGameList } = res
  318. if (['BG_OLD', 'BG_NEW', 'ZX_SDK'].includes(sourceSystem)) {
  319. setGameList(gameList?.map((item: { id: any; game_name: any }) => ({ id: item.id, name: item.game_name })) || [])
  320. }
  321. setParentGameList(parentGameList)
  322. setSuperGameList(superGameList)
  323. })
  324. if (sourceSystem === 'ZX_ONE') {
  325. getGameChoiceList.run().then(res => {
  326. setGameList(res || [])
  327. })
  328. }
  329. }
  330. }, [isGameId, isGameIds, isOrderGameId, isParentId, isSuperParentGameId, sourceSystem])
  331. useEffect(() => {
  332. if (isCpId) {
  333. getCpChoiceList.run()
  334. }
  335. }, [isCpId])
  336. useEffect(() => {
  337. if (isVipLevel) {
  338. getUserVipLevelChoiceList.run()
  339. }
  340. }, [isVipLevel])
  341. /** 投手列表 */
  342. useEffect(() => {
  343. if (isSysUserId) {
  344. if (['BG_OLD', 'BG_NEW', 'ZX_SDK'].includes(sourceSystem)) {
  345. getPitcherListNew.run({ sourceSystem }).then(res => {
  346. setUserIdList(res?.map((item: { pitcherId: any; pitcherName: any }) => ({ userId: item.pitcherId, nickname: item.pitcherName })))
  347. })
  348. } else {
  349. getSubUserWithSelfList.run().then(res => {
  350. setUserIdList(res ? Object.keys(res)?.map(key => ({ userId: key, nickname: res[key] })) : [])
  351. })
  352. }
  353. }
  354. }, [isSysUserId, sourceSystem])
  355. /** 推广渠道 */
  356. useEffect(() => {
  357. if (isAgentId) {
  358. if (['BG_OLD', 'BG_NEW', 'ZX_SDK'].includes(sourceSystem)) {
  359. getAgentListNew.run({ sourceSystem }).then(res => {
  360. setAgentData(res?.map((item: { agentName: any; agentId: any }) => ({ label: item.agentName, value: item.agentId })))
  361. })
  362. } else {
  363. getChannelChoiceList.run().then(res => {
  364. console.log(res)
  365. setAgentData(res?.map((item: { agentName: any; id: any }) => ({ label: item.agentName, value: item.id })))
  366. })
  367. }
  368. }
  369. }, [isAgentId, sourceSystem])
  370. console.log('agentData--->', agentData)
  371. /** 游戏应用类型 */
  372. useEffect(() => {
  373. if (isGameType) {
  374. getGameChoiceParentListType1.run()
  375. }
  376. }, [isGameType])
  377. /** 操作系统 */
  378. useEffect(() => {
  379. if (isOs) {
  380. getUserSystemTypeChoiceList.run()
  381. }
  382. }, [isOs])
  383. /** 支付方式 */
  384. useEffect(() => {
  385. if (isPayWay) {
  386. getPayList.run()
  387. }
  388. }, [isPayWay])
  389. const onFinish = (data: any) => {
  390. // 处理订单创建日期
  391. if (isCreateDay) {
  392. if (data?.createDay && data?.createDay?.length > 0) {
  393. data.beginOrderTime = moment(data?.createDay[0]).format('YYYY-MM-DD')
  394. data.endOrderTime = moment(data?.createDay[1]).format('YYYY-MM-DD')
  395. } else {
  396. data.beginOrderTime = ''
  397. data.endOrderTime = ''
  398. }
  399. delete data.createDay
  400. }
  401. // 处理 用户注册日期
  402. if (isRegDay) {
  403. if (data?.regDay && data?.regDay?.length > 0) {
  404. data.regStartDay = moment(data?.regDay[0]).format('YYYY-MM-DD')
  405. data.regEndDay = moment(data?.regDay[1]).format('YYYY-MM-DD')
  406. } else {
  407. data.regStartDay = ''
  408. data.regEndDay = ''
  409. }
  410. delete data.regDay
  411. }
  412. // 处理 消耗日期
  413. if (isConsumeDay) {
  414. if (data?.consumeDay && data?.consumeDay?.length > 0) {
  415. data.costBeginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
  416. data.costEndDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
  417. } else {
  418. data.costBeginDay = ''
  419. data.costEndDay = ''
  420. }
  421. delete data.consumeDay
  422. }
  423. // 处理 不同排行榜 选择
  424. if (isSelectRanking) {
  425. switch (data?.dateType) {
  426. case 'all':
  427. data.beginDay = ''
  428. data.endDay = ''
  429. break;
  430. case 'today':
  431. data.beginDay = moment().format('YYYY-MM-DD')
  432. data.endDay = moment().format('YYYY-MM-DD')
  433. break
  434. case 'yesterday':
  435. data.beginDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
  436. data.endDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
  437. break
  438. case '7days':
  439. data.beginDay = moment().subtract(7, 'd').format('YYYY-MM-DD')
  440. data.endDay = moment().format('YYYY-MM-DD')
  441. break
  442. case '30days':
  443. data.beginDay = moment().subtract(30, 'd').format('YYYY-MM-DD')
  444. data.endDay = moment().format('YYYY-MM-DD')
  445. break
  446. }
  447. delete data?.dateType
  448. }
  449. console.log('更新了字段---->', data);
  450. onChange && onChange(data)
  451. }
  452. return <Form layout="inline" className='queryForm' initialValues={initialValues} name="basic" form={form} onFinish={onFinish}>
  453. <Row gutter={[0, 6]}>
  454. {/* 数据源搜索 */}
  455. {isSource && <Col><Form.Item name='sourceSystem'>
  456. <Select
  457. showSearch
  458. style={{ width: 100 }}
  459. allowClear
  460. placeholder={'数据源选择'}
  461. filterOption={(input, option) =>
  462. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  463. }
  464. >
  465. <Select.Option value="BG_OLD">布谷-old</Select.Option>
  466. <Select.Option value="BG_NEW">布谷-new</Select.Option>
  467. <Select.Option value="ZX_SDK">布谷-zx</Select.Option>
  468. <Select.Option value="ZX_ONE">赞象</Select.Option>
  469. </Select>
  470. </Form.Item></Col>}
  471. {/* 展示数据类型 */}
  472. {isUserEnterType && <Col><Form.Item name='tableTypes'>
  473. <Select
  474. showSearch
  475. style={{ width: 130 }}
  476. allowClear
  477. placeholder={'展示数据类型'}
  478. filterOption={(input, option) =>
  479. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  480. }
  481. >
  482. <Select.Option value="buy">买量</Select.Option>
  483. <Select.Option value="nature">自然量</Select.Option>
  484. <Select.Option value="total">总量</Select.Option>
  485. </Select>
  486. </Form.Item></Col>}
  487. {/* 订单渠道类型 */}
  488. {isOrderLy && <Col><Form.Item name='orderAgentType'>
  489. <Select
  490. showSearch
  491. style={{ width: 130 }}
  492. allowClear
  493. placeholder={'订单渠道类型'}
  494. filterOption={(input, option) =>
  495. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  496. }
  497. >
  498. <Select.Option value="buy">买量</Select.Option>
  499. <Select.Option value="nature">自然量</Select.Option>
  500. </Select>
  501. </Form.Item></Col>}
  502. {isActiveTypes && <Col><Form.Item name='activeTypes'>
  503. <Select
  504. showSearch
  505. style={{ width: 130 }}
  506. placeholder={'留存数据的类型'}
  507. filterOption={(input, option) =>
  508. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  509. }
  510. >
  511. {Object.keys(ActiveEnum).map(key => <Select.Option value={key} key={key}>{ActiveEnum[key]}</Select.Option>)}
  512. </Select>
  513. </Form.Item></Col>}
  514. {/* 不同排行榜选择 */}
  515. {isSelectRanking && <Col><Form.Item name='dateType'>
  516. <Radio.Group>
  517. <Radio.Button value="all">总排行</Radio.Button>
  518. <Radio.Button value="today">今日排行</Radio.Button>
  519. <Radio.Button value="yesterday">昨日排行</Radio.Button>
  520. <Radio.Button value="7days">7日排行</Radio.Button>
  521. <Radio.Button value="30days">30日排行</Radio.Button>
  522. </Radio.Group>
  523. </Form.Item></Col>}
  524. {/* 所在原始服务器名称 */}
  525. {isSourceServerName && <Col><Form.Item name='sourceServerName'>
  526. <Input placeholder="原始服务器名称" allowClear style={{ width: 140 }} />
  527. </Form.Item></Col>}
  528. {/* 广告区服名称 */}
  529. {isServerName && <Col><Form.Item name='serverName'>
  530. <Input placeholder="区服名称" allowClear style={{ width: 140 }} />
  531. </Form.Item></Col>}
  532. {/* 广告区服ID */}
  533. {isServerId && <Col><Form.Item name='serverId'>
  534. <Input placeholder="区服ID" allowClear style={{ width: 140 }} />
  535. </Form.Item></Col>}
  536. {/* 广告账户名称 */}
  537. {isAccount && <Col><Form.Item name='accountName'>
  538. <Input placeholder="广告账号名称" allowClear style={{ width: 140 }} />
  539. </Form.Item></Col>}
  540. {/* 广告账号ID */}
  541. {isAccountId && <Col><Form.Item name='accountId'>
  542. <Select
  543. maxTagCount={1}
  544. showSearch
  545. style={{ width: 140 }}
  546. allowClear
  547. placeholder={'广告账号'}
  548. loading={getAccountListNew.loading || getAllOfOwnerUser.loading}
  549. filterOption={(input, option) =>
  550. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  551. }
  552. >
  553. {accountList.map(item => <Select.Option key={item.value} value={item.value}>{item.label.toString() + (item.corporationName ? `_${item.corporationName}` : '')}</Select.Option>)}
  554. </Select>
  555. </Form.Item></Col>}
  556. {/* 公司ID */}
  557. {isCompanyId && <Col><Form.Item name='companyId'>
  558. <Select
  559. maxTagCount={1}
  560. showSearch
  561. style={{ minWidth: 140 }}
  562. allowClear
  563. placeholder={'请选择公司'}
  564. filterOption={(input, option) =>
  565. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  566. }
  567. >
  568. <Select.Option value={'1'}>公司001</Select.Option>
  569. <Select.Option value={'2'}>公司002</Select.Option>
  570. </Select>
  571. </Form.Item></Col>}
  572. {/* cp名 */}
  573. {isCpName && <Col><Form.Item name='cpName'>
  574. <Input placeholder="CP名称" allowClear style={{ width: 140 }} />
  575. </Form.Item></Col>}
  576. {/* CPID */}
  577. {isCpId && <Col><Form.Item name='cpId'>
  578. <Select
  579. maxTagCount={1}
  580. showSearch
  581. style={{ minWidth: 140 }}
  582. allowClear
  583. placeholder={'请选择CP'}
  584. filterOption={(input, option) =>
  585. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  586. }
  587. >
  588. {getCpChoiceList?.data?.map((item: { id: React.Key | null | undefined; cpName: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined }) => <Select.Option value={item.id} key={item.id}>{item.cpName}</Select.Option>)}
  589. </Select>
  590. </Form.Item></Col>}
  591. {/* CP方订单ID */}
  592. {isCpOrderId && <Col><Form.Item name='cpOrderId'>
  593. <Input placeholder="CP订单号" style={{ width: 140 }} />
  594. </Form.Item></Col>}
  595. {/* CP通知状态 */}
  596. {isCpStatus && <Col><Form.Item name='cpStatus'>
  597. <Select
  598. maxTagCount={1}
  599. showSearch
  600. style={{ minWidth: 140 }}
  601. allowClear
  602. placeholder={'CP通知状态'}
  603. filterOption={(input, option) =>
  604. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  605. }
  606. >
  607. <Select.Option value={'1'}>待处理</Select.Option>
  608. <Select.Option value={'2'}>成功</Select.Option>
  609. <Select.Option value={'3'}>失败</Select.Option>
  610. </Select>
  611. </Form.Item></Col>}
  612. {/* 计划名称 */}
  613. {isProjectName && <Col><Form.Item name='projectName'>
  614. <Input placeholder="项目名称" allowClear style={{ width: 140 }} />
  615. </Form.Item></Col>}
  616. {/* 计划ID */}
  617. {isProjectId && <Col><Form.Item name='projectId'>
  618. <Input placeholder="项目ID" allowClear style={{ width: 140 }} />
  619. </Form.Item></Col>}
  620. {/* 广告名称 */}
  621. {isPromotionName && <Col><Form.Item name='promotionName'>
  622. <Input placeholder="广告名称" allowClear style={{ width: 140 }} />
  623. </Form.Item></Col>}
  624. {/* 广告ID */}
  625. {isProjectId1 && <Col><Form.Item name='projectId'>
  626. <Input placeholder="广告ID" allowClear style={{ width: 140 }} />
  627. </Form.Item></Col>}
  628. {/* 广告ID */}
  629. {isPromotionId && <Col><Form.Item name='promotionId'>
  630. <Input placeholder="广告ID" allowClear style={{ width: 140 }} />
  631. </Form.Item></Col>}
  632. {/* 计划ID */}
  633. {isPromotionId1 && <Col><Form.Item name='promotionId'>
  634. <Input placeholder="计划ID" allowClear style={{ width: 140 }} />
  635. </Form.Item></Col>}
  636. {/* 广告状态 */}
  637. {isAdTTStatus && <Col><Form.Item name='status'>
  638. <Select
  639. maxTagCount={1}
  640. showSearch
  641. style={{ width: 140 }}
  642. allowClear
  643. dropdownMatchSelectWidth={false}
  644. placeholder={'请选择广告状态'}
  645. filterOption={(input, option) =>
  646. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  647. }
  648. >
  649. {Object.keys(ADSTTTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTTTATUSEnum[key]}</Select.Option>)}
  650. </Select>
  651. </Form.Item></Col>}
  652. {isAdTXStatus && <Col><Form.Item name='status'>
  653. <Select
  654. maxTagCount={1}
  655. showSearch
  656. style={{ width: 140 }}
  657. allowClear
  658. dropdownMatchSelectWidth={false}
  659. placeholder={'请选择广告状态'}
  660. filterOption={(input, option) =>
  661. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  662. }
  663. >
  664. {Object.keys(ADSTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTATUSEnum[key]}</Select.Option>)}
  665. </Select>
  666. </Form.Item></Col>}
  667. {/* 客户端类型 */}
  668. {isDeviceType && <Col><Form.Item name='deviceType'>
  669. <Select
  670. maxTagCount={1}
  671. showSearch
  672. style={{ width: 140 }}
  673. allowClear
  674. dropdownMatchSelectWidth={false}
  675. placeholder={'请选择客户端类型'}
  676. filterOption={(input, option) =>
  677. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  678. }
  679. >
  680. {Object.keys(DeviceType).map(key => <Select.Option value={key} key={key}>{DeviceType[key]}</Select.Option>)}
  681. </Select>
  682. </Form.Item></Col>}
  683. {/* 登录类型 */}
  684. {isLoginType && <Col><Form.Item name='type'>
  685. <Select
  686. maxTagCount={1}
  687. showSearch
  688. style={{ width: 140 }}
  689. allowClear
  690. dropdownMatchSelectWidth={false}
  691. placeholder={'请选择登录类型'}
  692. filterOption={(input, option) =>
  693. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  694. }
  695. >
  696. {Object.keys(LoginType).map(key => <Select.Option value={key} key={key}>{LoginType[key]}</Select.Option>)}
  697. </Select>
  698. </Form.Item></Col>}
  699. {/* 操作设备 */}
  700. {isDevice && <Col><Form.Item name='device'>
  701. <Input placeholder="操作设备" allowClear style={{ width: 140 }} />
  702. </Form.Item></Col>}
  703. {/* 游戏名 */}
  704. {isRechargeGameName && <Col><Form.Item name='rechargeGameName'>
  705. <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
  706. </Form.Item></Col>}
  707. {/* 玩家ID */}
  708. {isGameUserId && <Col><Form.Item name='gameUserId'>
  709. <Input placeholder="玩家ID" allowClear style={{ width: 140 }} />
  710. </Form.Item></Col>}
  711. {/* 游戏名 */}
  712. {isGameName && <Col><Form.Item name='gameName'>
  713. <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
  714. </Form.Item></Col>}
  715. {/* 游戏ID搜索 */}
  716. {isGameId && <Col><Form.Item name='gameId'>
  717. <Select
  718. maxTagCount={1}
  719. showSearch
  720. style={{ minWidth: 140 }}
  721. allowClear
  722. loading={getGameListNew.loading || getGameChoiceList.loading}
  723. placeholder={'请选择游戏'}
  724. filterOption={(input, option) =>
  725. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  726. }
  727. >
  728. {gameList?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  729. </Select>
  730. </Form.Item></Col>}
  731. {isGameIds && <Col><Form.Item name='gameId'>
  732. <Select
  733. maxTagCount={1}
  734. mode="multiple"
  735. showSearch
  736. style={{ minWidth: 140 }}
  737. allowClear
  738. placeholder={'请选择游戏'}
  739. filterOption={(input, option) =>
  740. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  741. }
  742. >
  743. {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  744. </Select>
  745. </Form.Item></Col>}
  746. {/* 充值游戏ID */}
  747. {isOrderGameId && <Col><Form.Item name='orderGameId'>
  748. <Select
  749. maxTagCount={1}
  750. showSearch
  751. style={{ minWidth: 140 }}
  752. allowClear
  753. placeholder={'请选择充值游戏'}
  754. filterOption={(input, option) =>
  755. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  756. }
  757. >
  758. {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  759. </Select>
  760. </Form.Item></Col>}
  761. {/* 超父游戏ID */}
  762. {isSuperParentGameId && <Col><Form.Item name='superParentGameId'>
  763. <Select
  764. maxTagCount={1}
  765. showSearch
  766. style={{ minWidth: 140 }}
  767. allowClear
  768. disabled={parentId}
  769. placeholder={'请选择超父游戏'}
  770. filterOption={(input, option) =>
  771. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  772. }
  773. onChange={(e) => {
  774. if (isServerIds && e) {
  775. form.setFieldsValue({ serverIds: undefined })
  776. getGameServerList.run({ gameId: e })
  777. } else {
  778. getGameServerList?.data && getGameServerList.mutate([])
  779. }
  780. }}
  781. >
  782. {superGameList?.map((item: any) => <Select.Option value={item.super_game_id} key={item.super_game_id}>{item.super_game_name}</Select.Option>)}
  783. </Select>
  784. </Form.Item></Col>}
  785. {/* 父游戏ID */}
  786. {isParentId && <Col><Form.Item name='parentId'>
  787. <Select
  788. maxTagCount={1}
  789. showSearch
  790. style={{ minWidth: 140 }}
  791. allowClear
  792. disabled={superParentGameId}
  793. placeholder={'请选择父游戏'}
  794. filterOption={(input, option) =>
  795. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  796. }
  797. onChange={(e, option) => {
  798. if (isServerIds) {
  799. form.setFieldsValue({ serverIds: undefined })
  800. if (option?.['data-super-id']) {
  801. getGameServerList.run({ gameId: option['data-super-id'] })
  802. } else {
  803. getGameServerList?.data && getGameServerList.mutate([])
  804. }
  805. }
  806. if (isServerIdUn) {
  807. form.setFieldsValue({ serverId: undefined })
  808. if (option?.['data-super-id']) {
  809. getGameServerUnList.run({ gameId: option['data-super-id'] })
  810. } else {
  811. getGameServerUnList?.data && getGameServerUnList.mutate([])
  812. }
  813. }
  814. }}
  815. >
  816. {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>)}
  817. </Select>
  818. </Form.Item></Col>}
  819. {(parentId || superParentGameId) && <>
  820. {/* 广告区服名称 */}
  821. {isGameServerName && <Col><Form.Item name='serverName'>
  822. <Input placeholder="区服名称" allowClear style={{ width: 140 }} disabled={serverIds?.length > 0} />
  823. </Form.Item></Col>}
  824. {/* 区服id */}
  825. {isServerIds && <Col><Form.Item name='serverIds'>
  826. <Select
  827. maxTagCount={1}
  828. mode="multiple"
  829. showSearch
  830. disabled={serverName}
  831. style={{ minWidth: 140 }}
  832. allowClear
  833. placeholder={'请选择区服'}
  834. filterOption={(input, option) =>
  835. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  836. }
  837. loading={getGameServerList.loading}
  838. >
  839. {getGameServerList?.data?.filter((item: { isSourceServer: any }) => (isIsMergeServer && ((!isMergeServer && item.isSourceServer) || (isMergeServer && !item.isSourceServer))) || !isIsMergeServer)?.map((item: any) => <Select.Option value={item.serverId} key={item.serverId}>{item.serverName}</Select.Option>)}
  840. </Select>
  841. </Form.Item></Col>}
  842. {/* 是否合服 */}
  843. {isIsMergeServer && <Col><Form.Item name='isMergeServer' valuePropName="checked">
  844. <Checkbox onChange={() => form.setFieldsValue({ serverIds: undefined })}>是否合服</Checkbox>
  845. </Form.Item></Col>}
  846. {/* 区服id */}
  847. {isServerIdUn && <Col><Form.Item name='serverId'>
  848. <Select
  849. maxTagCount={1}
  850. mode="multiple"
  851. showSearch
  852. disabled={serverName}
  853. style={{ minWidth: 140 }}
  854. allowClear
  855. placeholder={'请选择区服'}
  856. filterOption={(input, option) =>
  857. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  858. }
  859. loading={getGameServerUnList.loading}
  860. >
  861. {getGameServerUnList?.data?.filter((item: { isSourceServer: any }) => item.isSourceServer)?.map((item: any) => <Select.Option value={item.serverId} key={item.serverId}>{item.serverName}</Select.Option>)}
  862. </Select>
  863. </Form.Item></Col>}
  864. </>}
  865. {/* 游戏应用类型搜索 */}
  866. {isGameType && <Col><Form.Item name='gameType'>
  867. <Select
  868. maxTagCount={1}
  869. showSearch
  870. style={{ minWidth: 140 }}
  871. allowClear
  872. placeholder={'请选择游戏应用类型'}
  873. filterOption={(input, option) =>
  874. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  875. }
  876. >
  877. {getGameChoiceParentListType1?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  878. </Select>
  879. </Form.Item></Col>}
  880. {/* 布谷游戏应用类型搜索 */}
  881. {isBGGameClassify && <Col><Form.Item name='gameClassify'>
  882. <Select
  883. maxTagCount={1}
  884. showSearch
  885. style={{ width: 140 }}
  886. allowClear
  887. placeholder={'游戏应用类型'}
  888. filterOption={(input, option) =>
  889. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  890. }
  891. >
  892. {Object.keys(gameClassifyEnum).map(key => <Select.Option value={key} key={key}>{gameClassifyEnum[key]}</Select.Option>)}
  893. </Select>
  894. </Form.Item></Col>}
  895. {/* 游戏角色名 */}
  896. {isGameRoleName && <Col><Form.Item name='roleName'>
  897. <Input placeholder="游戏角色名" allowClear style={{ width: 140 }} />
  898. </Form.Item></Col>}
  899. {/* 游戏角色名id搜索 */}
  900. {isGameRoleId && <Col><Form.Item name='roleId'>
  901. <Input placeholder="角色ID" allowClear style={{ width: 140 }} />
  902. </Form.Item></Col>}
  903. {/* 客户微信号 */}
  904. {isWeChat && <Col><Form.Item name='weChat'>
  905. <Input placeholder="客户微信号" allowClear style={{ width: 140 }} />
  906. </Form.Item></Col>}
  907. {/* 客户微信号 */}
  908. {isWeChatCompany && <Col><Form.Item name='weChatCompany'>
  909. <Input placeholder="企业微信号" allowClear style={{ width: 140 }} />
  910. </Form.Item></Col>}
  911. {/* 是否首充 */}
  912. {isFirstRecharge && <Col><Form.Item name='isFirstRecharge'>
  913. <Select
  914. maxTagCount={1}
  915. showSearch
  916. style={{ width: 100 }}
  917. allowClear
  918. placeholder={'是否首充'}
  919. filterOption={(input, option) =>
  920. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  921. }
  922. >
  923. <Select.Option value={'0'}>否</Select.Option>
  924. <Select.Option value={'1'}>是</Select.Option>
  925. </Select>
  926. </Form.Item></Col>}
  927. {/* 是否切量 */}
  928. {isSwitch && <Col><Form.Item name='isSwitch'>
  929. <Select
  930. maxTagCount={1}
  931. showSearch
  932. style={{ minWidth: 140 }}
  933. allowClear
  934. placeholder={'请选择是否切量'}
  935. filterOption={(input, option) =>
  936. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  937. }
  938. >
  939. <Select.Option value={'0'}>否</Select.Option>
  940. <Select.Option value={'1'}>是</Select.Option>
  941. </Select>
  942. </Form.Item></Col>}
  943. {/* 收款商户号 */}
  944. {isMerchantNo && <Col><Form.Item name='merchantNo'>
  945. <Input placeholder="收款商户号" allowClear style={{ width: 140 }} />
  946. </Form.Item></Col>}
  947. {/* 收款商户号 */}
  948. {isMerchantOrderNo && <Col><Form.Item name='merchantOrderNo'>
  949. <Input placeholder="第三方支付订单号" allowClear style={{ width: 140 }} />
  950. </Form.Item></Col>}
  951. {/* 收款商户号 */}
  952. {isOrderId && <Col><Form.Item name='orderId'>
  953. <Input placeholder="商户订单号" allowClear style={{ width: 140 }} />
  954. </Form.Item></Col>}
  955. {/* 支付状态 */}
  956. {isPayStatus && <Col><Form.Item name='orderStatus'>
  957. <Select
  958. showSearch
  959. style={{ width: 100 }}
  960. allowClear
  961. placeholder={'支付状态'}
  962. filterOption={(input, option) =>
  963. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  964. }
  965. >
  966. {Object.keys(PayStatus).map(key => <Select.Option value={key} key={key}>{PayStatus[key]}</Select.Option>)}
  967. </Select>
  968. </Form.Item></Col>}
  969. {/* 支付方式 */}
  970. {isPayWay && <Col><Form.Item name='payWay'>
  971. <Select
  972. showSearch
  973. style={{ width: 100 }}
  974. allowClear
  975. placeholder={'支付方式'}
  976. filterOption={(input, option) =>
  977. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  978. }
  979. >
  980. {getPayList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.payName}</Select.Option>)}
  981. </Select>
  982. </Form.Item></Col>}
  983. {/* 推广媒体 */}
  984. {isType && <Col><Form.Item name='type'>
  985. <Select
  986. showSearch
  987. style={{ width: 100 }}
  988. allowClear
  989. placeholder={'推广媒体'}
  990. filterOption={(input, option) =>
  991. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  992. }
  993. >
  994. {Object.keys(TYPE).map(key => <Select.Option value={key} key={key}>{TYPE[key]}</Select.Option>)}
  995. </Select>
  996. </Form.Item></Col>}
  997. {/* 产品名称 */}
  998. {isProductName && <Col><Form.Item name='productName'>
  999. <Input placeholder="产品名称" allowClear style={{ width: 140 }} />
  1000. </Form.Item></Col>}
  1001. {/* 注册渠道名 */}
  1002. {isRegAgent && <Col><Form.Item name='regAgent'>
  1003. <Input placeholder="注册渠道名" allowClear style={{ width: 140 }} />
  1004. </Form.Item></Col>}
  1005. {/* 渠道标识 */}
  1006. {isAgentKey && <Col><Form.Item name='agentKey'>
  1007. <Input placeholder="渠道标识" allowClear style={{ width: 140 }} />
  1008. </Form.Item></Col>}
  1009. {/* 渠道名称 */}
  1010. {isAgentName && <Col><Form.Item name='agentName'>
  1011. <Input placeholder="渠道名称" allowClear style={{ width: 140 }} />
  1012. </Form.Item></Col>}
  1013. {/* 推广渠道id */}
  1014. {isAgentId && <Col><Form.Item name='agentId'>
  1015. <Select
  1016. maxTagCount={1}
  1017. mode="multiple"
  1018. showSearch
  1019. style={{ minWidth: 140 }}
  1020. allowClear
  1021. dropdownMatchSelectWidth={false}
  1022. placeholder={'请选择渠道'}
  1023. loading={getChannelChoiceList.loading || getAgentListNew.loading}
  1024. filterOption={(input, option) =>
  1025. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1026. }
  1027. >
  1028. {agentData?.map((item: any) => <Select.Option value={item.value} key={item.value}>{item.label}</Select.Option>)}
  1029. </Select>
  1030. </Form.Item></Col>}
  1031. {/* 投放渠道名 */}
  1032. {isPutAgent && <Col><Form.Item name='putAgent'>
  1033. <Input placeholder="投放渠道名" allowClear style={{ width: 140 }} />
  1034. </Form.Item></Col>}
  1035. {/* 投手名 */}
  1036. {isSysUserName && <Col><Form.Item name='sysUserName'>
  1037. <Input placeholder="投手名" allowClear style={{ width: 140 }} />
  1038. </Form.Item></Col>}
  1039. {/* 投手ID */}
  1040. {isSysUserId && <Col><Form.Item name='pitcherId'>
  1041. <Select
  1042. maxTagCount={1}
  1043. showSearch
  1044. style={{ width: 120 }}
  1045. allowClear
  1046. loading={getSubUserWithSelfList.loading || getPitcherListNew.loading}
  1047. placeholder={'请选择投手'}
  1048. filterOption={(input, option) =>
  1049. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1050. }
  1051. >
  1052. {userIdList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
  1053. </Select>
  1054. </Form.Item></Col>}
  1055. {/* 客服ID */}
  1056. {isCustomerServerId && <Col><Form.Item name='customerServerId'>
  1057. <Select
  1058. maxTagCount={1}
  1059. showSearch
  1060. style={{ width: 120 }}
  1061. allowClear
  1062. placeholder={'请选择客服'}
  1063. filterOption={(input, option) =>
  1064. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1065. }
  1066. >
  1067. {customerList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
  1068. </Select>
  1069. </Form.Item></Col>}
  1070. {/* 运营ID */}
  1071. {isOperatorId && <Col><Form.Item name='operatorId'>
  1072. <Select
  1073. maxTagCount={1}
  1074. showSearch
  1075. style={{ width: 120 }}
  1076. allowClear
  1077. placeholder={'请选择运营'}
  1078. filterOption={(input, option) =>
  1079. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1080. }
  1081. >
  1082. {operateList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
  1083. </Select>
  1084. </Form.Item></Col>}
  1085. {/* GSID */}
  1086. {isGsId && <Col><Form.Item name='gsId'>
  1087. <Select
  1088. maxTagCount={1}
  1089. showSearch
  1090. style={{ width: 120 }}
  1091. allowClear
  1092. placeholder={'请选择GS'}
  1093. filterOption={(input, option) =>
  1094. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1095. }
  1096. >
  1097. {gsList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
  1098. </Select>
  1099. </Form.Item></Col>}
  1100. {/* 玩家账号 */}
  1101. {isUserName && <Col><Form.Item name='username'>
  1102. <Input placeholder="玩家账号" allowClear style={{ width: 140 }} />
  1103. </Form.Item></Col>}
  1104. {/* 用户id */}
  1105. {isUserId && <Col><Form.Item name='userId'>
  1106. <Input placeholder="用户ID" allowClear style={{ width: 140 }} />
  1107. </Form.Item></Col>}
  1108. {/* 玩家昵称 */}
  1109. {isNickname && <Col><Form.Item name='nickname'>
  1110. <Input placeholder="玩家昵称" allowClear style={{ width: 140 }} />
  1111. </Form.Item></Col>}
  1112. {/* 绑定手机 */}
  1113. {isMobile && <Col><Form.Item name='mobile'>
  1114. <Input placeholder="绑定手机" allowClear style={{ width: 140 }} />
  1115. </Form.Item></Col>}
  1116. {/* 注册IP */}
  1117. {isRegIp && <Col><Form.Item name='regIp'>
  1118. <Input placeholder="注册IP" allowClear style={{ width: 140 }} />
  1119. </Form.Item></Col>}
  1120. {/* 注册IP */}
  1121. {isIp && <Col><Form.Item name='ip'>
  1122. <Input placeholder="IP" allowClear style={{ width: 140 }} />
  1123. </Form.Item></Col>}
  1124. {/* 注册IP */}
  1125. {isRankingNum && <Col><Form.Item name='rankingNum'>
  1126. <InputNumber placeholder="排名范围" min={1} />
  1127. </Form.Item></Col>}
  1128. {/* 是否充值 */}
  1129. {isIsRecharge && <Col><Form.Item name='isRecharge'>
  1130. <Select
  1131. showSearch
  1132. style={{ width: 98 }}
  1133. allowClear
  1134. placeholder={'是否充值'}
  1135. filterOption={(input, option) =>
  1136. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1137. }
  1138. >
  1139. <Select.Option value={false}>否</Select.Option>
  1140. <Select.Option value={true}>是</Select.Option>
  1141. </Select>
  1142. </Form.Item></Col>}
  1143. {/* 实名状态 */}
  1144. {isIsAuth && <Col><Form.Item name='isAuth'>
  1145. <Select
  1146. showSearch
  1147. allowClear
  1148. style={{ width: 98 }}
  1149. placeholder={'实名状态'}
  1150. filterOption={(input, option) =>
  1151. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1152. }
  1153. >
  1154. <Select.Option value={false}>未实名</Select.Option>
  1155. <Select.Option value={true}>已实名</Select.Option>
  1156. </Select>
  1157. </Form.Item></Col>}
  1158. {/* 是否绑定手机 */}
  1159. {isIsBindMobile && <Col><Form.Item name='isBindMobile'>
  1160. <Select
  1161. showSearch
  1162. allowClear
  1163. style={{ width: 126 }}
  1164. placeholder={'是否绑定手机'}
  1165. filterOption={(input, option) =>
  1166. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1167. }
  1168. >
  1169. <Select.Option value={false}>未绑定</Select.Option>
  1170. <Select.Option value={true}>已绑定</Select.Option>
  1171. </Select>
  1172. </Form.Item></Col>}
  1173. {/* 玩家状态 */}
  1174. {isUserStatus && <Col><Form.Item name='userStatus'>
  1175. <Select
  1176. showSearch
  1177. allowClear
  1178. style={{ width: 110 }}
  1179. placeholder={'玩家状态'}
  1180. filterOption={(input, option) =>
  1181. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1182. }
  1183. >
  1184. <Select.Option value={'1'}>试玩</Select.Option>
  1185. <Select.Option value={'2'}>正常</Select.Option>
  1186. <Select.Option value={'3'}>冻结</Select.Option>
  1187. </Select>
  1188. </Form.Item></Col>}
  1189. {/* 是否创角 */}
  1190. {isCreateRole && <Col><Form.Item name='createRole'>
  1191. <Select
  1192. showSearch
  1193. allowClear
  1194. style={{ width: 110 }}
  1195. placeholder={'是否创角'}
  1196. filterOption={(input, option) =>
  1197. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1198. }
  1199. >
  1200. <Select.Option value={true}>是</Select.Option>
  1201. <Select.Option value={false}>否</Select.Option>
  1202. </Select>
  1203. </Form.Item></Col>}
  1204. {/* 是否转端 */}
  1205. {isIsChange && <Col><Form.Item name='isChange'>
  1206. <Select
  1207. showSearch
  1208. allowClear
  1209. style={{ width: 110 }}
  1210. placeholder={'是否转端'}
  1211. filterOption={(input, option) =>
  1212. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1213. }
  1214. >
  1215. <Select.Option value="2">未操作</Select.Option>
  1216. <Select.Option value="1">是</Select.Option>
  1217. <Select.Option value="0">不转端</Select.Option>
  1218. </Select>
  1219. </Form.Item></Col>}
  1220. {/* 邮件是否发送 */}
  1221. {isIsSendMail && <Col><Form.Item name='isSendMail'>
  1222. <Select
  1223. showSearch
  1224. allowClear
  1225. style={{ width: 140 }}
  1226. placeholder={'邮件是否发送'}
  1227. filterOption={(input, option) =>
  1228. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1229. }
  1230. >
  1231. <Select.Option value="1">发送</Select.Option>
  1232. <Select.Option value="0">不发送</Select.Option>
  1233. </Select>
  1234. </Form.Item></Col>}
  1235. {/* 是否退游 */}
  1236. {isRemoveGameForSystem && <Col><Form.Item name='isRemoveGameForSystem'>
  1237. <Select
  1238. showSearch
  1239. allowClear
  1240. placeholder={'系统判定是否退游'}
  1241. filterOption={(input, option) =>
  1242. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1243. }
  1244. >
  1245. <Select.Option value="1">退游</Select.Option>
  1246. <Select.Option value="0">未退游</Select.Option>
  1247. </Select>
  1248. </Form.Item></Col>}
  1249. {/* 是否退游 */}
  1250. {isRemoveGame && <Col><Form.Item name='isRemoveGame'>
  1251. <Select
  1252. showSearch
  1253. allowClear
  1254. style={{ width: 110 }}
  1255. placeholder={'是否退游'}
  1256. filterOption={(input, option) =>
  1257. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1258. }
  1259. >
  1260. <Select.Option value="2">未操作</Select.Option>
  1261. <Select.Option value="1">退游</Select.Option>
  1262. <Select.Option value="0">未退游</Select.Option>
  1263. </Select>
  1264. </Form.Item></Col>}
  1265. {/* 是否添加企微 */}
  1266. {isAddCorpWechat && <Col><Form.Item name='isAddCorpWechat'>
  1267. <Select
  1268. showSearch
  1269. allowClear
  1270. style={{ width: 135 }}
  1271. placeholder={'是否添加企微'}
  1272. filterOption={(input, option) =>
  1273. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1274. }
  1275. >
  1276. <Select.Option value="2">未操作</Select.Option>
  1277. <Select.Option value="1">是</Select.Option>
  1278. <Select.Option value="0">否</Select.Option>
  1279. </Select>
  1280. </Form.Item></Col>}
  1281. {/* 是否唤醒 */}
  1282. {isWakeUp && <Col><Form.Item name='isWakeUp'>
  1283. <Select
  1284. showSearch
  1285. allowClear
  1286. style={{ width: 110 }}
  1287. placeholder={'是否唤醒'}
  1288. filterOption={(input, option) =>
  1289. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1290. }
  1291. >
  1292. <Select.Option value="2">未操作</Select.Option>
  1293. <Select.Option value="1">是</Select.Option>
  1294. <Select.Option value="0">否</Select.Option>
  1295. </Select>
  1296. </Form.Item></Col>}
  1297. {/* vip等级 */}
  1298. {isVipLevel && <Col><Form.Item name='vipLevel'>
  1299. <Select
  1300. showSearch
  1301. allowClear
  1302. maxTagCount={1}
  1303. mode="tags"
  1304. style={{ minWidth: 98 }}
  1305. placeholder={'角色VIP'}
  1306. filterOption={(input, option) =>
  1307. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1308. }
  1309. >
  1310. {getUserVipLevelChoiceList?.data?.map((item: { vipLevel: React.Key | null | undefined; vipLevelName: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined }) => <Select.Option value={item.vipLevel} key={item.vipLevel}>{item.vipLevelName}</Select.Option>)}
  1311. </Select>
  1312. </Form.Item></Col>}
  1313. {/* 操作系统 */}
  1314. {isOs && <Col><Form.Item name='os'>
  1315. <Select
  1316. maxTagCount={1}
  1317. showSearch
  1318. style={{ width: 110 }}
  1319. allowClear
  1320. placeholder={'操作系统'}
  1321. filterOption={(input, option) =>
  1322. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1323. }
  1324. >
  1325. {getUserSystemTypeChoiceList?.data?.map((item: any) => <Select.Option value={item.os} key={item.os}>{item.os}</Select.Option>)}
  1326. </Select>
  1327. </Form.Item></Col>}
  1328. {/* 用户注册日期搜索 */}
  1329. {isRegDay && <Col><Form.Item name='regDay'>
  1330. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['注册开始日期', '注册结束日期']} {...isRegDay} />
  1331. </Form.Item></Col>}
  1332. {/* 消耗日期 搜索 */}
  1333. {isConsumeDay && <Col><Form.Item name='consumeDay'>
  1334. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['消耗开始日期', '消耗结束日期']} {...isConsumeDay} />
  1335. </Form.Item></Col>}
  1336. {/* 消耗日期 搜索 */}
  1337. {isBeginDay && <Col><Form.Item name='beginDay'>
  1338. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['开始日期', '结束日期']} />
  1339. </Form.Item></Col>}
  1340. {/* 订单创建日期搜索 */}
  1341. {isCreateDay && <Col><Form.Item name='createDay'>
  1342. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['订单创建开始日期', '订单创建结束日期']} {...isCreateDay} />
  1343. </Form.Item></Col>}
  1344. {/* 充值日期搜索 */}
  1345. {rechargeDay && <Col><Form.Item name='rechargeDay'>
  1346. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['充值开始日期', '充值结束日期']} {...rechargeDay} />
  1347. </Form.Item></Col>}
  1348. {/* 单个充值日期搜索 */}
  1349. {payTimeDay && <Col><Form.Item name='payTime'>
  1350. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['支付开始日期', '支付结束日期']} {...payTimeDay} />
  1351. </Form.Item></Col>}
  1352. {/* 单个充值日期搜索 */}
  1353. {placeAnOrderDay && <Col><Form.Item name='placeAnOrderTime'>
  1354. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['下单开始日期', '下单结束日期']} {...placeAnOrderDay} />
  1355. </Form.Item></Col>}
  1356. {/* 开服日期搜索 */}
  1357. {isServerDay && <Col><Form.Item name='serverDay'>
  1358. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['开服开始日期', '开服结束日期']} {...isServerDay} />
  1359. </Form.Item></Col>}
  1360. {/* 角色创建日期搜索 */}
  1361. {isCreateRoleDay && <Col><Form.Item name='createRoleDay'>
  1362. <DatePicker.RangePicker style={{ width: 230 }} placeholder={['角色创建开始日期', '角色创建结束日期']} {...isCreateRoleDay} />
  1363. </Form.Item></Col>}
  1364. {/* 单个充值日期搜索 */}
  1365. {isRechargeDate && <Col><Form.Item name='rechargeDate'>
  1366. <DatePicker placeholder={'充值日期'} />
  1367. </Form.Item></Col>}
  1368. {/* 单个充值日期搜索 */}
  1369. {isPayIntervalTime && <Col><Form.Item name='regPayIntervalTime'>
  1370. <IntervalTime {...isPayIntervalTime} />
  1371. </Form.Item></Col>}
  1372. {isRoleCount && <Col><Form.Item name='roleCount'>
  1373. <IntervalTime {...isRoleCount} />
  1374. </Form.Item></Col>}
  1375. <Col>
  1376. <Space>
  1377. <Button type="primary" htmlType="submit">搜索</Button>
  1378. <Button onClick={() => form.resetFields()}>重置</Button>
  1379. </Space>
  1380. </Col>
  1381. </Row>
  1382. </Form>
  1383. }
  1384. export default React.memo(QueryForm)