content.jsx 7.6 KB

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