import React from 'react';
import { Button, Radio } from 'antd';
import './content.less';

import Intellectual from './intellectual';
import Activity from './activity';
import Standard from './standard';
import ActivityCostList from './activityCostList';
import TechProduct from './techProduct';
import Ratepay from './ratepay';
import Finance from './finance';
import Achievement from './achievement';
import HonorList from './honorList';
import OrgTechCenter from './orgTechCenter';
import InnovationAbility from './ablt';
import HrSituation from './hrSituation';


const Content = React.createClass({
    getInitialState() {
        return {
            loading: false,
            radioKey: 'hrSituation',
        };
    },
    componentWillMount() {
    },
    returnFoster() {
        this.props.returnBtn();
    },
    onChange(e) {
        this.setState({
            radioKey: e.target.value
        });
    },
    render() {
        return (
            <div className="foster-desc" style={{ display: this.props.style }}>
                <div className="content-tabs">
                    <div className="foster-title">
                        <span className="company-name">某某省某某市某某某公司</span>
                        <span className="company-number">GF201712345678</span>
                        <span className="company-time">有效期2014-10-02至2017-10-02</span>
                        <Button className="foster-return" type="primary" onClick={this.returnFoster}>返回高企培育列表</Button>
                    </div>
                    <div className="clearfix foster-component">
                        <Radio.Group onChange={this.onChange} defaultValue="orgTechCenter">
                            <Radio.Button value="orgTechCenter">技术中心</Radio.Button>
                            <Radio.Button value="activity">研发活动</Radio.Button>
                            <Radio.Button value="activityCostList">研发活动费用详情</Radio.Button>
                            <Radio.Button value="techProduct">高新技术产品</Radio.Button>
                            <Radio.Button value="intellectual">知识产权</Radio.Button>
                            <Radio.Button value="achievement">科技成果转化</Radio.Button>
                            <Radio.Button value="ratepay">企业纳税申报</Radio.Button>
                            <Radio.Button value="finance">财务报表</Radio.Button>
                            <Radio.Button value="hrSituation">企业人员情况</Radio.Button>
                            <Radio.Button value="honorList">企业荣誉及其他证明材料</Radio.Button>
                            <Radio.Button value="standard">标准制定情况</Radio.Button>
                            <Radio.Button value="innovationAbility">企业创新能力</Radio.Button>
                        </Radio.Group>
                    </div>
                </div>
                <div className="content-desc">
                    {(() => {
                        switch (this.state.radioKey) {
                            case 'orgTechCenter':
                                return <OrgTechCenter />;
                            case 'activity':
                                return <Activity />;
                            case 'activityCostList':
                                return <ActivityCostList />;
                            case 'techProduct':
                                return <TechProduct />;
                            case 'intellectual':
                                return <Intellectual />;
                            case 'achievement':
                                return <Achievement />;
                            case 'ratepay':
                                return <Ratepay />;
                            case 'finance':
                                return <Finance />;
                            case 'hrSituation':
                                return <HrSituation />;
                            case 'honorList':
                                return <HonorList />;
                            case 'standard':
                                return <Standard />;
                            case 'innovationAbility':
                                return <InnovationAbility />;
                        };
                    })()}
                </div>
            </div>
        )
    }
});

export default Content;