activityCostList.jsx 29 KB

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