From 1949fe8682f4facb14a999f1e1662017621abe7d Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 9 Jul 2024 22:31:04 +0800 Subject: [PATCH] update --- src/pages/Dashboard/BusinessViews.tsx | 13 +++++++++---- src/pages/Dashboard/ChannelStatistics.tsx | 8 +++----- src/pages/Dashboard/ScanDetail.tsx | 14 +++++++++----- src/pages/Dashboard/index.tsx | 6 ++++-- src/pages/OperationsDashboard/BusinessDetail.tsx | 12 ++++++++---- src/pages/OperationsDashboard/ProductDetail.tsx | 6 +++--- 6 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/pages/Dashboard/BusinessViews.tsx b/src/pages/Dashboard/BusinessViews.tsx index 9fbe4e5..d687583 100644 --- a/src/pages/Dashboard/BusinessViews.tsx +++ b/src/pages/Dashboard/BusinessViews.tsx @@ -90,8 +90,13 @@ const TableList: React.FC<{}> = () => { title: '注册日期', dataIndex: 'pbcCreateAt', width: 150, - valueType: 'dateTimeRange', - render: (text, record) => record.pbcCreateAt, + search: false + }, + { + title: '注册日期', + dataIndex: 'pbcCreateAt', + hideInTable: true, + valueType: 'dateRange' }, { title: '商户等级', @@ -123,7 +128,7 @@ const TableList: React.FC<{}> = () => { const queryParam = { ...param, startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] : undefined, + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined, pbcCreateAt: undefined } return fetchData(queryParam); @@ -143,7 +148,7 @@ const TableList: React.FC<{}> = () => { const queryParam = { pbcBusinessName: values?.pbcBusinessName, startDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[0]).format("YYYY-MM-DD HH:mm:ss") : undefined, - endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD HH:mm:ss") : undefined + endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD") + ' 23:59:59' : undefined } handleExport(queryParam) }}>导出 diff --git a/src/pages/Dashboard/ChannelStatistics.tsx b/src/pages/Dashboard/ChannelStatistics.tsx index e8181c2..e0b4811 100644 --- a/src/pages/Dashboard/ChannelStatistics.tsx +++ b/src/pages/Dashboard/ChannelStatistics.tsx @@ -76,10 +76,8 @@ import moment from 'moment'; { title: '访问时间', dataIndex: 'pbcCreateAt', - width: 150, hideInTable: true, - valueType: 'dateTimeRange', - render: (text, record: any) => record.pbcCreateAt, + valueType: 'dateRange' }, ]; @@ -103,7 +101,7 @@ import moment from 'moment'; ...param, pbcDataSource: param.pbcDataSource, startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] : undefined + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined } return fetchData(queryParam); }} @@ -122,7 +120,7 @@ import moment from 'moment'; const queryParam = { pbcDataSource: values?.pbcDataSource, startDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[0]).format("YYYY-MM-DD HH:mm:ss") : undefined, - endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD HH:mm:ss") : undefined + endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD") + ' 23:59:59' : undefined } handleExport(queryParam) }}>导出 diff --git a/src/pages/Dashboard/ScanDetail.tsx b/src/pages/Dashboard/ScanDetail.tsx index 3a0114b..fea9dd5 100644 --- a/src/pages/Dashboard/ScanDetail.tsx +++ b/src/pages/Dashboard/ScanDetail.tsx @@ -67,8 +67,13 @@ const TableList: React.FC<{}> = () => { { title: '扫码时间', dataIndex: 'pbcCreateAt', - valueType: 'dateTimeRange', - render: (text, record) => record.pbcCreateAt + search: false + }, + { + title: '扫码时间', + dataIndex: 'pbcCreateAt', + valueType: 'dateRange', + hideInTable: true }, ]; return ( @@ -86,7 +91,7 @@ const TableList: React.FC<{}> = () => { ...param, pbcNewCodeScanState: param.pbcUserType, startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] : undefined + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined } return fetchData(queryParam); }} @@ -102,11 +107,10 @@ const TableList: React.FC<{}> = () => { actions: [ diff --git a/src/pages/Dashboard/index.tsx b/src/pages/Dashboard/index.tsx index ac3db5a..128db45 100644 --- a/src/pages/Dashboard/index.tsx +++ b/src/pages/Dashboard/index.tsx @@ -46,7 +46,9 @@ const Welcome: React.FC = () => { }); const [pbcScanCodeStatical, setPbcScanCodeStatical] = useState({ pbcScanNumber: 0, - pbcScanUserNumber: 0 + pbcScanUserNumber: 0, + newCustomerScanCount: 0, + oldCustomerScanCount: 0 }); const [pbcInteractStatical, setPbcInteractStatical] = useState({ pbcColectNumber: 0, @@ -263,7 +265,7 @@ const Welcome: React.FC = () => { - + diff --git a/src/pages/OperationsDashboard/BusinessDetail.tsx b/src/pages/OperationsDashboard/BusinessDetail.tsx index 80fa73f..36c6851 100644 --- a/src/pages/OperationsDashboard/BusinessDetail.tsx +++ b/src/pages/OperationsDashboard/BusinessDetail.tsx @@ -98,8 +98,12 @@ const TableList: React.FC<{}> = () => { title: '创建日期', dataIndex: 'pbcCreateAt', width: 150, - valueType: 'dateTimeRange', - render: (text, record) => record.pbcCreateAt, + search: false + }, + { + title: '创建日期', + dataIndex: 'pbcCreateAt', + valueType: 'dateRange', }, { title: '商户等级', @@ -123,7 +127,7 @@ const TableList: React.FC<{}> = () => { ...param, userId: userId ? parseInt(userId) : undefined, startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] : undefined + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined } return fetchData(queryParam); }} @@ -146,7 +150,7 @@ const TableList: React.FC<{}> = () => { const queryParam = { userId: userId ? parseInt(userId) : undefined, startDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[0]).format("YYYY-MM-DD HH:mm:ss") : undefined, - endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD HH:mm:ss") : undefined + endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD") + ' 23:59:59' : undefined } handleExport(queryParam) }}>导出 diff --git a/src/pages/OperationsDashboard/ProductDetail.tsx b/src/pages/OperationsDashboard/ProductDetail.tsx index 139dbb2..4592633 100644 --- a/src/pages/OperationsDashboard/ProductDetail.tsx +++ b/src/pages/OperationsDashboard/ProductDetail.tsx @@ -82,7 +82,7 @@ const TableList: React.FC<{}> = () => { title: '创建日期', dataIndex: 'pbcCreateAt', hideInTable: true, - valueType: 'dateTimeRange' + valueType: 'dateRange' }, { title: '状态', @@ -107,7 +107,7 @@ const TableList: React.FC<{}> = () => { ...param, userId: userId ? parseInt(userId) : undefined, startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] : undefined + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined } return fetchData(queryParam); }} @@ -130,7 +130,7 @@ const TableList: React.FC<{}> = () => { const queryParam = { userId: userId ? parseInt(userId) : undefined, startDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[0]).format("YYYY-MM-DD HH:mm:ss") : undefined, - endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD HH:mm:ss") : undefined + endDate: values?.pbcCreateAt && values?.pbcCreateAt.length > 1 ? moment(values?.pbcCreateAt[1]).format("YYYY-MM-DD") + ' 23:59:59' : undefined } handleExport(queryParam) }}>导出