修改消耗列表跳转入口
This commit is contained in:
@@ -225,17 +225,16 @@ const AuthorizationPage: React.FC = () => {
|
||||
width: 160,
|
||||
render: (text: string) => <span style={{ color: '#64748b' }}>{formatDateTime(text)}</span>,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 120,
|
||||
render: (_: unknown, record: AuthorizationData) => (
|
||||
<Link to={`/consume`} style={{ color: '#6366f1' }}>
|
||||
{/* ?accountId=${record.id} */}
|
||||
查看消耗
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 120,
|
||||
// render: (_: unknown) => (
|
||||
// <Link to={`/consume`} style={{ color: '#6366f1' }}>
|
||||
// 查看消耗
|
||||
// </Link>
|
||||
// ),
|
||||
// },
|
||||
];
|
||||
|
||||
const tableData = authorizations.map((item, index) => ({
|
||||
|
||||
@@ -41,12 +41,12 @@ const ConsumePage: React.FC = () => {
|
||||
loadData();
|
||||
}, []);
|
||||
|
||||
const loadData = async (page = 1, pageSizeNum = 10, consumeDate?: [string, string] | null) => {
|
||||
const loadData = async (page = 1, pageSizeNum = 10, consumeDate?: [string, string] | null, advertiserIdParam?: string | null) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await getMaterialConsumpList({
|
||||
advertiser_id: advertiserId || undefined,
|
||||
consume_date: consumeDate !== undefined ? consumeDate : consumeDateRange,
|
||||
advertiser_id: advertiserIdParam != null ? advertiserIdParam : advertiserId,
|
||||
consume_date: consumeDate != null ? consumeDate : consumeDateRange,
|
||||
page,
|
||||
page_size: pageSizeNum,
|
||||
});
|
||||
@@ -100,7 +100,7 @@ const ConsumePage: React.FC = () => {
|
||||
setAdvertiserId('');
|
||||
setConsumeDateRange(undefined);
|
||||
setCurrentPage(1);
|
||||
loadData(1, pageSize, null);
|
||||
loadData(1, pageSize, null, '');
|
||||
};
|
||||
|
||||
const handleSync = () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Button, Table, Tag, Input, Pagination, Typography, Select, App } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { FolderOpenOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import { getResourcesMaterialList } from '../api';
|
||||
|
||||
@@ -267,6 +268,16 @@ const MaterialListPage: React.FC = () => {
|
||||
width: 160,
|
||||
render: (text: string) => <span style={{ color: '#64748b' }}>{formatDateTime(text)}</span>,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 120,
|
||||
render: (_: unknown, record) => (
|
||||
<Link to={`/consume?accountId=${record.advertiserId}`} style={{ color: '#6366f1' }}>
|
||||
查看消耗
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: '更新时间',
|
||||
// dataIndex: 'updatedAt',
|
||||
|
||||
Reference in New Issue
Block a user