123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841 |
- import { Button, Col, DatePicker, Form, Input, Radio, Row, Select, Space } from "antd"
- import React, { useEffect, useState } from "react"
- import moment from "moment"
- import { useAjax } from "@/Hook/useAjax"
- import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi } from "@/services/gameData"
- import { PayStatus, TYPE, gameClassifyEnum } from "./const"
- import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
- import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
- import IntervalTime from "./intervalTime"
- interface Props {
- onChange?: (data: any) => void
- /** 默认值 */
- initialValues?: any
- /** 开启数据源搜索 */
- isSource?: boolean,
- /** 是否开启 广告账号 搜索 */
- isAccount?: boolean
- /** 是否开启 广告账户ID 搜索 */
- isAccountId?: boolean
- /** 是否开启 公司ID 搜索 */
- isCompanyId?: boolean
- /** 是否开启 CPID 搜索 */
- isCpId?: boolean
- /** 是否开启 cp名 搜索 */
- isCpName?: boolean
- /** 是否开启 CP方订单ID 搜索 */
- isCpOrderId?: boolean
- /** 是否开启 CP通知状态 搜索 */
- isCpStatus?: boolean
- /** 是否开启 订单创建日期 搜索 */
- isCreateDay?: {
- ranges?: any
- }
- /** 是否开启 操作设备 搜索 */
- isDevice?: boolean
- /** 是否开启 注册游戏名 搜索 */
- isRechargeGameName?: boolean
- /** 是否开启 游戏名 搜索 */
- isGameName?: boolean
- /** 是否开启 游戏ID 搜索 */
- isGameId?: boolean
- /** 是否开启 充值游戏ID 搜索 */
- isOrderGameId?: boolean
- /** 是否开启 父游戏ID 搜索 */
- isParentId?: boolean
- /** 是否开启 游戏应用类型 搜索 */
- isGameType?: boolean
- /** 是否开启 游戏角色名 搜索 */
- isGameRoleName?: boolean
- /** 是否开启 游戏角色名ID 搜索 */
- isGameRoleId?: boolean
- /** 是否开启 是否首充 搜索 */
- isFirstRecharge?: boolean
- /** 是否开启 是否切量 搜索 */
- isSwitch?: boolean
- /** 是否开启 收款商户号 搜索 */
- isMerchantNo?: boolean
- /** 是否开启 商户订单ID 搜索 */
- isOrderId?: boolean
- /** 是否开启 商户订单号 搜索 */
- isMerchantOrderNo?: boolean
- /** 是否开启 支付状态 搜索 */
- isPayStatus?: boolean
- /** 是否开启 支付方式 搜索 */
- isPayWay?: boolean
- /** 是否开启 产品名称 搜索 */
- isProductName?: boolean
- /** 是否开启 注册渠道名 搜索 */
- isRegAgent?: boolean
- /** 是否开启 渠道名称 搜索 */
- isAgentName?: boolean
- /** 是否开启 注册渠道ID 搜索 */
- isAgentId?: boolean
- /** 是否开启 渠道标识 搜索 */
- isAgentKey?: boolean
- /** 是否开启 投放渠道名 搜索 */
- isPutAgent?: boolean
- /** 是否开启 用户注册日期 搜索 */
- isRegDay?: {
- ranges?: any
- }
- /** 是否开启 投手名称 搜索 */
- isSysUserName?: boolean
- /** 是否开启 投手ID 搜索 */
- isSysUserId?: boolean
- /** 是否开启 玩家账号 搜索 */
- isUserName?: boolean
- /** 是否开启 用户ID 搜索 */
- isUserId?: boolean
- /** 是否开启 不同排行榜选择 搜索 */
- isSelectRanking?: boolean
- /** 是否开启 消耗日期 搜索 */
- isConsumeDay?: {
- ranges?: any
- }
- /** 是否开启 充值日期 搜索 */
- rechargeDay?: {
- ranges?: any
- }
- /** 是否开启 支付时间 搜索 */
- payTimeDay?: {
- ranges?: any
- }
- /** 是否开启 下单时间 搜索 */
- placeAnOrderDay?: {
- ranges?: any
- }
- /** 是否开启布谷 游戏类型 筛选 */
- isBGGameClassify?: boolean,
- /** 是否开启 单个充值日期 选择 */
- isRechargeDate?: boolean,
- /** 是否开启 开始时间 结束时间 搜索 */
- isBeginDay?: boolean
- /** 是否开启 玩家ID 搜索 */
- isGameUserId?: boolean
- /** 是否开启 操作系统 选择 */
- isOs?: boolean
- /** 是否开启 推广媒体 选择 */
- isType?: boolean
- /** 是否开启 计划ID 搜索 */
- isProjectId?: boolean
- /** 是否开启 计划名称 搜索 */
- isProjectName?: boolean
- /** 是否开启 广告ID 搜索 */
- isPromotionId?: boolean
- /** 是否开启 广告名称 搜索 */
- isPromotionName?: boolean
- /** 是否开启 头条广告状态 搜索 */
- isAdTTStatus?: boolean
- /** 是否开启 腾讯广告状态 搜索 */
- isAdTXStatus?: boolean
- /** 是否开启 展示数据类型(买量,自然,总) 搜索 */
- isUserEnterType?: boolean
- /** 是否开启 区服名称 搜索 */
- isServerName?: boolean
- /** 是否开启区服ID 搜索 */
- isServerId?: boolean
- /** 是否开启 开服时间 搜索 */
- isServerDay?: {
- ranges?: any
- }
- /** 是否开启 充值到支付的间隔时间 搜索 */
- isPayIntervalTime?: boolean
- }
- /**
- * 游戏数据系统 请求参数
- * @returns
- */
- const QueryForm: React.FC<Props> = (props) => {
- /**************************/
- const {
- onChange, initialValues, isSource, isAccount, isAccountId, isCompanyId, isAgentKey, isAgentName, isCpId, isCpName, isCpOrderId, isCpStatus, isCreateDay, isDevice, isGameName, isRechargeGameName, isGameId, isOrderGameId, isGameRoleId,
- isGameRoleName, isFirstRecharge, isSwitch, isMerchantNo, isOrderId, isMerchantOrderNo, isPayStatus, isPayWay, isProductName, isRegAgent, isAgentId, isPutAgent, isRegDay, isOs, isParentId, isProjectId, isProjectName, isPromotionId, isPromotionName,
- isSysUserName, isRechargeDate, isBGGameClassify, isGameUserId, isSysUserId, isUserName, isUserId, isSelectRanking, isGameType, isConsumeDay, rechargeDay, isBeginDay, isType, isAdTTStatus, isUserEnterType, isServerName, isServerId, isServerDay, isAdTXStatus,
- payTimeDay, placeAnOrderDay, isPayIntervalTime
- } = props
- const [form] = Form.useForm()
- const [accountList, setAccountList] = useState<any[]>([])
- const [userIdList, setUserIdList] = useState<any[]>([])
- const getAllOfOwnerUser = useAjax(() => getAllOfOwnerUserApi())
- const getTtAllUserList = useAjax(() => getTtAllUserListApi())
- const getGameChoiceList = useAjax(() => getGameChoiceListApi())
- const getSubUserWithSelfList = useAjax(() => getSubUserWithSelfListApi())
- const getChannelChoiceList = useAjax(() => getChannelChoiceListApi())
- const getGameChoiceParentListType1 = useAjax(() => getGameChoiceParentListType1Api())
- const getUserSystemTypeChoiceList = useAjax(() => getUserSystemTypeChoiceListApi())
- const getPayList = useAjax(() => getPayListApi())
- /**************************/
- useEffect(() => {
- if (isAccountId) {
- // 请求广告账号列表
- async function getAccount() {
- let data: any[] = []
- let res1 = await getAllOfOwnerUser.run()
- let data1 = []
- if (res1) {
- data1 = res1?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.corporationName }))
- }
- let res2 = await getTtAllUserList.run()
- let data2 = []
- if (res2) {
- data2 = res2?.map((item: any) => ({ label: item.accountId, value: item.accountId, corporationName: item.accountName }))
- }
- data = [...data1, ...data2]
- setAccountList(data)
- }
- getAccount()
- }
- }, [isAccountId])
- /** 游戏列表 */
- useEffect(() => {
- if (isGameId || isOrderGameId || isParentId) {
- getGameChoiceList.run()
- }
- }, [isGameId, isOrderGameId, isParentId])
- /** 投手列表 */
- useEffect(() => {
- if (isSysUserId) {
- getSubUserWithSelfList.run().then(res => {
- // let loginUserId = localStorage.getItem('userId')
- // let nameList = ['杨安明', '曹春林', '杨泽健', '金勇旭', '杨雨霏', '毛斌峰', '董平']
- // if (loginUserId && ['158', '120', '119', '289', '399'].includes(loginUserId)) {
- // setUserIdList(res.filter((item: any) => nameList.includes(item.nickname)))
- // } else {
- // setUserIdList(res)
- // }
- setUserIdList(res)
- })
- }
- }, [isSysUserId])
- /** 推广渠道 */
- useEffect(() => {
- if (isAgentId) {
- getChannelChoiceList.run()
- }
- }, [isAgentId])
- /** 游戏应用类型 */
- useEffect(() => {
- if (isGameType) {
- getGameChoiceParentListType1.run()
- }
- }, [isGameType])
- /** 操作系统 */
- useEffect(() => {
- if (isOs) {
- getUserSystemTypeChoiceList.run()
- }
- }, [isOs])
- /** 支付方式 */
- useEffect(() => {
- if (isPayWay) {
- getPayList.run()
- }
- }, [isPayWay])
- const onFinish = (data: any) => {
- // 处理订单创建日期
- if (isCreateDay) {
- if (data?.createDay && data?.createDay?.length > 0) {
- data.beginOrderTime = moment(data?.createDay[0]).format('YYYY-MM-DD')
- data.endOrderTime = moment(data?.createDay[1]).format('YYYY-MM-DD')
- } else {
- data.beginOrderTime = ''
- data.endOrderTime = ''
- }
- delete data.createDay
- }
- // 处理 用户注册日期
- if (isRegDay) {
- if (data?.regDay && data?.regDay?.length > 0) {
- data.regStartDay = moment(data?.regDay[0]).format('YYYY-MM-DD')
- data.regEndDay = moment(data?.regDay[1]).format('YYYY-MM-DD')
- } else {
- data.regStartDay = ''
- data.regEndDay = ''
- }
- delete data.regDay
- }
- // 处理 消耗日期
- if (isConsumeDay) {
- if (data?.consumeDay && data?.consumeDay?.length > 0) {
- data.costBeginDay = moment(data?.consumeDay[0]).format('YYYY-MM-DD')
- data.costEndDay = moment(data?.consumeDay[1]).format('YYYY-MM-DD')
- } else {
- data.costBeginDay = ''
- data.costEndDay = ''
- }
- delete data.consumeDay
- }
- // 处理 不同排行榜 选择
- if (isSelectRanking) {
- switch (data?.dateType) {
- case 'all':
- data.beginDay = ''
- data.endDay = ''
- break;
- case 'today':
- data.beginDay = moment().format('YYYY-MM-DD')
- data.endDay = moment().format('YYYY-MM-DD')
- break
- case 'yesterday':
- data.beginDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
- data.endDay = moment().subtract(1, 'd').format('YYYY-MM-DD')
- break
- case '7days':
- data.beginDay = moment().subtract(7, 'd').format('YYYY-MM-DD')
- data.endDay = moment().format('YYYY-MM-DD')
- break
- case '30days':
- data.beginDay = moment().subtract(30, 'd').format('YYYY-MM-DD')
- data.endDay = moment().format('YYYY-MM-DD')
- break
- }
- delete data?.dateType
- }
- console.log('更新了字段---->', data);
- onChange && onChange(data)
- }
- return <Form layout="inline" className='queryForm' initialValues={initialValues} name="basic" form={form} onFinish={onFinish}>
- <Row gutter={[0, 6]}>
- {/* 数据源搜索 */}
- {isSource && <Col><Form.Item name='sourceSystem'>
- <Select
- showSearch
- style={{ width: 100 }}
- allowClear
- placeholder={'数据源选择'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value="BG_OLD">布谷-old</Select.Option>
- <Select.Option value="BG_NEW">布谷-new</Select.Option>
- <Select.Option value="ZX_SDK">布谷-zx</Select.Option>
- <Select.Option value="ZX_ONE">赞象</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 展示数据类型 */}
- {isUserEnterType && <Col><Form.Item name='tableTypes'>
- <Select
- showSearch
- style={{ width: 130 }}
- allowClear
- placeholder={'展示数据类型'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value="buy">买量</Select.Option>
- <Select.Option value="nature">自然量</Select.Option>
- <Select.Option value="total">总量</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 不同排行榜选择 */}
- {isSelectRanking && <Col><Form.Item name='dateType'>
- <Radio.Group>
- <Radio.Button value="all">总排行</Radio.Button>
- <Radio.Button value="today">今日排行</Radio.Button>
- <Radio.Button value="yesterday">昨日排行</Radio.Button>
- <Radio.Button value="7days">7日排行</Radio.Button>
- <Radio.Button value="30days">30日排行</Radio.Button>
- </Radio.Group>
- </Form.Item></Col>}
- {/* 广告区服名称 */}
- {isServerName && <Col><Form.Item name='serverName'>
- <Input placeholder="区服名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告区服ID */}
- {isServerId && <Col><Form.Item name='serverId'>
- <Input placeholder="区服ID" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告账户名称 */}
- {isAccount && <Col><Form.Item name='accountName'>
- <Input placeholder="广告账号名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告账号ID */}
- {isAccountId && <Col><Form.Item name='accountId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ width: 140 }}
- allowClear
- placeholder={'广告账号'}
- dropdownMatchSelectWidth={false}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {accountList.map(item => <Select.Option key={item.value} value={item.value}>{item.label.toString() + '_' + item.corporationName}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 公司ID */}
- {isCompanyId && <Col><Form.Item name='companyId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择公司'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'1'}>公司001</Select.Option>
- <Select.Option value={'2'}>公司002</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* cp名 */}
- {isCpName && <Col><Form.Item name='cpName'>
- <Input placeholder="CP名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* CPID */}
- {isCpId && <Col><Form.Item name='cpId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择CP'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'1'}>CP001</Select.Option>
- <Select.Option value={'2'}>CP002</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* CP方订单ID */}
- {isCpOrderId && <Col><Form.Item name='cpOrderId'>
- <Input placeholder="CP订单号" style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* CP通知状态 */}
- {isCpStatus && <Col><Form.Item name='cpStatus'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'CP通知状态'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'1'}>待处理</Select.Option>
- <Select.Option value={'2'}>成功</Select.Option>
- <Select.Option value={'3'}>失败</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 计划名称 */}
- {isProjectName && <Col><Form.Item name='projectName'>
- <Input placeholder="项目名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 计划ID */}
- {isProjectId && <Col><Form.Item name='projectId'>
- <Input placeholder="项目ID" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告名称 */}
- {isPromotionName && <Col><Form.Item name='promotionName'>
- <Input placeholder="广告名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告ID */}
- {isPromotionId && <Col><Form.Item name='promotionId'>
- <Input placeholder="广告ID" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 广告状态 */}
- {isAdTTStatus && <Col><Form.Item name='status'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- dropdownMatchSelectWidth={false}
- placeholder={'请选择广告状态'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {Object.keys(ADSTTTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTTTATUSEnum[key]}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {isAdTXStatus && <Col><Form.Item name='status'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- dropdownMatchSelectWidth={false}
- placeholder={'请选择广告状态'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {Object.keys(ADSTATUSEnum).map(key => <Select.Option value={key} key={key}>{ADSTATUSEnum[key]}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 操作设备 */}
- {isDevice && <Col><Form.Item name='device'>
- <Input placeholder="操作设备" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 游戏名 */}
- {isRechargeGameName && <Col><Form.Item name='rechargeGameName'>
- <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 玩家ID */}
- {isGameUserId && <Col><Form.Item name='gameUserId'>
- <Input placeholder="玩家ID" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 游戏名 */}
- {isGameName && <Col><Form.Item name='gameName'>
- <Input placeholder="游戏名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 游戏ID搜索 */}
- {isGameId && <Col><Form.Item name='gameId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择游戏'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 充值游戏ID */}
- {isOrderGameId && <Col><Form.Item name='orderGameId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择充值游戏'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 父游戏ID */}
- {isParentId && <Col><Form.Item name='parentId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择父游戏'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getGameChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 游戏应用类型搜索 */}
- {isGameType && <Col><Form.Item name='gameType'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择游戏应用类型'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getGameChoiceParentListType1?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.name}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 布谷游戏应用类型搜索 */}
- {isBGGameClassify && <Col><Form.Item name='gameClassify'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ width: 140 }}
- allowClear
- placeholder={'游戏应用类型'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {Object.keys(gameClassifyEnum).map(key => <Select.Option value={key} key={key}>{gameClassifyEnum[key]}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 游戏角色名 */}
- {isGameRoleName && <Col><Form.Item name='roleName'>
- <Input placeholder="游戏角色名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 游戏角色名id搜索 */}
- {isGameRoleId && <Col><Form.Item name='roleId'>
- <Input placeholder="角色ID" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 是否首充 */}
- {isFirstRecharge && <Col><Form.Item name='isFirstRecharge'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ width: 100 }}
- allowClear
- placeholder={'是否首充'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'0'}>否</Select.Option>
- <Select.Option value={'1'}>是</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 是否切量 */}
- {isSwitch && <Col><Form.Item name='isSwitch'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择是否切量'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'0'}>否</Select.Option>
- <Select.Option value={'1'}>是</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 收款商户号 */}
- {isMerchantNo && <Col><Form.Item name='merchantNo'>
- <Input placeholder="收款商户号" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 收款商户号 */}
- {isMerchantOrderNo && <Col><Form.Item name='merchantOrderNo'>
- <Input placeholder="第三方支付订单号" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 收款商户号 */}
- {isOrderId && <Col><Form.Item name='orderId'>
- <Input placeholder="商户订单号" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 支付状态 */}
- {isPayStatus && <Col><Form.Item name='orderStatus'>
- <Select
- showSearch
- style={{ width: 100 }}
- allowClear
- placeholder={'支付状态'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {Object.keys(PayStatus).map(key => <Select.Option value={key} key={key}>{PayStatus[key]}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 支付方式 */}
- {isPayWay && <Col><Form.Item name='payWay'>
- <Select
- showSearch
- style={{ width: 100 }}
- allowClear
- placeholder={'支付方式'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getPayList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.payName}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 推广媒体 */}
- {isType && <Col><Form.Item name='type'>
- <Select
- showSearch
- style={{ width: 100 }}
- allowClear
- placeholder={'推广媒体'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {Object.keys(TYPE).map(key => <Select.Option value={key} key={key}>{TYPE[key]}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 产品名称 */}
- {isProductName && <Col><Form.Item name='productName'>
- <Input placeholder="产品名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 注册渠道名 */}
- {isRegAgent && <Col><Form.Item name='regAgent'>
- <Input placeholder="注册渠道名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 渠道标识 */}
- {isAgentKey && <Col><Form.Item name='agentKey'>
- <Input placeholder="渠道标识" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 渠道名称 */}
- {isAgentName && <Col><Form.Item name='agentName'>
- <Input placeholder="渠道名称" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 推广渠道id */}
- {isAgentId && <Col><Form.Item name='agentId'>
- <Select
- maxTagCount={1}
- mode="multiple"
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- dropdownMatchSelectWidth={false}
- placeholder={'请选择渠道'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getChannelChoiceList?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.agentName}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 投放渠道名 */}
- {isPutAgent && <Col><Form.Item name='putAgent'>
- <Input placeholder="投放渠道名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 投手名 */}
- {isSysUserName && <Col><Form.Item name='sysUserName'>
- <Input placeholder="投手名" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 投手ID */}
- {isSysUserId && <Col><Form.Item name='pitcherId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ width: 120 }}
- allowClear
- placeholder={'请选择投手'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {userIdList.map((item: any) => <Select.Option value={item.userId} key={item.userId}>{item.nickname}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 玩家账号 */}
- {isUserName && <Col><Form.Item name='username'>
- <Input placeholder="玩家账号" allowClear style={{ width: 140 }} />
- </Form.Item></Col>}
- {/* 用户id */}
- {isUserId && <Col><Form.Item name='userId'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ minWidth: 140 }}
- allowClear
- placeholder={'请选择用户'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- <Select.Option value={'1'}>用户001</Select.Option>
- <Select.Option value={'2'}>用户002</Select.Option>
- <Select.Option value={'3'}>用户003</Select.Option>
- </Select>
- </Form.Item></Col>}
- {/* 用户id */}
- {isOs && <Col><Form.Item name='os'>
- <Select
- maxTagCount={1}
- showSearch
- style={{ width: 110 }}
- allowClear
- placeholder={'操作系统'}
- filterOption={(input, option) =>
- (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
- }
- >
- {getUserSystemTypeChoiceList?.data?.map((item: any) => <Select.Option value={item.os} key={item.os}>{item.os}</Select.Option>)}
- </Select>
- </Form.Item></Col>}
- {/* 用户注册日期搜索 */}
- {isRegDay && <Col><Form.Item name='regDay'>
- <DatePicker.RangePicker placeholder={['用户注册开始日期', '用户注册结束日期']} {...isRegDay} />
- </Form.Item></Col>}
- {/* 消耗日期 搜索 */}
- {isConsumeDay && <Col><Form.Item name='consumeDay'>
- <DatePicker.RangePicker placeholder={['消耗开始日期', '消耗结束日期']} {...isConsumeDay} />
- </Form.Item></Col>}
- {/* 消耗日期 搜索 */}
- {isBeginDay && <Col><Form.Item name='beginDay'>
- <DatePicker.RangePicker placeholder={['开始日期', '结束日期']} />
- </Form.Item></Col>}
- {/* 订单创建日期搜索 */}
- {isCreateDay && <Col><Form.Item name='createDay'>
- <DatePicker.RangePicker placeholder={['订单创建开始日期', '订单创建结束日期']} {...isCreateDay} />
- </Form.Item></Col>}
- {/* 充值日期搜索 */}
- {rechargeDay && <Col><Form.Item name='rechargeDay'>
- <DatePicker.RangePicker placeholder={['充值开始日期', '充值结束日期']} {...rechargeDay} />
- </Form.Item></Col>}
- {/* 单个充值日期搜索 */}
- {payTimeDay && <Col><Form.Item name='payTime'>
- <DatePicker.RangePicker placeholder={['支付开始日期', '支付结束日期']} {...payTimeDay} />
- </Form.Item></Col>}
- {/* 单个充值日期搜索 */}
- {placeAnOrderDay && <Col><Form.Item name='placeAnOrderTime'>
- <DatePicker.RangePicker placeholder={['下单开始日期', '下单结束日期']} {...placeAnOrderDay} />
- </Form.Item></Col>}
- {/* 开服日期搜索 */}
- {isServerDay && <Col><Form.Item name='serverDay'>
- <DatePicker.RangePicker placeholder={['开服开始日期', '开服结束日期']} {...isServerDay} />
- </Form.Item></Col>}
- {/* 单个充值日期搜索 */}
- {isRechargeDate && <Col><Form.Item name='rechargeDate'>
- <DatePicker placeholder={'充值日期'} />
- </Form.Item></Col>}
- {/* 单个充值日期搜索 */}
- {isPayIntervalTime && <Col><Form.Item name='regPayIntervalTime'>
- <IntervalTime />
- </Form.Item></Col>}
- <Col>
- <Space>
- <Button type="primary" htmlType="submit">搜索</Button>
- <Button onClick={() => form.resetFields()}>重置</Button>
- </Space>
- </Col>
- </Row>
- </Form>
- }
- export default React.memo(QueryForm)
|