Browse Source

(*)汇总、丢单统计同周期统计表

master
周沫沫历险记 2 years ago
parent
commit
2513e34278
  1. 5
      web/.vscode/extensions.json
  2. 4
      web/.vscode/settings.json
  3. 58
      web/client/src/sections/business/containers/reserveItemsDepSummary.jsx
  4. 57
      web/client/src/sections/business/containers/reserveItemsLostStatistics.jsx
  5. 5
      web/client/src/sections/business/containers/reserveItemsPeriodicStatistics.jsx

5
web/.vscode/extensions.json

@ -1,5 +0,0 @@
{
"recommendations": [
"formulahendry.code-runner"
]
}

4
web/.vscode/settings.json

@ -1,4 +0,0 @@
//
{
"editor.fontSize": 16,
}

58
web/client/src/sections/business/containers/reserveItemsDepSummary.jsx

@ -1,11 +1,42 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Select, Input, Button, RadioGroup, Radio, Tooltip } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { Select, Input, Table, Spin, Button } from '@douyinfe/semi-ui';
import { RESERVEITEM_TYPE } from '../constants';
import '../style.less'
import moment from 'moment'
const ReserveItemsDepSummary = (props) => {
const { dispatch, actions, isRequesting, reserveItemReport } = props;
const [downloadUrl, setDownloadUrl] = useState(null);
const [downloadKey, setDownloadKey] = useState(null);
useEffect(() => {
dispatch(actions.businessManagement.getReserveItemReport(RESERVEITEM_TYPE.depSummary));
}, []);
const exportReport = (url) => {
setDownloadUrl(`/_file-server${url}`);
setDownloadKey(Math.random());
}
const columns = [
{
title: '序号',
dataIndex: 'name',
render: (text, record, index) => index + 1
},
{
title: '时间',
dataIndex: 'date',
},
{
title: '名称',
dataIndex: 'path',
},
{
title: '操作',
dataIndex: 'action',
render: (text, record, indexe) => (<Button theme='solid' type='secondary' onClick={() => exportReport(record.path)} > 导出</Button >)
},
];
return (
<>
@ -26,12 +57,17 @@ const ReserveItemsDepSummary = (props) => {
</div>
</div>
<div style={{ borderBottom: '1px solid #F2F3F5', marginLeft: '-20px', marginBottom: 16 }}></div>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 22 }}>
<div style={{ display: 'flex', }}>
<div style={{ color: '#646566', fontSize: 14 }}>
当前显示
</div>
</div>
{
downloadUrl ? <iframe key={downloadKey} src={downloadUrl} style={{ display: 'none' }} /> : ''
}
<div style={{ marginBottom: 22 }}>
<Spin spinning={isRequesting}>
<Table
rowKey={"id"}
columns={columns}
dataSource={reserveItemReport}
/>
</Spin>
</div>
</div>
</div>
@ -41,10 +77,12 @@ const ReserveItemsDepSummary = (props) => {
function mapStateToProps(state) {
const { auth, global } = state;
const { auth, global, reserveItemReport } = state;
return {
user: auth.user,
actions: global.actions,
reserveItemReport: reserveItemReport.data || [],
isRequesting: reserveItemReport.isRequesting
};
}

57
web/client/src/sections/business/containers/reserveItemsLostStatistics.jsx

@ -1,11 +1,41 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Select, Input, Button, RadioGroup, Radio, Tooltip } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { Select, Input, Spin, Table, Button } from '@douyinfe/semi-ui';
import { RESERVEITEM_TYPE } from '../constants';
import '../style.less'
import moment from 'moment'
const ReserveItemsLostStatistics = (props) => {
const { dispatch, actions, isRequesting, reserveItemReport } = props;
const [downloadUrl, setDownloadUrl] = useState(null);
const [downloadKey, setDownloadKey] = useState(null);
useEffect(() => {
dispatch(actions.businessManagement.getReserveItemReport(RESERVEITEM_TYPE.lostStatistic));
}, []);
const exportReport = (url) => {
setDownloadUrl(`/_file-server${url}`);
setDownloadKey(Math.random());
}
const columns = [
{
title: '序号',
dataIndex: 'name',
render: (text, record, index) => index + 1
},
{
title: '时间',
dataIndex: 'date',
},
{
title: '名称',
dataIndex: 'path',
},
{
title: '操作',
dataIndex: 'action',
render: (text, record, indexe) => (<Button theme='solid' type='secondary' onClick={() => exportReport(record.path)} > 导出</Button >)
},
];
return (
<>
@ -26,12 +56,17 @@ const ReserveItemsLostStatistics = (props) => {
</div>
</div>
<div style={{ borderBottom: '1px solid #F2F3F5', marginLeft: '-20px', marginBottom: 16 }}></div>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 22 }}>
<div style={{ display: 'flex', }}>
<div style={{ color: '#646566', fontSize: 14 }}>
当前显示
</div>
</div>
{
downloadUrl ? <iframe key={downloadKey} src={downloadUrl} style={{ display: 'none' }} /> : ''
}
<div style={{ marginBottom: 22 }}>
<Spin spinning={isRequesting}>
<Table
rowKey={"id"}
columns={columns}
dataSource={reserveItemReport}
/>
</Spin>
</div>
</div>
</div>
@ -41,10 +76,12 @@ const ReserveItemsLostStatistics = (props) => {
function mapStateToProps(state) {
const { auth, global } = state;
const { auth, global, reserveItemReport } = state;
return {
user: auth.user,
actions: global.actions,
reserveItemReport: reserveItemReport.data || [],
isRequesting: reserveItemReport.isRequesting
};
}

5
web/client/src/sections/business/containers/reserveItemsPeriodicStatistics.jsx

@ -1,8 +1,6 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Select, Input, Spin, Button, RadioGroup, Radio, Table } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { RouteRequest, RouteTable } from '$utils';
import { Select, Input, Spin, Button, Table } from '@douyinfe/semi-ui';
import { RESERVEITEM_TYPE } from '../constants';
import '../style.less'
@ -68,7 +66,6 @@ const ReserveItemsPeriodicStatistics = (props) => {
rowKey={"id"}
columns={columns}
dataSource={reserveItemReport}
// pagination={false}
/>
</Spin>
</div>

Loading…
Cancel
Save