import React from 'react'; import { Button, Radio } from 'antd'; import './content.less'; import { getTime, getProportion } from '../../../../tools'; import CompanyDetail from './companyDetail'; const Content = React.createClass({ getInitialState() { return { loading: false, component: CompanyDetail }; }, returnFoster() { this.props.returnBtn(); }, onChange(e) { switch (e.target.value) { case 'companyDetail': this.setState({ component: CompanyDetail, radioValue: 'companyDetail' }); break; case 'orgTechCenter': require.ensure([], () => { const OrgTechCenter = require('./orgTechCenter').default; this.setState({ component: OrgTechCenter, radioValue: 'orgTechCenter' }); }); break; case 'activity': require.ensure([], () => { const Activity = require('./activity').default; this.setState({ component: Activity, radioValue: 'activity' }); }); break; case 'activityCostList': require.ensure([], () => { const ActivityCostList = require('./activityCostList').default; this.setState({ component: ActivityCostList, radioValue: 'activityCostList' }); }); break; case 'techProduct': require.ensure([], () => { const TechProduct = require('./techProduct').default; this.setState({ component: TechProduct, radioValue: 'techProduct' }); }); break; case 'intellectual': require.ensure([], () => { const Intellectual = require('./intellectual').default; this.setState({ component: Intellectual, radioValue: 'intellectual' }); }); break; case 'achievement': require.ensure([], () => { const Achievement = require('./achievement').default; this.setState({ component: Achievement, radioValue: 'achievement' }); }); break; case 'ratepay': require.ensure([], () => { const Ratepay = require('./ratepay').default; this.setState({ component: Ratepay, radioValue: 'ratepay' }); }); break; case 'finance': require.ensure([], () => { const Finance = require('./finance').default; this.setState({ component: Finance, radioValue: 'finance' }); }); break; case 'hrSituation': require.ensure([], () => { const HrSituation = require('./hrSituation').default; this.setState({ component: HrSituation, radioValue: 'hrSituation' }); }); break; case 'honorList': require.ensure([], () => { const HonorList = require('./honorList').default; this.setState({ component: HonorList, radioValue: 'honorList' }); }); break; case 'standard': require.ensure([], () => { const Standard = require('./standard').default; this.setState({ component: Standard, radioValue: 'standard' }); }); break; case 'innovationAbility': require.ensure([], () => { const InnovationAbility = require('./innovationAbility').default; this.setState({ component: InnovationAbility, radioValue: 'innovationAbility' }); }); break; case 'annualReport': require.ensure([], () => { const AnnualReport = require('./annualReport').default; this.setState({ component: AnnualReport, radioValue: 'annualReport' }); }); break; }; }, componentWillReceiveProps(nextProps) { if (nextProps.style === "block") { let e = { target: { value: "companyDetail" } } this.onChange(e); }; if (nextProps.data) { let _me = this; getProportion(nextProps.data.uid, function (data) { let s = 0; s = ( (data.institution ? 5 : 0) + (data.activity ? 15 : 0) + (data.activityCost ? 15 : 0) + (data.techProject ? 10 : 0) + (data.intellectualProperty ? 15 : 0) + (data.achievement ? 10 : 0) + (data.ratepay ? 5 : 0) + (data.finance ? 5 : 0) + (data.humanResource ? 5 : 0) + (data.honorDatum ? 5 : 0) + (data.ability ? 5 : 0) + (data.standard ? 5 : 0)) _me.setState({ progressNumber: s }); }); }; }, render() { if (this.props.data) { return (
{this.props.data.unitName} {this.props.data.certificateNumber || ''} {this.props.data.issuingDate ? 有效期 {getTime(this.props.data.issuingDate)} 至 {getTime(this.props.data.issuingDate, 36)} : '' } 当前进度: {this.state.progressNumber}%
企业基本信息 企业研发机构 研发活动 研发活动费用详情 高新技术产品 知识产权 科技成果转化 企业所得税纳税申报表 财务报表 企业人员情况 企业荣誉及其他证明材料 标准制定情况 企业创新能力 年报 高企信息导出
) } else { return (
) } } }); export default Content;