companyDetail.jsx 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. import React from 'react';
  2. import { Icon, Form, Button, Input, Spin, message, InputNumber, DatePicker, Select, Checkbox, Cascader, Table, Radio } from 'antd';
  3. import './techProduct.less';
  4. import { provinceSelect } from '../../../../tools';
  5. import { industryList, scaleList, companyType } from '../../../../dataDic';
  6. import { techFieldList } from '../../../../DicTechFieldList';
  7. import ajax from 'jquery/src/ajax/xhr.js';
  8. import $ from 'jquery/src/ajax';
  9. const CompanyDetail = Form.create()(React.createClass({
  10. loadData() {
  11. this.setState({
  12. loading: true
  13. });
  14. $.ajax({
  15. method: "post",
  16. dataType: "json",
  17. crossDomain: false,
  18. url: globalConfig.context + "/api/user/cognizance/cognizanceDetail",
  19. data: {
  20. }
  21. }).done(function (data) {
  22. if (!data.data) {
  23. if (data.error && data.error.length) {
  24. message.warning(data.error[0].message);
  25. };
  26. return;
  27. };
  28. }.bind(this)).always(function () {
  29. this.setState({
  30. loading: false
  31. });
  32. }.bind(this));
  33. },
  34. getInitialState() {
  35. return {
  36. loading: false,
  37. industryOption: [],
  38. scaleOption: [],
  39. humanTableData: [],
  40. legalTableData: [],
  41. humanColumns: [
  42. {
  43. title: '公民类型',
  44. dataIndex: 'type',
  45. key: 'type',
  46. width: '130px',
  47. render: (text, record, index) => {
  48. return <Select value={record.type} onChange={(e) => { record.type = e; this.setState({ humanTableData: this.state.humanTableData }); }}>
  49. <Select.Option value="china">中国公民</Select.Option>
  50. <Select.Option value="other">外籍公民</Select.Option>
  51. </Select>
  52. }
  53. }, {
  54. title: '姓名',
  55. dataIndex: 'name',
  56. key: 'name',
  57. render: (text, record, index) => {
  58. return <Input value={record.url} onChange={(e) => { record.name = e.target.value; this.setState({ humanTableData: this.state.humanTableData }); }} />
  59. }
  60. }, {
  61. title: '身份证(护照)号',
  62. dataIndex: 'IdNumber',
  63. key: 'IdNumber',
  64. render: (text, record, index) => {
  65. return <Input value={record.IdNumber} onChange={(e) => { record.IdNumber = e.target.value; this.setState({ humanTableData: this.state.humanTableData }); }} />
  66. }
  67. }, {
  68. title: '投资额(万元)',
  69. dataIndex: 'money',
  70. key: 'money',
  71. render: (text, record, index) => {
  72. return <InputNumber value={record.money} onChange={(e) => { record.money = e.target.value; this.setState({ humanTableData: this.state.humanTableData }); }} />
  73. }
  74. }
  75. ],
  76. legalColumns: [
  77. {
  78. title: '法人类型',
  79. dataIndex: 'type',
  80. key: 'type',
  81. width: '130px',
  82. render: (text, record, index) => {
  83. return <Select value={record.type} onChange={(e) => { record.type = e; this.setState({ legalTableData: this.state.legalTableData }); }}>
  84. <Select.Option value="china">中国企业法人</Select.Option>
  85. <Select.Option value="other">外观企业法人</Select.Option>
  86. </Select>
  87. }
  88. }, {
  89. title: '名称',
  90. dataIndex: 'name',
  91. key: 'name',
  92. render: (text, record, index) => {
  93. return <Input value={record.url} onChange={(e) => { record.name = e.target.value; this.setState({ legalTableData: this.state.legalTableData }); }} />
  94. }
  95. }, {
  96. title: '组织机构代码或统一社会信用代码',
  97. dataIndex: 'IdNumber',
  98. key: 'IdNumber',
  99. render: (text, record, index) => {
  100. return <Input value={record.IdNumber} onChange={(e) => { record.IdNumber = e.target.value; this.setState({ legalTableData: this.state.legalTableData }); }} />
  101. }
  102. }, {
  103. title: '投资额(万元)',
  104. dataIndex: 'money',
  105. key: 'money',
  106. render: (text, record, index) => {
  107. return <Input value={record.money} onChange={(e) => { record.money = e.target.value; this.setState({ legalTableData: this.state.legalTableData }); }} />
  108. }
  109. }
  110. ],
  111. humanSelectedRowKeys: [],
  112. humanSelectedRows: [],
  113. legalSelectedRowKeys: [],
  114. legalSelectedRows: []
  115. };
  116. },
  117. handleSubmit(e) {
  118. e.preventDefault();
  119. this.props.form.validateFields((err, values) => {
  120. if (!err) {
  121. this.props.spinState(true);
  122. $.ajax({
  123. method: "POST",
  124. dataType: "json",
  125. crossDomain: false,
  126. url: globalConfig.context + "/api/admin/disposeRatepay",
  127. data: {
  128. }
  129. }).done(function (data) {
  130. if (!data.error.length) {
  131. message.success('保存成功!');
  132. } else {
  133. message.warning(data.error[0].message);
  134. }
  135. }.bind(this));
  136. }
  137. });
  138. },
  139. componentWillMount() {
  140. let _me = this;
  141. industryList.map(function (item) {
  142. _me.state.industryOption.push(
  143. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  144. )
  145. });
  146. scaleList.map(function (item) {
  147. _me.state.scaleOption.push(
  148. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  149. )
  150. });
  151. this.loadData();
  152. },
  153. componentWillReceiveProps(nextProps) {
  154. },
  155. humanRemove() {
  156. let deletedIds = [];
  157. for (let idx = 0; idx < this.state.humanSelectedRows.length; idx++) {
  158. let rowItem = this.state.humanSelectedRows[idx];
  159. if (rowItem.id) {
  160. deletedIds.push(rowItem.id)
  161. }
  162. };
  163. this.setState({
  164. loading: deletedIds.length > 0
  165. });
  166. if (deletedIds.length) {
  167. $.ajax({
  168. url: globalConfig.context + '/api/permission/delete',
  169. method: 'post',
  170. data: {
  171. data: JSON.stringify(deletedIds)
  172. }
  173. }).done((res) => {
  174. if (!res.error.length) {
  175. Message.success("删除成功");
  176. this.state.humanSelectedRowKeys.sort((a, b) => { return b - a });
  177. for (let idx = 0; idx < this.state.humanSelectedRowKeys.length; idx++) {
  178. let dataIndex = this.state.humanSelectedRowKeys[idx];
  179. this.state.humanTableData.splice(dataIndex, 1);
  180. };
  181. this.setState({
  182. humanTableData: this.state.humanTableData,
  183. humanSelectedRowKeys: []
  184. });
  185. } else {
  186. Message.error(res.error[0].message);
  187. }
  188. }).always(() => {
  189. this.setState({
  190. loading: false
  191. });
  192. })
  193. }
  194. },
  195. humanAdd() {
  196. this.state.humanTableData.push({
  197. id: null,
  198. type: null,
  199. name: '',
  200. IdNumber: '',
  201. money: 0
  202. });
  203. this.setState({
  204. humanTableData: this.state.humanTableData
  205. })
  206. },
  207. humanSave() {
  208. this.setState({
  209. loading: true
  210. });
  211. $.ajax({
  212. url: globalConfig.context + '/api/permission',
  213. method: 'post',
  214. data: {
  215. data: JSON.stringify(this.state.data)
  216. }
  217. }).done((res) => {
  218. if (!res.error.length) {
  219. Message.success("保存成功");
  220. this.loadData();
  221. } else {
  222. Message.error(res.error[0].message);
  223. }
  224. }).always(() => {
  225. this.setState({
  226. loading: false
  227. });
  228. })
  229. },
  230. legalRemove() {
  231. let deletedIds = [];
  232. for (let idx = 0; idx < this.state.legalSelectedRows.length; idx++) {
  233. let rowItem = this.state.legalSelectedRows[idx];
  234. if (rowItem.id) {
  235. deletedIds.push(rowItem.id)
  236. }
  237. };
  238. this.setState({
  239. loading: deletedIds.length > 0
  240. });
  241. if (deletedIds.length) {
  242. $.ajax({
  243. url: globalConfig.context + '/api/permission/delete',
  244. method: 'post',
  245. data: {
  246. data: JSON.stringify(deletedIds)
  247. }
  248. }).done((res) => {
  249. if (!res.error.length) {
  250. Message.success("删除成功");
  251. this.state.legalSelectedRowKeys.sort((a, b) => { return b - a });
  252. for (let idx = 0; idx < this.state.legalSelectedRowKeys.length; idx++) {
  253. let dataIndex = this.state.legalSelectedRowKeys[idx];
  254. this.state.legalTableData.splice(dataIndex, 1);
  255. };
  256. this.setState({
  257. legalTableData: this.state.legalTableData,
  258. legalSelectedRowKeys: []
  259. });
  260. } else {
  261. Message.error(res.error[0].message);
  262. }
  263. }).always(() => {
  264. this.setState({
  265. loading: false
  266. });
  267. })
  268. }
  269. },
  270. legalAdd() {
  271. this.state.legalTableData.push({
  272. id: null,
  273. type: null,
  274. name: '',
  275. IdNumber: '',
  276. money: 0
  277. });
  278. this.setState({
  279. legalTableData: this.state.legalTableData
  280. })
  281. },
  282. legalSave() {
  283. this.setState({
  284. loading: true
  285. });
  286. $.ajax({
  287. url: globalConfig.context + '/api/permission',
  288. method: 'post',
  289. data: {
  290. data: JSON.stringify(this.state.data)
  291. }
  292. }).done((res) => {
  293. if (!res.error.length) {
  294. Message.success("保存成功");
  295. this.loadData();
  296. } else {
  297. Message.error(res.error[0].message);
  298. }
  299. }).always(() => {
  300. this.setState({
  301. loading: false
  302. });
  303. })
  304. },
  305. render() {
  306. const FormItem = Form.Item;
  307. const { getFieldDecorator } = this.props.form;
  308. //const theData = this.props.data;
  309. const theData = {};
  310. const formItemLayout = {
  311. labelCol: { span: 8 },
  312. wrapperCol: { span: 16 },
  313. };
  314. const humanRowSelection = {
  315. type: 'checkbox',
  316. selectedRowKeys: this.state.humanSelectedRowKeys,
  317. onChange: (selectedRowKeys, selectedRows) => {
  318. this.setState({
  319. humanSelectedRows: humanSelectedRows,
  320. humanSelectedRowKeys: humanSelectedRowKeys
  321. });
  322. }
  323. };
  324. const humanHasSelected = this.state.humanSelectedRowKeys.length > 0;
  325. const legalRowSelection = {
  326. type: 'checkbox',
  327. selectedRowKeys: this.state.legalSelectedRowKeys,
  328. onChange: (selectedRowKeys, selectedRows) => {
  329. this.setState({
  330. legalSelectedRows: legalSelectedRows,
  331. legalSelectedRowKeys: legalSelectedRowKeys
  332. });
  333. }
  334. };
  335. const legalHasSelected = this.state.legalSelectedRowKeys.length > 0;
  336. return (
  337. <Form onSubmit={this.handleSubmit} className="company-detail-form">
  338. <div className="content-title">
  339. <span>企业基本信息</span>
  340. </div>
  341. <div className="clearfix">
  342. <FormItem className="half-item"
  343. {...formItemLayout}
  344. label="企业名称"
  345. >
  346. {getFieldDecorator('operatingProfit', {
  347. rules: [{ required: true, message: '此项为必填项!' }],
  348. initialValue: theData.operatingProfit
  349. })(
  350. <Input />
  351. )}
  352. </FormItem>
  353. <FormItem className="half-item"
  354. {...formItemLayout}
  355. label="行政区域"
  356. >
  357. {getFieldDecorator('operatingProfit', {
  358. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  359. initialValue: theData.operatingProfit
  360. })(
  361. <Cascader options={provinceSelect()} />
  362. )}
  363. </FormItem>
  364. <FormItem className="half-item"
  365. {...formItemLayout}
  366. label="通信地址"
  367. >
  368. {getFieldDecorator('operatingProfit', {
  369. rules: [{ required: true, message: '此项为必填项!' }],
  370. initialValue: theData.operatingProfit
  371. })(
  372. <Input />
  373. )}
  374. </FormItem>
  375. <FormItem className="half-item"
  376. {...formItemLayout}
  377. label="邮编"
  378. >
  379. {getFieldDecorator('operatingProfit', {
  380. rules: [{ required: true, message: '此项为必填项!' }],
  381. initialValue: theData.operatingProfit
  382. })(
  383. <Input />
  384. )}
  385. </FormItem>
  386. </div>
  387. <div className="clearfix">
  388. <p className="content-title">联系人信息</p>
  389. <FormItem className="half-item"
  390. {...formItemLayout}
  391. label="姓名"
  392. >
  393. {getFieldDecorator('operatingIncome', {
  394. rules: [{ required: true, message: '此项为必填项!' }],
  395. initialValue: theData.operatingIncome
  396. })(
  397. <Input />
  398. )}
  399. </FormItem>
  400. <FormItem className="half-item"
  401. {...formItemLayout}
  402. label="手机"
  403. >
  404. {getFieldDecorator('managementCost', {
  405. rules: [{ required: true, message: '此项为必填项!' }],
  406. initialValue: theData.managementCost
  407. })(
  408. <Input />
  409. )}
  410. </FormItem>
  411. <FormItem className="half-item"
  412. {...formItemLayout}
  413. label="电话"
  414. >
  415. {getFieldDecorator('operatingProfit', {
  416. rules: [{ required: true, message: '此项为必填项!' }],
  417. initialValue: theData.operatingProfit
  418. })(
  419. <Input />
  420. )}
  421. </FormItem>
  422. <FormItem className="half-item"
  423. {...formItemLayout}
  424. label="传真"
  425. >
  426. {getFieldDecorator('operatingProfit', {
  427. rules: [{ required: true, message: '此项为必填项!' }],
  428. initialValue: theData.operatingProfit
  429. })(
  430. <Input />
  431. )}
  432. </FormItem>
  433. </div>
  434. <div className="clearfix">
  435. <p className="content-title">企业法人信息</p>
  436. <FormItem className="half-item"
  437. {...formItemLayout}
  438. label="电话"
  439. >
  440. {getFieldDecorator('operatingProfit', {
  441. rules: [{ required: true, message: '此项为必填项!' }],
  442. initialValue: theData.operatingProfit
  443. })(
  444. <Input />
  445. )}
  446. </FormItem>
  447. <FormItem className="half-item"
  448. {...formItemLayout}
  449. label="传真"
  450. >
  451. {getFieldDecorator('operatingProfit', {
  452. rules: [{ required: true, message: '此项为必填项!' }],
  453. initialValue: theData.operatingProfit
  454. })(
  455. <Input />
  456. )}
  457. </FormItem>
  458. <FormItem className="half-item"
  459. {...formItemLayout}
  460. label="E-mail"
  461. >
  462. {getFieldDecorator('operatingProfit', {
  463. rules: [{ required: true, message: '此项为必填项!' }],
  464. initialValue: theData.operatingProfit
  465. })(
  466. <Input />
  467. )}
  468. </FormItem>
  469. </div>
  470. <div className="content-title">
  471. <span>企业重要信息</span>
  472. </div>
  473. <div className="clearfix">
  474. <FormItem className="half-item"
  475. {...formItemLayout}
  476. label="注册资金"
  477. >
  478. {getFieldDecorator('operatingIncome', {
  479. rules: [{ required: true, message: '此项为必填项!' }],
  480. initialValue: theData.operatingIncome
  481. })(
  482. <InputNumber />
  483. )}
  484. <span>万元</span>
  485. </FormItem>
  486. <FormItem className="half-item"
  487. {...formItemLayout}
  488. label="注册时间"
  489. >
  490. {getFieldDecorator('managementCost', {
  491. rules: [{ type: 'object', required: true, message: '此项为必填项!' }],
  492. initialValue: theData.managementCost
  493. })(
  494. <DatePicker />
  495. )}
  496. </FormItem>
  497. <FormItem className="half-item"
  498. {...formItemLayout}
  499. label="法人代表姓名"
  500. >
  501. {getFieldDecorator('operatingProfit', {
  502. rules: [{ required: true, message: '此项为必填项!' }],
  503. initialValue: theData.operatingProfit
  504. })(
  505. <Input />
  506. )}
  507. </FormItem>
  508. <FormItem className="half-item"
  509. {...formItemLayout}
  510. label="身份证号"
  511. >
  512. {getFieldDecorator('operatingProfit', {
  513. rules: [{ required: true, message: '此项为必填项!' }],
  514. initialValue: theData.operatingProfit
  515. })(
  516. <Input />
  517. )}
  518. </FormItem>
  519. <FormItem className="half-item"
  520. {...formItemLayout}
  521. label="组织机构代码/统一社会信用代码"
  522. >
  523. {getFieldDecorator('operatingProfit', {
  524. rules: [{ required: true, message: '此项为必填项!' }],
  525. initialValue: theData.operatingProfit
  526. })(
  527. <Input />
  528. )}
  529. </FormItem>
  530. <FormItem className="half-item"
  531. {...formItemLayout}
  532. label="税务登记号/统一社会信用代码"
  533. >
  534. {getFieldDecorator('operatingProfit', {
  535. rules: [{ required: true, message: '此项为必填项!' }],
  536. initialValue: theData.operatingProfit
  537. })(
  538. <Input />
  539. )}
  540. </FormItem>
  541. <FormItem className="half-item"
  542. {...formItemLayout}
  543. label="所属行业"
  544. >
  545. {getFieldDecorator('operatingProfit', {
  546. rules: [{ required: true, message: '此项为必填项!' }],
  547. initialValue: theData.operatingProfit
  548. })(
  549. <Select>{this.state.industryOption}</Select>
  550. )}
  551. </FormItem>
  552. <FormItem className="half-item"
  553. {...formItemLayout}
  554. label="企业规模(注册资金)"
  555. >
  556. {getFieldDecorator('operatingProfit', {
  557. rules: [{ required: true, message: '此项为必填项!' }],
  558. initialValue: theData.operatingProfit
  559. })(
  560. <Select>{this.state.scaleOption}</Select>
  561. )}
  562. </FormItem>
  563. <FormItem className="half-item"
  564. {...formItemLayout}
  565. label="注册类型"
  566. >
  567. {getFieldDecorator('operatingProfit', {
  568. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  569. initialValue: theData.operatingProfit
  570. })(
  571. <Cascader options={companyType} />
  572. )}
  573. </FormItem>
  574. <FormItem className="half-item"
  575. {...formItemLayout}
  576. label="外资来源地"
  577. >
  578. {getFieldDecorator('operatingProfit', {
  579. rules: [{ required: true, message: '此项为必填项!' }],
  580. initialValue: theData.operatingProfit
  581. })(
  582. <Input />
  583. )}
  584. </FormItem>
  585. <FormItem className="half-item"
  586. {...formItemLayout}
  587. label="领域"
  588. >
  589. {getFieldDecorator('operatingProfit', {
  590. rules: [{ required: true, message: '此项为必填项!' }],
  591. initialValue: theData.operatingProfit
  592. })(
  593. <Cascader options={techFieldList} />
  594. )}
  595. </FormItem>
  596. <FormItem className="half-item"
  597. {...formItemLayout}
  598. label="企业所得税主管税务机关"
  599. >
  600. {getFieldDecorator('operatingProfit', {
  601. rules: [{ required: true, message: '此项为必填项!' }],
  602. initialValue: theData.operatingProfit
  603. })(
  604. <Radio.Group>
  605. <Radio value="1">国税</Radio>
  606. <Radio value="2">地税</Radio>
  607. </Radio.Group>
  608. )}
  609. </FormItem>
  610. <FormItem className="half-item"
  611. {...formItemLayout}
  612. label="企业所得税征收方式"
  613. >
  614. {getFieldDecorator('operatingProfit', {
  615. rules: [{ required: true, message: '此项为必填项!' }],
  616. initialValue: theData.operatingProfit
  617. })(
  618. <Radio.Group>
  619. <Radio value="1">查账征收</Radio>
  620. <Radio value="2">核定征收</Radio>
  621. </Radio.Group>
  622. )}
  623. </FormItem>
  624. </div>
  625. <div className="clearfix">
  626. <FormItem className="half-item"
  627. {...formItemLayout}
  628. label="是否上市"
  629. > {getFieldDecorator('listed', {
  630. initialValue: this.state.listed || "0"
  631. })(
  632. <Radio.Group>
  633. <Radio value="0">否</Radio>
  634. <Radio value="1">是</Radio>
  635. </Radio.Group>
  636. )}
  637. </FormItem>
  638. </div>
  639. <div className="clearfix" style={{ display: this.props.form.getFieldValue('listed') == 0 ? 'none' : 'block' }}>
  640. <FormItem className="half-item"
  641. {...formItemLayout}
  642. label="上市时间"
  643. >
  644. {getFieldDecorator('listedDate', {
  645. initialValue: this.state.listedDate ? moment(this.state.listedDate) : null
  646. })(
  647. <DatePicker />
  648. )}
  649. </FormItem>
  650. <FormItem className="half-item"
  651. {...formItemLayout}
  652. label="上市类型"
  653. > {getFieldDecorator('listedType', {
  654. initialValue: this.state.listedType
  655. })(
  656. <Select placeholder="请选择上市类型">
  657. <Select.Option value='0'>股票型上市公司</Select.Option>
  658. <Select.Option value='1'>债券型上市公司</Select.Option>
  659. </Select>
  660. )}
  661. </FormItem>
  662. <FormItem className="half-item"
  663. {...formItemLayout}
  664. label="股票代码"
  665. > {getFieldDecorator('stockCode', {
  666. initialValue: this.state.stockCode
  667. })(
  668. <Input />
  669. )}
  670. </FormItem>
  671. </div>
  672. <div className="clearfix">
  673. <FormItem className="half-item"
  674. {...formItemLayout}
  675. label="是否属于国家级高新区内企业"
  676. > {getFieldDecorator('highTechZone', {
  677. initialValue: this.state.highTechZone || "0"
  678. })(
  679. <Radio.Group>
  680. <Radio value="0">否</Radio>
  681. <Radio value="1">是</Radio>
  682. </Radio.Group>
  683. )}
  684. </FormItem>
  685. </div>
  686. <div className="clearfix" style={{ display: this.props.form.getFieldValue('highTechZone') == 0 ? 'none' : 'block' }}>
  687. <FormItem className="half-item"
  688. {...formItemLayout}
  689. label="国家级高新区名称"
  690. > {getFieldDecorator('zoneName', {
  691. initialValue: this.state.listed || "0"
  692. })(
  693. <Input />
  694. )}
  695. </FormItem>
  696. </div>
  697. <div className="content-title">
  698. <span>股权结构</span>
  699. </div>
  700. <div className="clearfix">
  701. <div className="half-item">
  702. <div className="table-title">
  703. <span>自然人股权</span>
  704. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  705. onClick={this.humanAdd}>添加<Icon type="plus" /></Button>
  706. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  707. disabled={!humanHasSelected}
  708. onClick={this.humanRemove}>删除<Icon type="minus" /></Button>
  709. <Button type="primary" onClick={this.humanSave}>保存修改</Button>
  710. </div>
  711. <Table className="company-table" style={{ padding: '10px 20px' }}
  712. columns={this.state.humanColumns}
  713. dataSource={this.state.humanTableData}
  714. pagination={false}
  715. rowSelection={humanRowSelection} />
  716. </div>
  717. <div className="half-item">
  718. <div className="table-title">
  719. <span>法人股权</span>
  720. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  721. onClick={this.legalAdd}>添加<Icon type="plus" /></Button>
  722. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  723. disabled={!legalHasSelected}
  724. onClick={this.legalRemove}>删除<Icon type="minus" /></Button>
  725. <Button type="primary" onClick={this.legalSave}>保存修改</Button>
  726. </div>
  727. <Table className="company-table" style={{ padding: '10px 20px' }}
  728. columns={this.state.legalColumns}
  729. dataSource={this.state.legalTableData}
  730. pagination={false}
  731. rowSelection={legalRowSelection} />
  732. </div>
  733. </div>
  734. <FormItem style={{ width: '50%' }}
  735. {...formItemLayout}
  736. label="是否引入风险投资"
  737. >
  738. {getFieldDecorator('operatingProfit', {
  739. rules: [{ required: true, message: '此项为必填项!' }],
  740. initialValue: theData.operatingProfit
  741. })(
  742. <Radio.Group>
  743. <Radio value="1">是</Radio>
  744. <Radio value="2">否</Radio>
  745. </Radio.Group>
  746. )}
  747. </FormItem>
  748. <FormItem style={{ width: '50%' }}
  749. {...formItemLayout}
  750. label="经营范围(限400字)"
  751. >
  752. {getFieldDecorator('operatingProfit', {
  753. rules: [{ required: true, message: '此项为必填项!' }],
  754. initialValue: theData.operatingProfit
  755. })(
  756. <Input type='textarea' rows={6} />
  757. )}
  758. </FormItem>
  759. <div className="content-title">
  760. <span>员工情况</span>
  761. </div>
  762. <div className="clearfix">
  763. <FormItem className="half-item" style={{ width: '25%' }}
  764. {...formItemLayout}
  765. label="企业职工"
  766. >
  767. {getFieldDecorator('firmTotal', {
  768. initialValue: theData.firmTotal || 0
  769. })(
  770. <InputNumber />
  771. )}
  772. </FormItem>
  773. <FormItem className="half-item"
  774. {...formItemLayout}
  775. label="科技人员"
  776. >
  777. {getFieldDecorator('techTotal', {
  778. initialValue: theData.techTotal || 0
  779. })(
  780. <InputNumber />
  781. )}
  782. <span>其中科技人员占比
  783. {(() => {
  784. if (!this.props.form.getFieldValue('techTotal') || !this.props.form.getFieldValue('firmTotal')) {
  785. return 0
  786. }
  787. return (this.props.form.getFieldValue('techTotal') / this.props.form.getFieldValue('firmTotal') * 100).toFixed(2)
  788. })()}
  789. %</span>
  790. </FormItem>
  791. </div>
  792. <FormItem style={{ marginTop: '20px' }}>
  793. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  794. <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
  795. </FormItem>
  796. </Form >
  797. );
  798. },
  799. }));
  800. export default CompanyDetail;