|
@@ -0,0 +1,86 @@
|
|
|
+import { useAjax } from "@/Hook/useAjax"
|
|
|
+import { getAccountAssetsGroupListApi } from "@/services/adqV3/global"
|
|
|
+import { PlusOutlined, SearchOutlined } from "@ant-design/icons"
|
|
|
+import { Button, Card, Input } from "antd"
|
|
|
+import React, { useEffect, useState } from "react"
|
|
|
+import '../../tencentAdPutIn/index.less'
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 账户资产共享
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+const AccountAssetSharing: React.FC = () => {
|
|
|
+
|
|
|
+ /****************************************/
|
|
|
+ const [queryForm, setQueryForm] = useState<{ accountGroupName?: string, authMainAccountIds?: number[], pageNum: number, pageSize: number }>({ pageNum: 1, pageSize: 20 })
|
|
|
+ const [queryFormNew, setQueryFormNew] = useState<{ accountGroupName?: string, authMainAccountIds?: number[], pageNum: number, pageSize: number }>({ pageNum: 1, pageSize: 20 })
|
|
|
+ const [visible, setVisible] = useState<boolean>(false)
|
|
|
+
|
|
|
+ const getAccountAssetsGroupList = useAjax((params) => getAccountAssetsGroupListApi(params))
|
|
|
+ /****************************************/
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ getAccountAssetsGroupList.run(queryFormNew)
|
|
|
+ }, [queryFormNew])
|
|
|
+
|
|
|
+ return <Card
|
|
|
+ className="cardResetCss"
|
|
|
+ title={<div className="flexStart" style={{ gap: 8 }}>
|
|
|
+ <Input style={{ width: 200 }} placeholder="请输入账户组名称" value={queryForm?.accountGroupName} allowClear onChange={(e) => setQueryForm({ ...queryForm, accountGroupName: e.target.value, pageNum: 1 })} />
|
|
|
+ <Input.TextArea
|
|
|
+ style={{ width: 300 }}
|
|
|
+ placeholder="请输入主账户ID列表(多个逗号隔开)"
|
|
|
+ allowClear
|
|
|
+ rows={1}
|
|
|
+ onChange={(e) => {
|
|
|
+ let value = e.target.value
|
|
|
+ let arr: any[] = []
|
|
|
+ if (value) {
|
|
|
+ value = value.replace(/[,,\s]/g, ',')
|
|
|
+ arr = value.split(',').filter((a: any) => a)
|
|
|
+ }
|
|
|
+ setQueryForm({ ...queryForm, authMainAccountIds: arr, pageNum: 1 })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Button type="primary" icon={<SearchOutlined />} onClick={() => setQueryFormNew({ ...queryForm })}>搜索</Button>
|
|
|
+ <Button type="primary" icon={<PlusOutlined />} onClick={() => { setVisible(true) }}>新增账户组</Button>
|
|
|
+ </div>}
|
|
|
+ >
|
|
|
+
|
|
|
+ {/* <Table
|
|
|
+ columns={columns(del)}
|
|
|
+ dataSource={getGameLibraryList.data?.records}
|
|
|
+ size="small"
|
|
|
+ loading={getGameLibraryList?.loading}
|
|
|
+ scroll={{ y: 600 }}
|
|
|
+ bordered
|
|
|
+ rowKey={'id'}
|
|
|
+ pagination={{
|
|
|
+ defaultPageSize: 20,
|
|
|
+ current: getGameLibraryList.data?.current || 1,
|
|
|
+ pageSize: getGameLibraryList.data?.size || 10,
|
|
|
+ total: getGameLibraryList.data?.total || 0
|
|
|
+ }}
|
|
|
+ onChange={(pagination) => {
|
|
|
+ const { current, pageSize } = pagination
|
|
|
+ setQueryForm({ ...queryForm, pageNum: current || 1, pageSize: pageSize || 10 })
|
|
|
+ setQueryFormNew({ ...queryForm, pageNum: current || 1, pageSize: pageSize || 10 })
|
|
|
+ }}
|
|
|
+ /> */}
|
|
|
+
|
|
|
+ {/* 新增修改 */}
|
|
|
+ {/* {visible && <Modify
|
|
|
+ visible={visible}
|
|
|
+ onClose={() => {
|
|
|
+ setVisible(false)
|
|
|
+ }}
|
|
|
+ onChange={() => {
|
|
|
+ setVisible(false)
|
|
|
+ getGameLibraryList.refresh()
|
|
|
+ }}
|
|
|
+ />} */}
|
|
|
+ </Card>
|
|
|
+}
|
|
|
+
|
|
|
+export default AccountAssetSharing
|