content.jsx 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. import React from 'react';
  2. import { Button, Radio } from 'antd';
  3. import './content.less';
  4. import { getTime } from '../../../../tools';
  5. import CompanyDetail from './companyDetail';
  6. const Content = React.createClass({
  7. getInitialState() {
  8. return {
  9. loading: false,
  10. component: CompanyDetail
  11. };
  12. },
  13. returnFoster() {
  14. this.props.returnBtn();
  15. },
  16. onChange(e) {
  17. switch (e.target.value) {
  18. case 'companyDetail':
  19. this.setState({
  20. component: CompanyDetail,
  21. radioValue: 'companyDetail'
  22. });
  23. break;
  24. case 'orgTechCenter':
  25. require.ensure([], () => {
  26. const OrgTechCenter = require('./orgTechCenter').default;
  27. this.setState({
  28. component: OrgTechCenter,
  29. radioValue: 'orgTechCenter'
  30. });
  31. });
  32. break;
  33. case 'activity':
  34. require.ensure([], () => {
  35. const Activity = require('./activity').default;
  36. this.setState({
  37. component: Activity,
  38. radioValue: 'activity'
  39. });
  40. });
  41. break;
  42. case 'activityCostList':
  43. require.ensure([], () => {
  44. const ActivityCostList = require('./activityCostList').default;
  45. this.setState({
  46. component: ActivityCostList,
  47. radioValue: 'activityCostList'
  48. });
  49. });
  50. break;
  51. case 'techProduct':
  52. require.ensure([], () => {
  53. const TechProduct = require('./techProduct').default;
  54. this.setState({
  55. component: TechProduct,
  56. radioValue: 'techProduct'
  57. });
  58. });
  59. break;
  60. case 'intellectual':
  61. require.ensure([], () => {
  62. const Intellectual = require('./intellectual').default;
  63. this.setState({
  64. component: Intellectual,
  65. radioValue: 'intellectual'
  66. });
  67. });
  68. break;
  69. case 'achievement':
  70. require.ensure([], () => {
  71. const Achievement = require('./achievement').default;
  72. this.setState({
  73. component: Achievement,
  74. radioValue: 'achievement'
  75. });
  76. });
  77. break;
  78. case 'ratepay':
  79. require.ensure([], () => {
  80. const Ratepay = require('./ratepay').default;
  81. this.setState({
  82. component: Ratepay,
  83. radioValue: 'ratepay'
  84. });
  85. });
  86. break;
  87. case 'finance':
  88. require.ensure([], () => {
  89. const Finance = require('./finance').default;
  90. this.setState({
  91. component: Finance,
  92. radioValue: 'finance'
  93. });
  94. });
  95. break;
  96. case 'hrSituation':
  97. require.ensure([], () => {
  98. const HrSituation = require('./hrSituation').default;
  99. this.setState({
  100. component: HrSituation,
  101. radioValue: 'hrSituation'
  102. });
  103. });
  104. break;
  105. case 'honorList':
  106. require.ensure([], () => {
  107. const HonorList = require('./honorList').default;
  108. this.setState({
  109. component: HonorList,
  110. radioValue: 'honorList'
  111. });
  112. });
  113. break;
  114. case 'standard':
  115. require.ensure([], () => {
  116. const Standard = require('./standard').default;
  117. this.setState({
  118. component: Standard,
  119. radioValue: 'standard'
  120. });
  121. });
  122. break;
  123. case 'innovationAbility':
  124. require.ensure([], () => {
  125. const InnovationAbility = require('./innovationAbility').default;
  126. this.setState({
  127. component: InnovationAbility,
  128. radioValue: 'innovationAbility'
  129. });
  130. });
  131. break;
  132. case 'annualReport':
  133. require.ensure([], () => {
  134. const AnnualReport = require('./annualReport').default;
  135. this.setState({
  136. component: AnnualReport,
  137. radioValue: 'annualReport'
  138. });
  139. });
  140. break;
  141. };
  142. },
  143. componentWillReceiveProps(nextProps) {
  144. if (nextProps.style === "block") {
  145. let e = { target: { value: "companyDetail" } }
  146. this.onChange(e);
  147. };
  148. },
  149. render() {
  150. if (this.props.data) {
  151. return (
  152. <div className="foster-desc" style={{ display: this.props.style }}>
  153. <div className="content-tabs">
  154. <div className="foster-title">
  155. <span className="company-name">{this.props.data.unitName}</span>
  156. <span className="company-number">{this.props.data.certificateNumber || ''}</span>
  157. {this.props.data.issuingDate ?
  158. <span className="company-time"> 有效期 {getTime(this.props.data.issuingDate)} 至 {getTime(this.props.data.issuingDate, 36)} </span> : ''
  159. }
  160. <Button className="foster-return" type="primary" onClick={this.returnFoster}>返回高企培育列表</Button>
  161. </div>
  162. <div className="clearfix foster-component">
  163. <Radio.Group onChange={this.onChange} value={this.state.radioValue}>
  164. <Radio.Button value="companyDetail">企业基本信息</Radio.Button>
  165. <Radio.Button value="orgTechCenter">企业研发机构</Radio.Button>
  166. <Radio.Button value="activity">研发活动</Radio.Button>
  167. <Radio.Button value="activityCostList">研发活动费用详情</Radio.Button>
  168. <Radio.Button value="techProduct">高新技术产品</Radio.Button>
  169. <Radio.Button value="intellectual">知识产权</Radio.Button>
  170. <Radio.Button value="achievement">科技成果转化</Radio.Button>
  171. <Radio.Button value="ratepay">企业所得税纳税申报表</Radio.Button>
  172. <Radio.Button value="finance">财务报表</Radio.Button>
  173. <Radio.Button value="hrSituation">企业人员情况</Radio.Button>
  174. <Radio.Button value="honorList">企业荣誉及其他证明材料</Radio.Button>
  175. <Radio.Button value="standard">标准制定情况</Radio.Button>
  176. <Radio.Button value="innovationAbility">企业创新能力</Radio.Button>
  177. <Radio.Button value="annualReport">年报</Radio.Button>
  178. </Radio.Group>
  179. </div>
  180. </div>
  181. <div className="content-desc">
  182. <this.state.component data={this.props.data} />
  183. </div>
  184. </div>
  185. )
  186. } else {
  187. return (
  188. <div></div>
  189. )
  190. }
  191. }
  192. });
  193. export default Content;