cognizance.jsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. import React from 'react';
  2. import { Icon, InputNumber, Form, Button, Input, Radio, Select, Spin, Table, message, Cascader, Modal } from 'antd';
  3. import { techFieldList, provinceArr, cognizanceStateList } from '../../dataDic.js';
  4. import { getTime, getCognizanceState } from '../../tools.js';
  5. import ajax from 'jquery/src/ajax/xhr.js';
  6. import $ from 'jquery/src/ajax';
  7. import moment from 'moment';
  8. import './cognizance.less';
  9. const CognizanceDescFrom = 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 + "/techservice/cognizance/cognizanceDetail",
  19. data: {
  20. cid: this.props.data.cid,
  21. year: this.props.data.year
  22. },
  23. success: function (data) {
  24. if (data.error.length || !data.data) {
  25. message.warning(data.error[0].message);
  26. return;
  27. };
  28. this.state.data = data.data;
  29. this.state.cid = this.props.data.cid;
  30. this.state.moneyTable = [{
  31. key: 1,
  32. year: '第一年',
  33. netAsset: data.data.netAsset1,
  34. salesRevenue: data.data.salesRevenue1,
  35. grossProfit: data.data.grossProfit1
  36. }, {
  37. key: 2,
  38. year: '第二年',
  39. netAsset: data.data.netAsset2,
  40. salesRevenue: data.data.salesRevenue2,
  41. grossProfit: data.data.grossProfit2
  42. }, {
  43. key: 3,
  44. year: '第三年',
  45. netAsset: data.data.netAsset3,
  46. salesRevenue: data.data.salesRevenue3,
  47. grossProfit: data.data.grossProfit3
  48. }];
  49. }.bind(this),
  50. }).always(function () {
  51. this.setState({
  52. loading: false
  53. });
  54. }.bind(this));
  55. },
  56. getStateData() {
  57. this.setState({
  58. loading: true
  59. });
  60. $.ajax({
  61. method: "post",
  62. dataType: "json",
  63. crossDomain: false,
  64. url: globalConfig.context + "/techservice/cognizance/cognizanceLog",
  65. data: {
  66. cid: this.props.data.cid
  67. },
  68. success: function (data) {
  69. if (data.error.length || !data.data) {
  70. message.warning(data.error[0].message);
  71. return;
  72. };
  73. this.state.stateTable = [];
  74. for (let i = 0; i < data.data.length; i++) {
  75. this.state.stateTable.push({
  76. key: i,
  77. recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
  78. state: String(data.data[i].state),
  79. principal: data.data[i].principal,
  80. operator: data.data[i].operator,
  81. comment: data.data[i].comment
  82. });
  83. };
  84. }.bind(this),
  85. }).always(function () {
  86. this.setState({
  87. loading: false
  88. });
  89. }.bind(this));
  90. },
  91. getInitialState() {
  92. return {
  93. loading: false,
  94. stateOption: [],
  95. moneyColumns: [{
  96. title: '',
  97. dataIndex: 'year',
  98. key: 'year',
  99. }, {
  100. title: '净资产',
  101. dataIndex: 'netAsset',
  102. key: 'netAsset',
  103. }, {
  104. title: '销售收入',
  105. dataIndex: 'salesRevenue',
  106. key: 'salesRevenue',
  107. }, {
  108. title: '利润总和',
  109. dataIndex: 'grossProfit',
  110. key: 'grossProfit',
  111. }],
  112. stateColumns: [{
  113. title: '专利状态',
  114. dataIndex: 'state',
  115. key: 'state',
  116. render: (text) => { return getCognizanceState(text) }
  117. }, {
  118. title: '处理时间',
  119. dataIndex: 'recordTimeFormattedDate',
  120. key: 'recordTimeFormattedDate',
  121. }, {
  122. title: '负责人',
  123. dataIndex: 'principal',
  124. key: 'principal',
  125. }, {
  126. title: '操作人',
  127. dataIndex: 'operator',
  128. key: 'operator',
  129. }, {
  130. title: '备注',
  131. dataIndex: 'comment',
  132. key: 'comment',
  133. }]
  134. };
  135. },
  136. componentWillMount() {
  137. let _me = this;
  138. cognizanceStateList.map(function (item) {
  139. _me.state.stateOption.push(
  140. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  141. )
  142. });
  143. this.loadData();
  144. this.getStateData();
  145. },
  146. handleSubmit(e) {
  147. e.preventDefault();
  148. this.props.form.validateFields((err, values) => {
  149. if (!err) {
  150. this.props.spinState(true);
  151. $.ajax({
  152. method: "POST",
  153. dataType: "json",
  154. crossDomain: false,
  155. url: globalConfig.context + "/techservice/cognizance/disposeCognizanceDetail",
  156. data: {
  157. id: this.props.data.cid,
  158. technicalField1: values.technicalField[0],
  159. technicalField2: values.technicalField[1],
  160. technicalField3: values.technicalField[2],
  161. basicResearchCost: values.basicResearchCost,
  162. accident: values.accident
  163. }
  164. }).done(function (data) {
  165. if (!data.error.length) {
  166. message.success('保存成功!');
  167. this.props.clickOk();
  168. this.props.form.resetFields();
  169. this.state.targetKeys = [];
  170. this.state.selectedKeys = [];
  171. this.props.spinState(false);
  172. } else {
  173. message.warning(data.error[0].message);
  174. this.props.spinState(false);
  175. }
  176. }.bind(this));
  177. }
  178. });
  179. },
  180. componentWillReceiveProps(nextProps) {
  181. if (!this.props.visible && nextProps.visible) {
  182. this.getStateData();
  183. this.loadData();
  184. };
  185. },
  186. render() {
  187. const FormItem = Form.Item;
  188. const { getFieldDecorator } = this.props.form;
  189. const theData = this.state.data;
  190. const formItemLayout = {
  191. labelCol: { span: 6 },
  192. wrapperCol: { span: 12 },
  193. };
  194. const _me = this;
  195. if (this.state.data) {
  196. return (
  197. <Form onSubmit={this.handleSubmit} id="highTechApply-form">
  198. <div className="clearfix">
  199. <div className="half-item">
  200. <span className="item-title">公司名称: </span>
  201. <span>{theData.unitName}</span>
  202. </div>
  203. <div className="half-item">
  204. <span className="item-title">公司组织机构代码: </span>
  205. <span>{theData.orgCode}</span>
  206. </div>
  207. <div className="half-item">
  208. <span className="item-title">公司地址: </span>
  209. <span>{theData.postalAddress}</span>
  210. </div>
  211. <FormItem className="half-item"
  212. labelCol={{ span: 6 }}
  213. wrapperCol={{ span: 14 }}
  214. >
  215. {getFieldDecorator('contacts', {
  216. rules: [{ required: true, message: '此项为必填项!' }],
  217. initialValue: theData.contacts
  218. })(
  219. <Select placeholder='选择一个联系人'>{this.props.contactsOption}</Select>
  220. )}
  221. </FormItem>
  222. </div>
  223. <FormItem style={{ width: '50%' }}
  224. labelCol={{ span: 0 }}
  225. wrapperCol={{ span: 24 }}
  226. label="技术领域"
  227. >
  228. <span className="item-title">技术领域: </span>
  229. {getFieldDecorator('technicalField', {
  230. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  231. initialValue: [Number(theData.technicalField1), Number(theData.technicalField2), Number(theData.technicalField3)]
  232. })(
  233. <Cascader options={techFieldList} placeholder="请选择技术领域" />
  234. )}
  235. </FormItem>
  236. <div className="clearfix">
  237. <div>
  238. <span className="form-title">获得知识产权数量(件): </span>
  239. </div>
  240. <div className="half-item">
  241. <span className="item-title">一类: </span>
  242. <span>{theData.firstCatagory}</span>
  243. </div>
  244. <div className="half-item">
  245. <span className="item-title">二类: </span>
  246. <span>{theData.secondCatagory}</span>
  247. </div>
  248. </div>
  249. <div className="clearfix">
  250. <div>
  251. <span className="form-title">人力资源状况(人): </span>
  252. </div>
  253. <div className="half-item">
  254. <span className="item-title">职工总数: </span>
  255. <span>{theData.firmTotal}</span>
  256. </div>
  257. <div className="half-item">
  258. <span className="item-title">科技人员数: </span>
  259. <span>{theData.techTotal}</span>
  260. </div>
  261. </div>
  262. <div className="form-title">近三年经营状况(万元): </div>
  263. <Table pagination={false} dataSource={this.state.moneyTable} columns={this.state.moneyColumns} />
  264. <div className="clearfix">
  265. <div><span className="form-title">近三年研究开发费用总额(万元): </span></div>
  266. <div className="third-item">
  267. <div className="item-title">近三年研究开发费用总额</div>
  268. <p>{theData.researchCost}</p>
  269. </div>
  270. <div className="third-item">
  271. <div className="item-title">其中: 在中国境内研发费用总和</div>
  272. <p>{theData.territory}</p>
  273. </div>
  274. <div className="third-item">
  275. <div className="item-title">其中: 基础研究投入费用总额</div>
  276. <div>
  277. <FormItem
  278. labelCol={{ span: 0 }}
  279. wrapperCol={{ span: 24 }}
  280. >
  281. {getFieldDecorator('basicResearchCost', {
  282. rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
  283. initialValue: theData.basicResearchCost
  284. })(
  285. <InputNumber />
  286. )}
  287. </FormItem>
  288. </div>
  289. </div>
  290. </div>
  291. <div>
  292. <span className="item-title">近一年企业总收入(万元): </span>
  293. <span>{theData.totalRevenue}</span>
  294. </div>
  295. <div>
  296. <span className="item-title">近一年高新技术产品收入(万元): </span>
  297. <span>{theData.lastYearRevenue}</span>
  298. </div>
  299. <div className="item-title">申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为</div>
  300. <FormItem
  301. labelCol={{ span: 0 }}
  302. wrapperCol={{ span: 24 }}
  303. >
  304. {getFieldDecorator('accident', {
  305. rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
  306. initialValue: theData.accident
  307. })(
  308. <Radio.Group>
  309. <Radio value={0}>否</Radio>
  310. <Radio value={1}>是</Radio>
  311. </Radio.Group>
  312. )}
  313. </FormItem>
  314. <div className="form-title">状态流转记录: </div>
  315. <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
  316. <FormItem style={{ marginTop: '20px' }}>
  317. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  318. <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
  319. </FormItem>
  320. </Form >
  321. );
  322. } else {
  323. return (<div></div>)
  324. };
  325. },
  326. }));
  327. const CognizanceDesc = React.createClass({
  328. getInitialState() {
  329. return {
  330. visible: false,
  331. loading: false
  332. };
  333. },
  334. componentWillReceiveProps(nextProps) {
  335. this.state.visible = nextProps.showDesc
  336. },
  337. showModal() {
  338. this.setState({
  339. visible: true,
  340. });
  341. },
  342. handleOk() {
  343. this.setState({
  344. visible: false,
  345. });
  346. this.props.closeDesc(false, true);
  347. },
  348. handleCancel(e) {
  349. this.setState({
  350. visible: false,
  351. });
  352. this.props.closeDesc(false);
  353. },
  354. spinChange(e) {
  355. this.setState({
  356. loading: e
  357. });
  358. },
  359. render() {
  360. return (
  361. <div className="patent-addNew">
  362. <Spin spinning={this.state.loading} className='spin-box'>
  363. <Modal title="高企管理" visible={this.state.visible}
  364. onOk={this.handleOk} onCancel={this.handleCancel}
  365. width='1000px'
  366. footer=''
  367. >
  368. <CognizanceDescFrom
  369. visible={this.state.visible}
  370. contactsOption={this.props.contactsOption}
  371. data={this.props.data}
  372. spinState={this.spinChange}
  373. closeModal={this.handleCancel}
  374. clickOk={this.handleOk} />
  375. </Modal>
  376. </Spin>
  377. </div>
  378. );
  379. }
  380. });
  381. const CognizanceAdd = React.createClass({
  382. getInitialState() {
  383. return {
  384. visible: false,
  385. loading: false,
  386. yearOption: []
  387. };
  388. },
  389. componentWillReceiveProps(nextProps) {
  390. this.state.visible = nextProps.showAdd
  391. },
  392. componentWillMount() {
  393. let d = new Date();
  394. let _me = this;
  395. d = d.getFullYear() - 1;
  396. this.state.thisYear = d;
  397. for (let i = d; i < d + 20; i++) {
  398. _me.state.yearOption.push(
  399. <Select.Option value={i.toString()} key={i}>{i}</Select.Option>
  400. )
  401. };
  402. },
  403. showModal() {
  404. this.setState({
  405. visible: true,
  406. });
  407. },
  408. handleOk() {
  409. this.setState({
  410. loading: true
  411. });
  412. if (!this.state.year) {
  413. message.warning('请选择年份!');
  414. this.setState({
  415. loading: false
  416. });
  417. return;
  418. };
  419. if (!this.state.contacts) {
  420. message.warning('请选择一个联系人!');
  421. this.setState({
  422. loading: false
  423. });
  424. return;
  425. };
  426. $.ajax({
  427. method: "POST",
  428. dataType: "json",
  429. crossDomain: false,
  430. url: globalConfig.context + "/techservice/cognizance/applyCognizance",
  431. data: {
  432. year: this.state.year,
  433. contacts: this.state.contacts,
  434. comment: this.state.comment,
  435. state: this.state.year == this.state.thisYear ? 0 : 7
  436. }
  437. }).done(function (data) {
  438. if (!data.error.length) {
  439. message.success('保存成功!');
  440. this.setState({
  441. visible: false
  442. });
  443. this.props.closeAdd(false, true);
  444. } else {
  445. message.warning(data.error[0].message);
  446. this.setState({
  447. loading: false
  448. });
  449. }
  450. }.bind(this));
  451. },
  452. handleCancel(e) {
  453. this.setState({
  454. visible: false,
  455. });
  456. this.props.closeAdd(false);
  457. },
  458. spinChange(e) {
  459. this.setState({
  460. loading: e
  461. });
  462. },
  463. render() {
  464. return (
  465. <div className="cognizance-add">
  466. <Modal title="高企申请" visible={this.state.visible}
  467. onOk={this.handleOk} onCancel={this.handleCancel}
  468. width='800px'
  469. footer={[
  470. <Button key="submit" type="primary" loading={this.state.loading} onClick={this.handleOk}>
  471. 提交
  472. </Button>,
  473. <Button key="back" onClick={this.handleCancel}>
  474. 返回
  475. </Button>,
  476. ]}
  477. >
  478. <div className="clearfix">
  479. <div className="half-item">
  480. <span>选择申请年份: </span>
  481. <Select placeholder="请选择年份" style={{ width: 200 }}
  482. onSelect={(e, n) => { this.state.year = e }}>
  483. {this.state.yearOption}
  484. </Select>
  485. </div>
  486. <div className="half-item">
  487. <span>选择联系人: </span>
  488. <Select placeholder="请选择联系人" style={{ width: 200 }}
  489. onSelect={(e, n) => { this.state.contacts = e }}>
  490. {this.props.contactsOption}
  491. </Select>
  492. </div>
  493. </div>
  494. <div>
  495. <p>备注: </p>
  496. <p>
  497. <Input type="textarea" rows={6} onChange={(e) => { this.state.comment = e.target.value; }} />
  498. </p>
  499. </div>
  500. </Modal>
  501. </div>
  502. );
  503. }
  504. });
  505. const Cognizance = React.createClass({
  506. loadData(pageNo) {
  507. this.state.data = [];
  508. this.setState({
  509. loading: true
  510. });
  511. $.when($.ajax({
  512. method: "get",
  513. dataType: "json",
  514. crossDomain: false,
  515. url: globalConfig.context + "/techservice/cognizance/getContacts"
  516. }), $.ajax({
  517. method: "post",
  518. dataType: "json",
  519. crossDomain: false,
  520. url: globalConfig.context + "/techservice/cognizance/listCognizance",
  521. data: {
  522. pageNo: pageNo || 1,
  523. pageSize: this.state.pagination.pageSize
  524. }
  525. })).done((data1, data2) => {
  526. this.state.data = [];
  527. if (data1[0].error || !data1[0].data) {
  528. if (data1[0].error.length) {
  529. message.warning(data.error[0].message);
  530. return;
  531. };
  532. };
  533. if (data2[0].error || !data2[0].data || !data2[0].data.list) {
  534. if (data2[0].error.length) {
  535. message.warning(data2[0].error[0].message);
  536. return;
  537. };
  538. };
  539. let _me = this;
  540. for (let item in data1[0].data) {
  541. let theData = data1[0].data[item];
  542. _me.state.contactsOption.push(
  543. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  544. );
  545. };
  546. for (let i = 0; i < data2[0].data.list.length; i++) {
  547. let thisdata = data2[0].data.list[i];
  548. this.state.data.push({
  549. key: i,
  550. uid: thisdata.uid,
  551. cid: thisdata.cid,
  552. year: thisdata.year,
  553. serialNumber: thisdata.serialNumber,
  554. locationProvince: thisdata.locationProvince,
  555. unitName: thisdata.unitName,
  556. contacts: [thisdata.contacts, {
  557. '1': thisdata.firstContacts,
  558. '2': thisdata.secondContacts,
  559. '3': thisdata.thirdContacts
  560. }],
  561. createTime: thisdata.createTime,
  562. comment: thisdata.comment,
  563. state: thisdata.state,
  564. certificateNumber: thisdata.certificateNumber,
  565. issuingDate: thisdata.issuingDate,
  566. consultant: thisdata.consultant,
  567. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  568. issuingDateFormattedDate: thisdata.issuingDateFormattedDate
  569. });
  570. };
  571. this.state.pagination.current = data2[0].data.pageNo;
  572. this.state.pagination.total = data2[0].data.totalCount;
  573. this.setState({
  574. dataSource: this.state.data,
  575. pagination: this.state.pagination
  576. });
  577. }).always(function () {
  578. this.setState({
  579. loading: false
  580. });
  581. }.bind(this));
  582. },
  583. getInitialState() {
  584. return {
  585. contactsOption: [],
  586. selectedRowKeys: [],
  587. selectedRows: [],
  588. loading: false,
  589. showAdd: false,
  590. showDesc: false,
  591. pagination: {
  592. defaultCurrent: 1,
  593. defaultPageSize: 10,
  594. showQuickJumper: true,
  595. pageSize: 10,
  596. onChange: function (page) {
  597. this.loadData(page);
  598. }.bind(this),
  599. showTotal: function (total) {
  600. return '共' + total + '条数据';
  601. }
  602. },
  603. columns: [
  604. {
  605. title: '编号',
  606. dataIndex: 'serialNumber',
  607. key: 'serialNumber'
  608. }, {
  609. title: '联系人',
  610. dataIndex: 'contacts',
  611. key: 'contacts',
  612. render: (text) => {
  613. for (let item in text[1]) {
  614. if (text[0] == item) {
  615. return text[1][item];
  616. };
  617. };
  618. }
  619. }, {
  620. title: '派单日',
  621. dataIndex: 'createTimeFormattedDate',
  622. key: 'createTimeFormattedDate'
  623. }, {
  624. title: '状态',
  625. dataIndex: 'state',
  626. key: 'state',
  627. render: (text) => { return getCognizanceState(text) }
  628. }, {
  629. title: '证书编号',
  630. dataIndex: 'certificateNumber',
  631. key: 'certificateNumber'
  632. }, {
  633. title: '发证日',
  634. dataIndex: 'issuingDateFormattedDate',
  635. key: 'issuingDateFormattedDate'
  636. }, {
  637. title: '到期日',
  638. dataIndex: 'issuingDate',
  639. key: 'issuingDate',
  640. render: (text) => { return getTime(text, 36) }
  641. }, {
  642. title: '咨询师',
  643. dataIndex: 'consultant',
  644. key: 'consultant'
  645. }
  646. ],
  647. dataSource: []
  648. };
  649. },
  650. componentWillMount() {
  651. this.loadData();
  652. },
  653. tableRowClick(record, index) {
  654. this.state.RowData = record;
  655. this.setState({
  656. showDesc: true
  657. });
  658. },
  659. addClick() {
  660. this.setState({
  661. showAdd: true
  662. });
  663. },
  664. // delectRow() {
  665. // let deletedIds = [];
  666. // for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  667. // let rowItem = this.state.selectedRows[idx];
  668. // if (rowItem.id) {
  669. // deletedIds.push(rowItem.id)
  670. // }
  671. // }
  672. // this.setState({
  673. // selectedRowKeys: [],
  674. // loading: deletedIds.length > 0
  675. // });
  676. // $.ajax({
  677. // method: "POST",
  678. // dataType: "json",
  679. // crossDomain: false,
  680. // url: globalConfig.context + "/techservice/cognizance/deleteTechProduct",
  681. // data: {
  682. // ids: deletedIds
  683. // }
  684. // }).done(function (data) {
  685. // if (!data.error.length) {
  686. // message.success('保存成功!');
  687. // this.setState({
  688. // loading: false,
  689. // });
  690. // } else {
  691. // message.warning(data.error[0].message);
  692. // };
  693. // this.loadData();
  694. // }.bind(this));
  695. // },
  696. closeDesc(e, s) {
  697. this.state.showDesc = e;
  698. if (s) {
  699. this.loadData();
  700. };
  701. },
  702. closeAdd(e, s) {
  703. this.state.showAdd = e;
  704. if (s) {
  705. this.loadData();
  706. };
  707. },
  708. // search() {
  709. // this.loadData();
  710. // },
  711. // reset() {
  712. // this.loadData();
  713. // },
  714. render() {
  715. const rowSelection = {
  716. selectedRowKeys: this.state.selectedRowKeys,
  717. onChange: (selectedRowKeys, selectedRows) => {
  718. this.setState({
  719. selectedRows: selectedRows,
  720. selectedRowKeys: selectedRowKeys
  721. });
  722. }
  723. };
  724. const hasSelected = this.state.selectedRowKeys.length > 0;
  725. return (
  726. <div className="user-content" >
  727. <div className="content-title">
  728. <span>高企申请管理</span>
  729. </div>
  730. <div className="user-search">
  731. <p>
  732. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  733. onClick={this.addClick}>添加<Icon type="plus" /></Button>
  734. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff", display: 'none' }}
  735. disabled={!hasSelected}
  736. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  737. </p>
  738. </div>
  739. <div className="patent-table">
  740. <Spin spinning={this.state.loading}>
  741. <Table columns={this.state.columns}
  742. dataSource={this.state.dataSource}
  743. pagination={this.state.pagination}
  744. //rowSelection={rowSelection}
  745. onRowClick={this.tableRowClick} />
  746. </Spin>
  747. </div>
  748. <CognizanceDesc
  749. data={this.state.RowData}
  750. contactsOption={this.state.contactsOption}
  751. showDesc={this.state.showDesc}
  752. closeDesc={this.closeDesc} />
  753. <CognizanceAdd
  754. contactsOption={this.state.contactsOption}
  755. showAdd={this.state.showAdd}
  756. closeAdd={this.closeAdd} />
  757. </div >
  758. );
  759. }
  760. });
  761. export default Cognizance;