DetailModal.tsx
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import {Button, Modal} from 'antd';
import AreaTable from './AreaTable';
import StorageTable from './StorageTable';
import SeriesTable from './SeriesTable';
import SpecTable from './SpecTable';
import PartTable from './PartTable';
import OutFlowModal from './OutFlowModal';
interface Props {
visible: boolean,
onCancel: Function,
type?: number, // 类型1区域库2库房3车系4车型5配件
detailType?: number, // 类型1区域库2库房3车系4车型5配件
id?: number, // 上一个列表ID
}
export default function Index(props: Props) {
const {visible, onCancel, type, detailType, id} = props;
return (
<Modal
title="分析"
width={1000}
visible={visible}
maskClosable={false}
onCancel={() => onCancel()}
footer={
<Button onClick={() => onCancel()}>取消</Button>
}
>
{detailType == 1 && <AreaTable type={type} detailType={detailType} id={id} showAnalyse={false} />}
{detailType == 2 && <StorageTable type={type} detailType={detailType} id={id} showAnalyse={false} />}
{detailType == 3 && <SeriesTable type={type} detailType={detailType} id={id} showAnalyse={false} />}
{detailType == 4 && <SpecTable type={type} detailType={detailType} id={id} />}
{detailType == 5 && <PartTable type={type} detailType={detailType} id={id} showAnalyse={false} />}
<OutFlowModal />
</Modal>
);
}