index.tsx 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. import { Button, Col, DatePicker, Form, Input, 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, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi } from "@/services/gameData"
  6. import { 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. isDevice?: boolean
  36. /** 是否开启 注册游戏名 搜索 */
  37. isRechargeGameName?: boolean
  38. /** 是否开启 游戏名 搜索 */
  39. isGameName?: boolean
  40. /** 是否开启 游戏ID 搜索 */
  41. isGameId?: boolean
  42. /** 是否开启 充值游戏ID 搜索 */
  43. isOrderGameId?: boolean
  44. /** 是否开启 父游戏ID 搜索 */
  45. isParentId?: boolean
  46. /** 是否开启 游戏应用类型 搜索 */
  47. isGameType?: boolean
  48. /** 是否开启 游戏角色名 搜索 */
  49. isGameRoleName?: boolean
  50. /** 是否开启 游戏角色名ID 搜索 */
  51. isGameRoleId?: boolean
  52. /** 是否开启 是否首充 搜索 */
  53. isFirstRecharge?: boolean
  54. /** 是否开启 是否切量 搜索 */
  55. isSwitch?: boolean
  56. /** 是否开启 收款商户号 搜索 */
  57. isMerchantNo?: boolean
  58. /** 是否开启 商户订单ID 搜索 */
  59. isOrderId?: boolean
  60. /** 是否开启 商户订单号 搜索 */
  61. isMerchantOrderNo?: boolean
  62. /** 是否开启 支付状态 搜索 */
  63. isPayStatus?: boolean
  64. /** 是否开启 支付方式 搜索 */
  65. isPayWay?: boolean
  66. /** 是否开启 产品名称 搜索 */
  67. isProductName?: boolean
  68. /** 是否开启 注册渠道名 搜索 */
  69. isRegAgent?: boolean
  70. /** 是否开启 渠道名称 搜索 */
  71. isAgentName?: boolean
  72. /** 是否开启 注册渠道ID 搜索 */
  73. isAgentId?: boolean
  74. /** 是否开启 渠道标识 搜索 */
  75. isAgentKey?: boolean
  76. /** 是否开启 投放渠道名 搜索 */
  77. isPutAgent?: boolean
  78. /** 是否开启 用户注册日期 搜索 */
  79. isRegDay?: {
  80. ranges?: any
  81. }
  82. /** 是否开启 投手名称 搜索 */
  83. isSysUserName?: boolean
  84. /** 是否开启 投手ID 搜索 */
  85. isSysUserId?: boolean
  86. /** 是否开启 玩家账号 搜索 */
  87. isUserName?: boolean
  88. /** 是否开启 用户ID 搜索 */
  89. isUserId?: boolean
  90. /** 是否开启 不同排行榜选择 搜索 */
  91. isSelectRanking?: boolean
  92. /** 是否开启 消耗日期 搜索 */
  93. isConsumeDay?: {
  94. ranges?: any
  95. }
  96. /** 是否开启 充值日期 搜索 */
  97. rechargeDay?: {
  98. ranges?: any
  99. }
  100. /** 是否开启 支付时间 搜索 */
  101. payTimeDay?: {
  102. ranges?: any
  103. }
  104. /** 是否开启 下单时间 搜索 */
  105. placeAnOrderDay?: {
  106. ranges?: any
  107. }
  108. /** 是否开启布谷 游戏类型 筛选 */
  109. isBGGameClassify?: boolean,
  110. /** 是否开启 单个充值日期 选择 */
  111. isRechargeDate?: boolean,
  112. /** 是否开启 开始时间 结束时间 搜索 */
  113. isBeginDay?: boolean
  114. /** 是否开启 玩家ID 搜索 */
  115. isGameUserId?: boolean
  116. /** 是否开启 操作系统 选择 */
  117. isOs?: boolean
  118. /** 是否开启 推广媒体 选择 */
  119. isType?: boolean
  120. /** 是否开启 计划ID 搜索 */
  121. isProjectId?: boolean
  122. /** 是否开启 计划名称 搜索 */
  123. isProjectName?: boolean
  124. /** 是否开启 广告ID 搜索 */
  125. isPromotionId?: boolean
  126. /** 是否开启 广告名称 搜索 */
  127. isPromotionName?: boolean
  128. /** 是否开启 头条广告状态 搜索 */
  129. isAdTTStatus?: boolean
  130. /** 是否开启 腾讯广告状态 搜索 */
  131. isAdTXStatus?: boolean
  132. /** 是否开启 展示数据类型(买量,自然,总) 搜索 */
  133. isUserEnterType?: boolean
  134. /** 是否开启 区服名称 搜索 */
  135. isServerName?: boolean
  136. /** 是否开启区服ID 搜索 */
  137. isServerId?: boolean
  138. /** 是否开启 开服时间 搜索 */
  139. isServerDay?: {
  140. ranges?: any
  141. }
  142. /** 是否开启 充值到支付的间隔时间 搜索 */
  143. isPayIntervalTime?: boolean
  144. }
  145. /**
  146. * 游戏数据系统 请求参数
  147. * @returns
  148. */
  149. const QueryForm: React.FC<Props> = (props) => {
  150. /**************************/
  151. const {
  152. onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isAgentKey, isAgentName, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isOrderGameId, isGameRoleId,
  153. isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId, isProjectId, isProjectName, isPromotionId, isPromotionName,
  154. isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
  155. payTimeDay, placeAnOrderDay, isPayIntervalTime
  156. } = props
  157. const [form] = Form.useForm()
  158. const [accountList, setAccountList] = useState<any[]>([])
  159. const [userIdList, setUserIdList] = useState<any[]>([])
  160. const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
  161. const getTtAllUserList = useAjax(() => getTtAllUserListApi())
  162. const getGameChoiceList = useAjax(() => getGameChoiceListApi())
  163. const getSubUserWithSelfList = useAjax(() => getSubUserWithSelfListApi())
  164. const getChannelChoiceList = useAjax(() => getChannelChoiceListApi())
  165. const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
  166. const getUserSystemTypeChoiceList = useAjax(() => getUserSystemTypeChoiceListApi())
  167. const getPayList = useAjax(() => getPayListApi())
  168. /**************************/
  169. useEffect(() => {
  170. if (isAccountId) {
  171. // 请求广告账号列表
  172. async function getAccount() {
  173. let data: any[] = []
  174. let res1 = await getAllOfOwnerUser.run()
  175. let data1 = []
  176. if (res1) {
  177. data1 = res1?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.corporationName }))
  178. }
  179. let res2 = await getTtAllUserList.run()
  180. let data2 = []
  181. if (res2) {
  182. data2 = res2?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName }))
  183. }
  184. data = [...data1, ...data2]
  185. setAccountList(data)
  186. }
  187. getAccount()
  188. }
  189. }, [isAccountId])
  190. /** 游戏列表 */
  191. useEffect(() => {
  192. if (isGameId || isOrderGameId || isParentId) {
  193. getGameChoiceList.run()
  194. }
  195. }, [isGameId, isOrderGameId, isParentId])
  196. /** 投手列表 */
  197. useEffect(() => {
  198. if (isSysUserId) {
  199. getSubUserWithSelfList.run().then(res => {
  200. // let loginUserId = localStorage.getItem('userId')
  201. // let nameList = ['杨安明', '曹春林', '杨泽健', '金勇旭', '杨雨霏', '毛斌峰', '董平']
  202. // if (loginUserId && ['158', '120', '119', '289', '399'].includes(loginUserId)) {
  203. // setUserIdList(res.filter((item: any) => nameList.includes(item.nickname)))
  204. // } else {
  205. // setUserIdList(res)
  206. // }
  207. setUserIdList(res)
  208. })
  209. }
  210. }, [isSysUserId])
  211. /** 推广渠道 */
  212. useEffect(() => {
  213. if (isAgentId) {
  214. getChannelChoiceList.run()
  215. }
  216. }, [isAgentId])
  217. /** 游戏应用类型 */
  218. useEffect(() => {
  219. if (isGameType) {
  220. getGameChoiceParentListType1.run()
  221. }
  222. }, [isGameType])
  223. /** 操作系统 */
  224. useEffect(() => {
  225. if (isOs) {
  226. getUserSystemTypeChoiceList.run()
  227. }
  228. }, [isOs])
  229. /** 支付方式 */
  230. useEffect(() => {
  231. if (isPayWay) {
  232. getPayList.run()
  233. }
  234. }, [isPayWay])
  235. const onFinish = (data: any) => {
  236. // 处理订单创建日期
  237. if (isCreateDay) {
  238. if (data?.createDay && data?.createDay?.length > 0) {
  239. data.beginOrderTime = moment(data?.createDay[0]).format('YYYY-MM-DD')
  240. data.endOrderTime = moment(data?.createDay[1]).format('YYYY-MM-DD')
  241. } else {
  242. data.beginOrderTime = ''
  243. data.endOrderTime = ''
  244. }
  245. delete data.createDay
  246. }
  247. // 处理 用户注册日期
  248. if (isRegDay) {
  249. if (data?.regDay && data?.regDay?.length > 0) {
  250. data.regStartDay = moment(data?.regDay[0]).format('YYYY-MM-DD')
  251. data.regEndDay = moment(data?.regDay[1]).format('YYYY-MM-DD')
  252. } else {
  253. data.regStartDay = ''
  254. data.regEndDay = ''
  255. }
  256. delete data.regDay
  257. }
  258. // 处理 消耗日期
  259. if (isConsumeDay) {
  260. if (data?.consumeDay && data?.consumeDay?.length > 0) {
  261. data.costBeginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
  262. data.costEndDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
  263. } else {
  264. data.costBeginDay = ''
  265. data.costEndDay = ''
  266. }
  267. delete data.consumeDay
  268. }
  269. // 处理 不同排行榜 选择
  270. if (isSelectRanking) {
  271. switch (data?.dateType) {
  272. case 'all':
  273. data.beginDay = ''
  274. data.endDay = ''
  275. break;
  276. case 'today':
  277. data.beginDay = moment().format('YYYY-MM-DD')
  278. data.endDay = moment().format('YYYY-MM-DD')
  279. break
  280. case 'yesterday':
  281. data.beginDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
  282. data.endDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
  283. break
  284. case '7days':
  285. data.beginDay = moment().subtract(7, 'd').format('YYYY-MM-DD')
  286. data.endDay = moment().format('YYYY-MM-DD')
  287. break
  288. case '30days':
  289. data.beginDay = moment().subtract(30, 'd').format('YYYY-MM-DD')
  290. data.endDay = moment().format('YYYY-MM-DD')
  291. break
  292. }
  293. delete data?.dateType
  294. }
  295. console.log('更新了字段---->', data);
  296. onChange && onChange(data)
  297. }
  298. return <Form layout="inline" className='queryForm' initialValues={initialValues} name="basic" form={form} onFinish={onFinish}>
  299. <Row gutter={[0, 6]}>
  300. {/* 数据源搜索 */}
  301. {isSource && <Col><Form.Item name='sourceSystem'>
  302. <Select
  303. showSearch
  304. style={{ width: 100 }}
  305. allowClear
  306. placeholder={'数据源选择'}
  307. filterOption={(input, option) =>
  308. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  309. }
  310. >
  311. <Select.Option value="BG_OLD">布谷-old</Select.Option>
  312. <Select.Option value="BG_NEW">布谷-new</Select.Option>
  313. <Select.Option value="ZX_SDK">布谷-zx</Select.Option>
  314. <Select.Option value="ZX_ONE">赞象</Select.Option>
  315. </Select>
  316. </Form.Item></Col>}
  317. {/* 展示数据类型 */}
  318. {isUserEnterType && <Col><Form.Item name='tableTypes'>
  319. <Select
  320. showSearch
  321. style={{ width: 130 }}
  322. allowClear
  323. placeholder={'展示数据类型'}
  324. filterOption={(input, option) =>
  325. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  326. }
  327. >
  328. <Select.Option value="buy">买量</Select.Option>
  329. <Select.Option value="nature">自然量</Select.Option>
  330. <Select.Option value="total">总量</Select.Option>
  331. </Select>
  332. </Form.Item></Col>}
  333. {/* 不同排行榜选择 */}
  334. {isSelectRanking && <Col><Form.Item name='dateType'>
  335. <Radio.Group>
  336. <Radio.Button value="all">总排行</Radio.Button>
  337. <Radio.Button value="today">今日排行</Radio.Button>
  338. <Radio.Button value="yesterday">昨日排行</Radio.Button>
  339. <Radio.Button value="7days">7日排行</Radio.Button>
  340. <Radio.Button value="30days">30日排行</Radio.Button>
  341. </Radio.Group>
  342. </Form.Item></Col>}
  343. {/* 广告区服名称 */}
  344. {isServerName && <Col><Form.Item name='serverName'>
  345. <Input placeholder="区服名称" allowClear style={{ width: 140 }} />
  346. </Form.Item></Col>}
  347. {/* 广告区服ID */}
  348. {isServerId && <Col><Form.Item name='serverId'>
  349. <Input placeholder="区服ID" allowClear style={{ width: 140 }} />
  350. </Form.Item></Col>}
  351. {/* 广告账户名称 */}
  352. {isAccount && <Col><Form.Item name='accountName'>
  353. <Input placeholder="广告账号名称" allowClear style={{ width: 140 }} />
  354. </Form.Item></Col>}
  355. {/* 广告账号ID */}
  356. {isAccountId && <Col><Form.Item name='accountId'>
  357. <Select
  358. maxTagCount={1}
  359. showSearch
  360. style={{ width: 140 }}
  361. allowClear
  362. placeholder={'广告账号'}
  363. dropdownMatchSelectWidth={false}
  364. filterOption={(input, option) =>
  365. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  366. }
  367. >
  368. {accountList.map(item => <Select.Option key={item.value} value={item.value}>{item.label.toString() + '_' + item.corporationName}</Select.Option>)}
  369. </Select>
  370. </Form.Item></Col>}
  371. {/* 公司ID */}
  372. {isCompanyId && <Col><Form.Item name='companyId'>
  373. <Select
  374. maxTagCount={1}
  375. showSearch
  376. style={{ minWidth: 140 }}
  377. allowClear
  378. placeholder={'请选择公司'}
  379. filterOption={(input, option) =>
  380. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  381. }
  382. >
  383. <Select.Option value={'1'}>公司001</Select.Option>
  384. <Select.Option value={'2'}>公司002</Select.Option>
  385. </Select>
  386. </Form.Item></Col>}
  387. {/* cp名 */}
  388. {isCpName && <Col><Form.Item name='cpName'>
  389. <Input placeholder="CP名称" allowClear style={{ width: 140 }} />
  390. </Form.Item></Col>}
  391. {/* CPID */}
  392. {isCpId && <Col><Form.Item name='cpId'>
  393. <Select
  394. maxTagCount={1}
  395. showSearch
  396. style={{ minWidth: 140 }}
  397. allowClear
  398. placeholder={'请选择CP'}
  399. filterOption={(input, option) =>
  400. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  401. }
  402. >
  403. <Select.Option value={'1'}>CP001</Select.Option>
  404. <Select.Option value={'2'}>CP002</Select.Option>
  405. </Select>
  406. </Form.Item></Col>}
  407. {/* CP方订单ID */}
  408. {isCpOrderId && <Col><Form.Item name='cpOrderId'>
  409. <Input placeholder="CP订单号" style={{ width: 140 }} />
  410. </Form.Item></Col>}
  411. {/* CP通知状态 */}
  412. {isCpStatus && <Col><Form.Item name='cpStatus'>
  413. <Select
  414. maxTagCount={1}
  415. showSearch
  416. style={{ minWidth: 140 }}
  417. allowClear
  418. placeholder={'CP通知状态'}
  419. filterOption={(input, option) =>
  420. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  421. }
  422. >
  423. <Select.Option value={'1'}>待处理</Select.Option>
  424. <Select.Option value={'2'}>成功</Select.Option>
  425. <Select.Option value={'3'}>失败</Select.Option>
  426. </Select>
  427. </Form.Item></Col>}
  428. {/* 计划名称 */}
  429. {isProjectName && <Col><Form.Item name='projectName'>
  430. <Input placeholder="项目名称" allowClear style={{ width: 140 }} />
  431. </Form.Item></Col>}
  432. {/* 计划ID */}
  433. {isProjectId && <Col><Form.Item name='projectId'>
  434. <Input placeholder="项目ID" allowClear style={{ width: 140 }} />
  435. </Form.Item></Col>}
  436. {/* 广告名称 */}
  437. {isPromotionName && <Col><Form.Item name='promotionName'>
  438. <Input placeholder="广告名称" allowClear style={{ width: 140 }} />
  439. </Form.Item></Col>}
  440. {/* 广告ID */}
  441. {isPromotionId && <Col><Form.Item name='promotionId'>
  442. <Input placeholder="广告ID" allowClear style={{ width: 140 }} />
  443. </Form.Item></Col>}
  444. {/* 广告状态 */}
  445. {isAdTTStatus && <Col><Form.Item name='status'>
  446. <Select
  447. maxTagCount={1}
  448. showSearch
  449. style={{ minWidth: 140 }}
  450. allowClear
  451. dropdownMatchSelectWidth={false}
  452. placeholder={'请选择广告状态'}
  453. filterOption={(input, option) =>
  454. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  455. }
  456. >
  457. {Object.keys(ADSTTTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTTTATUSEnum[key]}</Select.Option>)}
  458. </Select>
  459. </Form.Item></Col>}
  460. {isAdTXStatus && <Col><Form.Item name='status'>
  461. <Select
  462. maxTagCount={1}
  463. showSearch
  464. style={{ minWidth: 140 }}
  465. allowClear
  466. dropdownMatchSelectWidth={false}
  467. placeholder={'请选择广告状态'}
  468. filterOption={(input, option) =>
  469. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  470. }
  471. >
  472. {Object.keys(ADSTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTATUSEnum[key]}</Select.Option>)}
  473. </Select>
  474. </Form.Item></Col>}
  475. {/* 操作设备 */}
  476. {isDevice && <Col><Form.Item name='device'>
  477. <Input placeholder="操作设备" allowClear style={{ width: 140 }} />
  478. </Form.Item></Col>}
  479. {/* 游戏名 */}
  480. {isRechargeGameName && <Col><Form.Item name='rechargeGameName'>
  481. <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
  482. </Form.Item></Col>}
  483. {/* 玩家ID */}
  484. {isGameUserId && <Col><Form.Item name='gameUserId'>
  485. <Input placeholder="玩家ID" allowClear style={{ width: 140 }} />
  486. </Form.Item></Col>}
  487. {/* 游戏名 */}
  488. {isGameName && <Col><Form.Item name='gameName'>
  489. <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
  490. </Form.Item></Col>}
  491. {/* 游戏ID搜索 */}
  492. {isGameId && <Col><Form.Item name='gameId'>
  493. <Select
  494. maxTagCount={1}
  495. showSearch
  496. style={{ minWidth: 140 }}
  497. allowClear
  498. placeholder={'请选择游戏'}
  499. filterOption={(input, option) =>
  500. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  501. }
  502. >
  503. {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  504. </Select>
  505. </Form.Item></Col>}
  506. {/* 充值游戏ID */}
  507. {isOrderGameId && <Col><Form.Item name='orderGameId'>
  508. <Select
  509. maxTagCount={1}
  510. showSearch
  511. style={{ minWidth: 140 }}
  512. allowClear
  513. placeholder={'请选择充值游戏'}
  514. filterOption={(input, option) =>
  515. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  516. }
  517. >
  518. {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  519. </Select>
  520. </Form.Item></Col>}
  521. {/* 父游戏ID */}
  522. {isParentId && <Col><Form.Item name='parentId'>
  523. <Select
  524. maxTagCount={1}
  525. showSearch
  526. style={{ minWidth: 140 }}
  527. allowClear
  528. placeholder={'请选择父游戏'}
  529. filterOption={(input, option) =>
  530. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  531. }
  532. >
  533. {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  534. </Select>
  535. </Form.Item></Col>}
  536. {/* 游戏应用类型搜索 */}
  537. {isGameType && <Col><Form.Item name='gameType'>
  538. <Select
  539. maxTagCount={1}
  540. showSearch
  541. style={{ minWidth: 140 }}
  542. allowClear
  543. placeholder={'请选择游戏应用类型'}
  544. filterOption={(input, option) =>
  545. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  546. }
  547. >
  548. {getGameChoiceParentListType1?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
  549. </Select>
  550. </Form.Item></Col>}
  551. {/* 布谷游戏应用类型搜索 */}
  552. {isBGGameClassify && <Col><Form.Item name='gameClassify'>
  553. <Select
  554. maxTagCount={1}
  555. showSearch
  556. style={{ width: 140 }}
  557. allowClear
  558. placeholder={'游戏应用类型'}
  559. filterOption={(input, option) =>
  560. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  561. }
  562. >
  563. {Object.keys(gameClassifyEnum).map(key => <Select.Option value={key} key={key}>{gameClassifyEnum[key]}</Select.Option>)}
  564. </Select>
  565. </Form.Item></Col>}
  566. {/* 游戏角色名 */}
  567. {isGameRoleName && <Col><Form.Item name='roleName'>
  568. <Input placeholder="游戏角色名" allowClear style={{ width: 140 }} />
  569. </Form.Item></Col>}
  570. {/* 游戏角色名id搜索 */}
  571. {isGameRoleId && <Col><Form.Item name='roleId'>
  572. <Input placeholder="角色ID" allowClear style={{ width: 140 }} />
  573. </Form.Item></Col>}
  574. {/* 是否首充 */}
  575. {isFirstRecharge && <Col><Form.Item name='isFirstRecharge'>
  576. <Select
  577. maxTagCount={1}
  578. showSearch
  579. style={{ width: 100 }}
  580. allowClear
  581. placeholder={'是否首充'}
  582. filterOption={(input, option) =>
  583. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  584. }
  585. >
  586. <Select.Option value={'0'}>否</Select.Option>
  587. <Select.Option value={'1'}>是</Select.Option>
  588. </Select>
  589. </Form.Item></Col>}
  590. {/* 是否切量 */}
  591. {isSwitch && <Col><Form.Item name='isSwitch'>
  592. <Select
  593. maxTagCount={1}
  594. showSearch
  595. style={{ minWidth: 140 }}
  596. allowClear
  597. placeholder={'请选择是否切量'}
  598. filterOption={(input, option) =>
  599. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  600. }
  601. >
  602. <Select.Option value={'0'}>否</Select.Option>
  603. <Select.Option value={'1'}>是</Select.Option>
  604. </Select>
  605. </Form.Item></Col>}
  606. {/* 收款商户号 */}
  607. {isMerchantNo && <Col><Form.Item name='merchantNo'>
  608. <Input placeholder="收款商户号" allowClear style={{ width: 140 }} />
  609. </Form.Item></Col>}
  610. {/* 收款商户号 */}
  611. {isMerchantOrderNo && <Col><Form.Item name='merchantOrderNo'>
  612. <Input placeholder="第三方支付订单号" allowClear style={{ width: 140 }} />
  613. </Form.Item></Col>}
  614. {/* 收款商户号 */}
  615. {isOrderId && <Col><Form.Item name='orderId'>
  616. <Input placeholder="商户订单号" allowClear style={{ width: 140 }} />
  617. </Form.Item></Col>}
  618. {/* 支付状态 */}
  619. {isPayStatus && <Col><Form.Item name='orderStatus'>
  620. <Select
  621. showSearch
  622. style={{ width: 100 }}
  623. allowClear
  624. placeholder={'支付状态'}
  625. filterOption={(input, option) =>
  626. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  627. }
  628. >
  629. {Object.keys(PayStatus).map(key => <Select.Option value={key} key={key}>{PayStatus[key]}</Select.Option>)}
  630. </Select>
  631. </Form.Item></Col>}
  632. {/* 支付方式 */}
  633. {isPayWay && <Col><Form.Item name='payWay'>
  634. <Select
  635. showSearch
  636. style={{ width: 100 }}
  637. allowClear
  638. placeholder={'支付方式'}
  639. filterOption={(input, option) =>
  640. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  641. }
  642. >
  643. {getPayList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.payName}</Select.Option>)}
  644. </Select>
  645. </Form.Item></Col>}
  646. {/* 推广媒体 */}
  647. {isType && <Col><Form.Item name='type'>
  648. <Select
  649. showSearch
  650. style={{ width: 100 }}
  651. allowClear
  652. placeholder={'推广媒体'}
  653. filterOption={(input, option) =>
  654. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  655. }
  656. >
  657. {Object.keys(TYPE).map(key => <Select.Option value={key} key={key}>{TYPE[key]}</Select.Option>)}
  658. </Select>
  659. </Form.Item></Col>}
  660. {/* 产品名称 */}
  661. {isProductName && <Col><Form.Item name='productName'>
  662. <Input placeholder="产品名称" allowClear style={{ width: 140 }} />
  663. </Form.Item></Col>}
  664. {/* 注册渠道名 */}
  665. {isRegAgent && <Col><Form.Item name='regAgent'>
  666. <Input placeholder="注册渠道名" allowClear style={{ width: 140 }} />
  667. </Form.Item></Col>}
  668. {/* 渠道标识 */}
  669. {isAgentKey && <Col><Form.Item name='agentKey'>
  670. <Input placeholder="渠道标识" allowClear style={{ width: 140 }} />
  671. </Form.Item></Col>}
  672. {/* 渠道名称 */}
  673. {isAgentName && <Col><Form.Item name='agentName'>
  674. <Input placeholder="渠道名称" allowClear style={{ width: 140 }} />
  675. </Form.Item></Col>}
  676. {/* 推广渠道id */}
  677. {isAgentId && <Col><Form.Item name='agentId'>
  678. <Select
  679. maxTagCount={1}
  680. mode="multiple"
  681. showSearch
  682. style={{ minWidth: 140 }}
  683. allowClear
  684. dropdownMatchSelectWidth={false}
  685. placeholder={'请选择渠道'}
  686. filterOption={(input, option) =>
  687. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  688. }
  689. >
  690. {getChannelChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.agentName}</Select.Option>)}
  691. </Select>
  692. </Form.Item></Col>}
  693. {/* 投放渠道名 */}
  694. {isPutAgent && <Col><Form.Item name='putAgent'>
  695. <Input placeholder="投放渠道名" allowClear style={{ width: 140 }} />
  696. </Form.Item></Col>}
  697. {/* 投手名 */}
  698. {isSysUserName && <Col><Form.Item name='sysUserName'>
  699. <Input placeholder="投手名" allowClear style={{ width: 140 }} />
  700. </Form.Item></Col>}
  701. {/* 投手ID */}
  702. {isSysUserId && <Col><Form.Item name='pitcherId'>
  703. <Select
  704. maxTagCount={1}
  705. showSearch
  706. style={{ width: 120 }}
  707. allowClear
  708. placeholder={'请选择投手'}
  709. filterOption={(input, option) =>
  710. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  711. }
  712. >
  713. {userIdList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
  714. </Select>
  715. </Form.Item></Col>}
  716. {/* 玩家账号 */}
  717. {isUserName && <Col><Form.Item name='username'>
  718. <Input placeholder="玩家账号" allowClear style={{ width: 140 }} />
  719. </Form.Item></Col>}
  720. {/* 用户id */}
  721. {isUserId && <Col><Form.Item name='userId'>
  722. <Select
  723. maxTagCount={1}
  724. showSearch
  725. style={{ minWidth: 140 }}
  726. allowClear
  727. placeholder={'请选择用户'}
  728. filterOption={(input, option) =>
  729. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  730. }
  731. >
  732. <Select.Option value={'1'}>用户001</Select.Option>
  733. <Select.Option value={'2'}>用户002</Select.Option>
  734. <Select.Option value={'3'}>用户003</Select.Option>
  735. </Select>
  736. </Form.Item></Col>}
  737. {/* 用户id */}
  738. {isOs && <Col><Form.Item name='os'>
  739. <Select
  740. maxTagCount={1}
  741. showSearch
  742. style={{ width: 110 }}
  743. allowClear
  744. placeholder={'操作系统'}
  745. filterOption={(input, option) =>
  746. (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
  747. }
  748. >
  749. {getUserSystemTypeChoiceList?.data?.map((item: any) => <Select.Option value={item.os} key={item.os}>{item.os}</Select.Option>)}
  750. </Select>
  751. </Form.Item></Col>}
  752. {/* 用户注册日期搜索 */}
  753. {isRegDay && <Col><Form.Item name='regDay'>
  754. <DatePicker.RangePicker placeholder={['用户注册开始日期', '用户注册结束日期']} {...isRegDay} />
  755. </Form.Item></Col>}
  756. {/* 消耗日期 搜索 */}
  757. {isConsumeDay && <Col><Form.Item name='consumeDay'>
  758. <DatePicker.RangePicker placeholder={['消耗开始日期', '消耗结束日期']} {...isConsumeDay} />
  759. </Form.Item></Col>}
  760. {/* 消耗日期 搜索 */}
  761. {isBeginDay && <Col><Form.Item name='beginDay'>
  762. <DatePicker.RangePicker placeholder={['开始日期', '结束日期']} />
  763. </Form.Item></Col>}
  764. {/* 订单创建日期搜索 */}
  765. {isCreateDay && <Col><Form.Item name='createDay'>
  766. <DatePicker.RangePicker placeholder={['订单创建开始日期', '订单创建结束日期']} {...isCreateDay} />
  767. </Form.Item></Col>}
  768. {/* 充值日期搜索 */}
  769. {rechargeDay && <Col><Form.Item name='rechargeDay'>
  770. <DatePicker.RangePicker placeholder={['充值开始日期', '充值结束日期']} {...rechargeDay} />
  771. </Form.Item></Col>}
  772. {/* 单个充值日期搜索 */}
  773. {payTimeDay && <Col><Form.Item name='payTime'>
  774. <DatePicker.RangePicker placeholder={['支付开始日期', '支付结束日期']} {...payTimeDay} />
  775. </Form.Item></Col>}
  776. {/* 单个充值日期搜索 */}
  777. {placeAnOrderDay && <Col><Form.Item name='placeAnOrderTime'>
  778. <DatePicker.RangePicker placeholder={['下单开始日期', '下单结束日期']} {...placeAnOrderDay} />
  779. </Form.Item></Col>}
  780. {/* 开服日期搜索 */}
  781. {isServerDay && <Col><Form.Item name='serverDay'>
  782. <DatePicker.RangePicker placeholder={['开服开始日期', '开服结束日期']} {...isServerDay} />
  783. </Form.Item></Col>}
  784. {/* 单个充值日期搜索 */}
  785. {isRechargeDate && <Col><Form.Item name='rechargeDate'>
  786. <DatePicker placeholder={'充值日期'} />
  787. </Form.Item></Col>}
  788. {/* 单个充值日期搜索 */}
  789. {isPayIntervalTime && <Col><Form.Item name='regPayIntervalTime'>
  790. <IntervalTime />
  791. </Form.Item></Col>}
  792. <Col>
  793. <Space>
  794. <Button type="primary" htmlType="submit">搜索</Button>
  795. <Button onClick={() => form.resetFields()}>重置</Button>
  796. </Space>
  797. </Col>
  798. </Row>
  799. </Form>
  800. }
  801. export default React.memo(QueryForm)