import * as React from 'react';
import { Table, Drawer } from 'kts-xui';

/** Props接口 */
interface IProps {
    data: any;
    // list: string[];
    onClose: () => void;
}
export default class UIComponents extends React.Component<IProps, any> {
    columns = [
        {
            title: '单据名称',
            dataIndex: 'originalDocument',
            width: 240,
        },

    ];
    constructor(props) {
        super(props);
    }


    render() {
        const { data } = this.props;
        const { originalDocList = [] } = data;
        return (
            <Drawer
                title='关联单据'
                onClose={this.props.onClose}
                visible={true}
                width={400}
            >
                <>
                    <Table
                        dataSource={originalDocList}
                        columns={this.columns}
                        pagination={false}
                    />
                </>
            </Drawer>);
    }

}