activityCostList.jsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. import React from 'react';
  2. import { Icon, Form, Upload, Button, Input, Spin, Table, message, Select, Modal, DatePicker, InputNumber } from 'antd';
  3. import './activityCostList.less';
  4. import { beforeUploadFile, downloadFile } from '../../../../tools.js';
  5. import moment from 'moment';
  6. import ajax from 'jquery/src/ajax/xhr.js';
  7. import $ from 'jquery/src/ajax';
  8. const ActivityDescFrom = Form.create()(React.createClass({
  9. getInitialState() {
  10. return {
  11. loading: false,
  12. activityNumberOption: [],
  13. };
  14. },
  15. componentWillMount() {
  16. let _me = this;
  17. this.state.internalAllCost = this.props.data.internalAllCost;
  18. this.state.allCost = this.props.data.allCost;
  19. this.props.activityNumberList.map(function (item) {
  20. _me.state.activityNumberOption.push(
  21. <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
  22. )
  23. });
  24. },
  25. allCostCount() {
  26. this.state.internalAllCost = this.props.form.getFieldValue('internalLaborCost') + this.props.form.getFieldValue('internalDirectCost') +
  27. this.props.form.getFieldValue('internalDepreciationCost') + this.props.form.getFieldValue('internalAmortizationCost') +
  28. this.props.form.getFieldValue('internalDesignCost') + this.props.form.getFieldValue('internalEquipmentCost') +
  29. this.props.form.getFieldValue('internalOtherCost');
  30. this.state.allCost = this.props.form.getFieldValue('internalLaborCost') + this.props.form.getFieldValue('internalDirectCost') +
  31. this.props.form.getFieldValue('internalDepreciationCost') + this.props.form.getFieldValue('internalAmortizationCost') +
  32. this.props.form.getFieldValue('internalDesignCost') + this.props.form.getFieldValue('internalEquipmentCost') +
  33. this.props.form.getFieldValue('internalOtherCost') + this.props.form.getFieldValue('externalTotalCost');
  34. },
  35. componentWillReceiveProps(nextProps) {
  36. if (!this.props.visible && nextProps.visible) {
  37. this.state.internalAllCost = nextProps.data.internalAllCost;
  38. this.state.allCost = nextProps.data.allCost;
  39. nextProps.form.resetFields();
  40. } else {
  41. this.allCostCount();
  42. };
  43. },
  44. handleSubmit(e) {
  45. e.preventDefault();
  46. this.props.form.validateFields((err, values) => {
  47. if (!err) {
  48. this.props.spinState(true);
  49. $.ajax({
  50. method: "POST",
  51. dataType: "json",
  52. crossDomain: false,
  53. url: globalConfig.context + "/api/admin/activityCost",
  54. data: {
  55. id: this.props.data.id,
  56. aid: this.state.aid,
  57. uid: this.props.uid,
  58. activityNumber: this.state.activityNumber,
  59. internalLaborCost: values.internalLaborCost,
  60. internalDirectCost: values.internalDirectCost,
  61. internalDepreciationCost: values.internalDepreciationCost,
  62. internalAmortizationCost: values.internalAmortizationCost,
  63. internalDesignCost: values.internalDesignCost,
  64. internalEquipmentCost: values.internalEquipmentCost,
  65. internalOtherCost: values.internalOtherCost,
  66. externalTotalCost: values.externalTotalCost,
  67. externalAbroadCost: values.externalAbroadCost,
  68. enterpriseFiller: values.enterpriseFiller,
  69. signDateFormattedDate: values.signDate.format('YYYY-MM-DD'),
  70. sortNumber: values.sortNumber,
  71. accountUrl: this.state.accountUrl
  72. }
  73. }).done(function (data) {
  74. if (!data.error.length) {
  75. message.success('保存成功!');
  76. } else {
  77. message.warning(data.error[0].message);
  78. }
  79. }.bind(this)).always(function () {
  80. this.props.spinState(false);
  81. this.props.clickOk();
  82. this.props.form.resetFields();
  83. }.bind(this));
  84. }
  85. });
  86. },
  87. render() {
  88. const FormItem = Form.Item;
  89. const { getFieldDecorator } = this.props.form;
  90. const theData = this.props.data;
  91. const formItemLayout = {
  92. labelCol: { span: 14 },
  93. wrapperCol: { span: 8 },
  94. };
  95. const _me = this;
  96. return (
  97. <Form onSubmit={this.handleSubmit} className="activityCost-form">
  98. <p className="activityCost-title">项目编号</p>
  99. {
  100. theData.activityNumber ? <span>{theData.activityNumber}</span> :
  101. <Select
  102. notFoundContent="无项目可选"
  103. placeholder="请选择项目编号"
  104. style={{ width: 200 }}
  105. onSelect={(e, n) => { this.state.aid = e; this.state.activityNumber = n.props.children }}>
  106. {this.state.activityNumberOption}
  107. </Select>
  108. }
  109. <p className="activityCost-title">内部研究开发费用(万元)</p>
  110. <div className="clearfix activityCost-box">
  111. <FormItem className="half-item"
  112. {...formItemLayout}
  113. label="共计(万元)"
  114. >
  115. <span className="number-box">
  116. {this.state.internalAllCost}
  117. </span>
  118. </FormItem>
  119. <FormItem className="half-item"
  120. {...formItemLayout}
  121. label="人员人工费用(万元)"
  122. >
  123. {getFieldDecorator('internalLaborCost', {
  124. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  125. initialValue: theData.internalLaborCost || 0
  126. })(
  127. <InputNumber />
  128. )}
  129. </FormItem>
  130. <FormItem className="half-item"
  131. {...formItemLayout}
  132. label="直接投入费用(万元)"
  133. >
  134. {getFieldDecorator('internalDirectCost', {
  135. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  136. initialValue: theData.internalDirectCost || 0
  137. })(
  138. <InputNumber />
  139. )}
  140. </FormItem>
  141. <FormItem className="half-item"
  142. {...formItemLayout}
  143. label="折旧费用与长期待摊费用(万元)"
  144. >
  145. {getFieldDecorator('internalDepreciationCost', {
  146. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  147. initialValue: theData.internalDepreciationCost || 0
  148. })(
  149. <InputNumber />
  150. )}
  151. </FormItem>
  152. <FormItem className="half-item"
  153. {...formItemLayout}
  154. label="无形资产摊销费用(万元)"
  155. >
  156. {getFieldDecorator('internalAmortizationCost', {
  157. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  158. initialValue: theData.internalAmortizationCost || 0
  159. })(
  160. <InputNumber />
  161. )}
  162. </FormItem>
  163. <FormItem className="half-item"
  164. {...formItemLayout}
  165. label="设计费用(万元)"
  166. >
  167. {getFieldDecorator('internalDesignCost', {
  168. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  169. initialValue: theData.internalDesignCost || 0
  170. })(
  171. <InputNumber />
  172. )}
  173. </FormItem>
  174. <FormItem className="half-item"
  175. {...formItemLayout}
  176. label="装备调试费用与实验费用(万元)"
  177. >
  178. {getFieldDecorator('internalEquipmentCost', {
  179. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  180. initialValue: theData.internalEquipmentCost || 0
  181. })(
  182. <InputNumber />
  183. )}
  184. </FormItem>
  185. <FormItem className="half-item"
  186. {...formItemLayout}
  187. label="其他费用(万元)"
  188. >
  189. {getFieldDecorator('internalOtherCost', {
  190. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  191. initialValue: theData.internalOtherCost || 0
  192. })(
  193. <InputNumber />
  194. )}
  195. </FormItem>
  196. </div>
  197. <p className="activityCost-title">委托外部研究开发费用(万元)</p>
  198. <div className="clearfix activityCost-box">
  199. <FormItem className="half-item"
  200. {...formItemLayout}
  201. label="共计(万元)"
  202. >
  203. {getFieldDecorator('externalTotalCost', {
  204. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  205. initialValue: theData.externalTotalCost || 0
  206. })(
  207. <InputNumber />
  208. )}
  209. </FormItem>
  210. <FormItem className="half-item"
  211. {...formItemLayout}
  212. label="境内的外部研发费用"
  213. >
  214. {getFieldDecorator('externalAbroadCost', {
  215. rules: [{ type: "number", required: true, message: '此项为必填项!' }],
  216. initialValue: theData.externalAbroadCost || 0
  217. })(
  218. <InputNumber />
  219. )}
  220. </FormItem>
  221. </div>
  222. <p className="activityCost-title">研发开发费用(内、外部)小计(万元)</p>
  223. <div className="clearfix activityCost-box">
  224. <FormItem className="half-item"
  225. {...formItemLayout}
  226. label="共计(万元)"
  227. >
  228. {getFieldDecorator('allCost')(
  229. <span className="number-box">
  230. {this.state.allCost}
  231. </span>
  232. )}
  233. </FormItem>
  234. <FormItem className="half-item"
  235. {...formItemLayout}
  236. label="企业填报人"
  237. >
  238. {getFieldDecorator('enterpriseFiller', {
  239. rules: [{ required: true, message: '此项为必填项!' }],
  240. initialValue: theData.enterpriseFiller
  241. })(
  242. <Input />
  243. )}
  244. </FormItem>
  245. <FormItem className="half-item"
  246. {...formItemLayout}
  247. label="企业填报人签字日期"
  248. >
  249. {getFieldDecorator('signDate', {
  250. rules: [{ type: "object", required: true, message: '此项为必填项!' }],
  251. initialValue: theData.signDate ? moment(theData.signDate) : null
  252. })(
  253. <DatePicker onChange={(date, dateString) => { this.state.signDateFormattedDate = dateString }} />
  254. )}
  255. </FormItem>
  256. <FormItem className="half-item"
  257. {...formItemLayout}
  258. label="排序号"
  259. >
  260. {getFieldDecorator('sortNumber', {
  261. rules: [{ required: true, message: '此项为必填项!' }],
  262. initialValue: theData.sortNumber
  263. })(
  264. <Input />
  265. )}
  266. </FormItem>
  267. </div>
  268. <div style={{ width: '50%', marginTop: '20px' }}>
  269. <Upload
  270. name="ratepay"
  271. action={globalConfig.context + "/api/admin/uploadActivityCost"}
  272. data={{ 'sign': 'activity_cost_account','uid': this.props.uid }}
  273. beforeUpload={beforeUploadFile}
  274. showUploadList={false}
  275. onChange={(info) => {
  276. if (info.file.status !== 'uploading') {
  277. console.log(info.file, info.fileList);
  278. }
  279. if (info.file.status === 'done') {
  280. if (!info.file.response.error.length) {
  281. message.success(`${info.file.name} 文件上传成功!`);
  282. } else {
  283. message.warning(info.file.response.error[0].message);
  284. return;
  285. };
  286. this.state.accountUrl = info.file.response.data;
  287. } else if (info.file.status === 'error') {
  288. message.error(`${info.file.name} 文件上传失败。`);
  289. }
  290. }}
  291. >
  292. <Button><Icon type="upload" /> 上传研发费用台账 </Button>
  293. </Upload>
  294. <p style={{ marginTop: '20px' }}>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  295. </div>
  296. <FormItem style={{ marginTop: '20px' }}>
  297. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  298. <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
  299. </FormItem>
  300. </Form >
  301. );
  302. },
  303. }));
  304. const ActivityDesc = React.createClass({
  305. getInitialState() {
  306. return {
  307. visible: false,
  308. loading: false
  309. };
  310. },
  311. componentWillReceiveProps(nextProps) {
  312. this.state.visible = nextProps.showDesc
  313. },
  314. showModal() {
  315. this.setState({
  316. visible: true,
  317. });
  318. },
  319. handleOk() {
  320. this.setState({
  321. visible: false,
  322. });
  323. this.props.closeDesc(false, true);
  324. },
  325. handleCancel(e) {
  326. this.setState({
  327. visible: false,
  328. });
  329. this.props.closeDesc(false);
  330. },
  331. spinChange(e) {
  332. this.setState({
  333. loading: e
  334. });
  335. },
  336. render() {
  337. return (
  338. <div className="patent-addNew">
  339. <Spin spinning={this.state.loading} className='spin-box'>
  340. <Modal title="企业研究开发费用结构明细" visible={this.state.visible}
  341. onOk={this.handleOk} onCancel={this.handleCancel}
  342. width='800px'
  343. footer=''
  344. >
  345. <ActivityDescFrom
  346. uid={this.props.uid}
  347. visible={this.state.visible}
  348. data={this.props.data}
  349. activityNumberList={this.props.activityNumberList}
  350. spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
  351. </Modal>
  352. </Spin>
  353. </div>
  354. );
  355. },
  356. });
  357. const Activity = React.createClass({
  358. loadData(pageNo) {
  359. this.state.data = [];
  360. this.setState({
  361. loading: true
  362. });
  363. $.when($.ajax({
  364. method: "post",
  365. dataType: "json",
  366. crossDomain: false,
  367. url: globalConfig.context + "/api/admin/activityCostList",
  368. data: {
  369. pageNo: pageNo || 1,
  370. pageSize: this.state.pagination.pageSize,
  371. uid: this.props.data.uid,
  372. activityNumber: this.state.activityNumber,
  373. startDate: this.state.startDateFormattedDate,
  374. endDate: this.state.endDateFormattedDate
  375. }
  376. }), $.ajax({
  377. method: "post",
  378. dataType: "json",
  379. crossDomain: false,
  380. url: globalConfig.context + "/api/admin/activityNumber",
  381. data: {
  382. uid: this.props.data.uid
  383. }
  384. })).done((data1, data2) => {
  385. let data = data1[0];
  386. let activityNumber = data2[0];
  387. if (data.error.length || !data.data || !data.data.list) {
  388. message.warning(data.error[0].message);
  389. return;
  390. };
  391. if (activityNumber.error.length || !activityNumber.data) {
  392. message.warning(activityNumber.error[0].message);
  393. return;
  394. };
  395. for (let i = 0; i < data.data.list.length; i++) {
  396. let thisdata = data.data.list[i];
  397. this.state.data.push({
  398. key: i,
  399. id: thisdata.id,
  400. uid: thisdata.uid,
  401. aid: thisdata.aid,
  402. activityNumber: thisdata.activityNumber,
  403. startDate: thisdata.startDate,
  404. endDate: thisdata.endDate,
  405. internalAllCost:
  406. thisdata.internalLaborCost + thisdata.internalDirectCost + thisdata.internalDepreciationCost +
  407. thisdata.internalAmortizationCost + thisdata.internalAmortizationCost + thisdata.internalDesignCost +
  408. thisdata.internalEquipmentCost + thisdata.internalOtherCost,
  409. internalLaborCost: thisdata.internalLaborCost,
  410. internalDirectCost: thisdata.internalDirectCost,
  411. internalDepreciationCost: thisdata.internalDepreciationCost,
  412. internalAmortizationCost: thisdata.internalAmortizationCost,
  413. internalDesignCost: thisdata.internalDesignCost,
  414. internalEquipmentCost: thisdata.internalEquipmentCost,
  415. internalOtherCost: thisdata.internalOtherCost,
  416. externalTotalCost: thisdata.externalTotalCost,
  417. externalAbroadCost: thisdata.externalAbroadCost,
  418. allCost:
  419. thisdata.internalLaborCost + thisdata.internalDirectCost + thisdata.internalDepreciationCost +
  420. thisdata.internalAmortizationCost + thisdata.internalAmortizationCost + thisdata.internalDesignCost +
  421. thisdata.internalEquipmentCost + thisdata.internalOtherCost + thisdata.externalTotalCost,
  422. enterpriseFiller: thisdata.enterpriseFiller,
  423. signDate: thisdata.signDate,
  424. signDateFormattedDate: thisdata.signDateFormattedDate,
  425. sortNumber: thisdata.sortNumber,
  426. startDateFormattedDate: thisdata.startDateFormattedDate,
  427. endDateFormattedDate: thisdata.endDateFormattedDate,
  428. accountDownloadFileName: thisdata.accountDownloadFileName,
  429. accountUrl: thisdata.accountUrl
  430. });
  431. };
  432. this.state.activityNumberList = activityNumber.data;
  433. this.state.pagination.current = data.data.pageNo;
  434. this.state.pagination.total = data.data.totalCount;
  435. this.setState({
  436. dataSource: this.state.data,
  437. pagination: this.state.pagination
  438. });
  439. }).always(function () {
  440. this.setState({
  441. loading: false
  442. });
  443. }.bind(this));
  444. },
  445. getInitialState() {
  446. return {
  447. selectedRowKeys: [],
  448. selectedRows: [],
  449. loading: false,
  450. pagination: {
  451. defaultCurrent: 1,
  452. defaultPageSize: 10,
  453. showQuickJumper: true,
  454. pageSize: 10,
  455. onChange: function (page) {
  456. this.loadData(page);
  457. }.bind(this),
  458. showTotal: function (total) {
  459. return '共' + total + '条数据';
  460. }
  461. },
  462. columns: [
  463. {
  464. title: '研发活动编号',
  465. dataIndex: 'activityNumber',
  466. key: 'activityNumber'
  467. }, {
  468. title: '内部研究开发费用',
  469. dataIndex: 'internalAllCost',
  470. key: 'internalAllCost'
  471. }, {
  472. title: '人员人工费用',
  473. dataIndex: 'internalLaborCost',
  474. key: 'internalLaborCost'
  475. }, {
  476. title: '直接投入费用',
  477. dataIndex: 'internalDirectCost',
  478. key: 'internalDirectCost'
  479. }, {
  480. title: '折旧费用与长期待摊费用',
  481. dataIndex: 'internalDepreciationCost',
  482. key: 'internalDepreciationCost'
  483. }, {
  484. title: '设计费用',
  485. dataIndex: 'internalDesignCost',
  486. key: 'internalDesignCost'
  487. }, {
  488. title: '装备调试费用与试验费用',
  489. dataIndex: 'internalEquipmentCost',
  490. key: 'internalEquipmentCost'
  491. }, {
  492. title: '无形资产摊销费用',
  493. dataIndex: 'internalAmortizationCost',
  494. key: 'internalAmortizationCost'
  495. }, {
  496. title: '其他费用',
  497. dataIndex: 'internalOtherCost',
  498. key: 'internalOtherCost'
  499. }, {
  500. title: '委托外部研究开发费用',
  501. dataIndex: 'externalTotalCost',
  502. key: 'externalTotalCost'
  503. }, {
  504. title: '境内外部研发费用',
  505. dataIndex: 'externalAbroadCost',
  506. key: 'externalAbroadCost'
  507. }, {
  508. title: '研发费用合计',
  509. dataIndex: 'allCost',
  510. key: 'allCost'
  511. }, {
  512. title: '企业填报人',
  513. dataIndex: 'enterpriseFiller',
  514. key: 'enterpriseFiller'
  515. }, {
  516. title: '企业填报人签字日期',
  517. dataIndex: 'signDateFormattedDate',
  518. key: 'signDateFormattedDate'
  519. }, {
  520. title: '排序号',
  521. dataIndex: 'sortNumber',
  522. key: 'sortNumber'
  523. }
  524. ],
  525. dataSource: []
  526. };
  527. },
  528. componentWillMount() {
  529. this.loadData();
  530. },
  531. tableRowClick(record, index) {
  532. this.state.RowData = record;
  533. this.setState({
  534. showDesc: true
  535. });
  536. },
  537. delectRow() {
  538. let deletedIds = [];
  539. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  540. let rowItem = this.state.selectedRows[idx];
  541. if (rowItem.id) {
  542. deletedIds.push(rowItem.id)
  543. }
  544. }
  545. this.setState({
  546. selectedRowKeys: [],
  547. loading: deletedIds.length > 0
  548. });
  549. $.ajax({
  550. method: "post",
  551. dataType: "json",
  552. crossDomain: false,
  553. url: globalConfig.context + "/api/admin/deleteActivityCost",
  554. data: {
  555. ids: deletedIds
  556. }
  557. }).done(function (data) {
  558. if (!data.error.length) {
  559. message.success('保存成功!');
  560. this.setState({
  561. loading: false,
  562. });
  563. } else {
  564. message.warning(data.error[0].message);
  565. };
  566. this.loadData();
  567. }.bind(this));
  568. },
  569. closeDesc(e, s) {
  570. this.state.showDesc = e;
  571. if (s) {
  572. this.loadData();
  573. };
  574. },
  575. search() {
  576. this.loadData();
  577. },
  578. reset() {
  579. this.state.startDateFormattedDate = undefined;
  580. this.state.endDateFormattedDate = undefined;
  581. this.state.activityNumber = undefined;
  582. this.loadData();
  583. },
  584. render() {
  585. const rowSelection = {
  586. selectedRowKeys: this.state.selectedRowKeys,
  587. onChange: (selectedRowKeys, selectedRows) => {
  588. this.setState({
  589. selectedRows: selectedRows,
  590. selectedRowKeys: selectedRowKeys
  591. });
  592. }
  593. };
  594. const hasSelected = this.state.selectedRowKeys.length > 0;
  595. return (
  596. <div className="user-content" >
  597. <div className="content-title">
  598. <span>企业研究开发费用结构明细</span>
  599. </div>
  600. <div className="user-search">
  601. <Input placeholder="研发活动编号" value={this.state.activityNumber}
  602. onChange={(e) => { this.setState({ activityNumber: e.target.value }); }} />
  603. <span>开始日期:</span>
  604. <DatePicker
  605. value={this.state.startDateFormattedDate ? moment(this.state.startDateFormattedDate) : null}
  606. onChange={(data, dataString) => { this.setState({ startDateFormattedDate: dataString }); }} />
  607. <span>结束日期:</span>
  608. <DatePicker
  609. value={this.state.endDateFormattedDate ? moment(this.state.endDateFormattedDate) : null}
  610. onChange={(data, dataString) => { this.setState({ endDateFormattedDate: dataString }); }} />
  611. <Button type="primary" onClick={this.search}>搜索</Button>
  612. <Button onClick={this.reset}>重置</Button>
  613. <p>
  614. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  615. onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
  616. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  617. disabled={!hasSelected}
  618. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  619. </p>
  620. </div>
  621. <div className="patent-table">
  622. <Spin spinning={this.state.loading}>
  623. <Table columns={this.state.columns}
  624. dataSource={this.state.dataSource}
  625. pagination={this.state.pagination}
  626. rowSelection={rowSelection}
  627. onRowClick={this.tableRowClick} />
  628. </Spin>
  629. </div>
  630. <ActivityDesc
  631. uid={this.props.data.uid}
  632. data={this.state.RowData}
  633. activityNumberList={this.state.activityNumberList}
  634. showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
  635. </div >
  636. );
  637. }
  638. });
  639. export default Activity;