wjx há 1 ano atrás
pai
commit
3efe4fe5e1

+ 12 - 1
src/components/QueryForm/index.tsx

@@ -213,6 +213,7 @@ const QueryForm: React.FC<Props> = (props) => {
     } = props
     const [form] = Form.useForm()
     const parentId = Form.useWatch('parentId', form)
+    const superParentGameId = Form.useWatch('superParentGameId', form)
     const isMergeServer = Form.useWatch('isMergeServer', form)
     const [accountList, setAccountList] = useState<any[]>([])
     const [userIdList, setUserIdList] = useState<any[]>([])
@@ -663,10 +664,19 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     style={{ minWidth: 140 }}
                     allowClear
+                    disabled={parentId}
                     placeholder={'请选择超父游戏'}
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
+                    onChange={(e) => {
+                        if (isServerIds && e) {
+                            form.setFieldsValue({ serverIds: undefined })
+                            getGameServerList.run({ gameId: e })
+                        } else {
+                            getGameServerList?.data && getGameServerList.mutate([])
+                        }
+                    }}
                 >
                     {superGameList?.map((item: any) => <Select.Option value={item.super_game_id} key={item.super_game_id}>{item.super_game_name}</Select.Option>)}
                 </Select>
@@ -679,6 +689,7 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     style={{ minWidth: 140 }}
                     allowClear
+                    disabled={superParentGameId}
                     placeholder={'请选择父游戏'}
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -698,7 +709,7 @@ const QueryForm: React.FC<Props> = (props) => {
                 </Select>
             </Form.Item></Col>}
 
-            {parentId && <>
+            {(parentId || superParentGameId) && <>
                 {/* 区服id */}
                 {isServerIds && <Col><Form.Item name='serverIds'>
                     <Select

+ 1 - 1
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/sendEmailTable.tsx

@@ -28,7 +28,7 @@ const SendEmailTable: React.FC<Props> = ({ data, onChange }) => {
             gameId: data.user_reg_game_id,
             roleId: data.role_id,
             serverId: data.server_id,
-            userId: data.user_id
+            userId: data.association_user_id
         })
     }, [queryForm, data])
 

+ 1 - 1
src/pages/gameDataStatistics/roleOperate/roleRechargeRanking/sendPackTable.tsx

@@ -28,7 +28,7 @@ const SendPackTable: React.FC<Props> = ({ data, onChange }) => {
             gameId: data.user_reg_game_id,
             roleId: data.role_id,
             serverId: data.server_id,
-            userId: data.user_id
+            userId: data.association_user_id
         })
     }, [queryForm, data])