12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import { FundStatusEnum, } from '@/services/launchAdq/enum'
- import React from 'react'
- import { Badge } from 'antd'
- function tableConfig(tableIdClick: (props: {
- activeKey: string,
- parma: {
- accountId?: string,//账户ID
- campaignId?: string,//计划ID
- adgroupId?: string,//广告ID
- adcreativeId?: string,//创意ID
- pageId?: string,//落地页ID
- targetingId?: string,//定向ID
- }
- }) => void):any{
- return [
- {
- title: 'ID',
- dataIndex: 'id',
- key: 'id',
- align: 'center',
- width:50,
- render:(a:string)=>{
- return <a>{a}</a>
- }
- },
- {
- title: '账号ID',
- dataIndex: 'accountId',
- key: 'accountId',
- align: 'center',
- width:90,
- render:(a:string)=>{
- return <a onClick={() => {
- tableIdClick({ activeKey: '1', parma: { accountId: a } })
- }}>{a}</a>
- }
- },
- {
- title: '腾讯备注',
- dataIndex: 'memo',
- key: 'memo',
- align: 'center',
- width: 100,
- fixed: 'left',
- ellipsis: true,
- },
- {
- title: '本地备注',
- dataIndex: 'remark',
- key: 'remark',
- align: 'center',
- width: 100,
- fixed: 'left',
- ellipsis: true,
- },
- {
- title: '账户余额(分)',
- dataIndex: 'balance',
- key: 'balance',
- align: 'center',
- width:150,
- },
- {
- title: '资金状态',
- dataIndex: 'fundStatus',
- key: 'fundStatus',
- align: 'center',
- width:130,
- render:(a: string | number)=>{
- return FundStatusEnum[a]
- }
- },
- {
- title: '是否有效',
- dataIndex: 'enabled',
- key: 'enabled',
- align: 'center',
- width:130,
- render: (a: any, b: any) => {
- return <Badge status={a ? "processing" :"error" } text={a? '是' : '否'} />
- }
- },
- ]
- }
- export default tableConfig
|