correctionDesc.jsx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import React from 'react';
  2. import { Icon, Modal, message, Spin, Button } from 'antd';
  3. import './comprehensive.less';
  4. import ajax from 'jquery/src/ajax/xhr.js';
  5. import $ from 'jquery/src/ajax';
  6. const CorrectionDesc = React.createClass({
  7. getInitialState() {
  8. return {
  9. visible: false,
  10. loading: false,
  11. };
  12. },
  13. showModal() {
  14. this.setState({
  15. visible: true,
  16. });
  17. },
  18. handleOk() {
  19. this.setState({
  20. loading: true
  21. });
  22. $.ajax({
  23. method: "post",
  24. dataType: "json",
  25. crossDomain: false,
  26. url: globalConfig.context + "/techservice/patent/noticeOfCorrectionList",
  27. data: {
  28. cid : this.props.data.cid
  29. },
  30. success: function (data) {
  31. if ( data.error.length ) {
  32. message.warning(data.error[0].message);
  33. return;
  34. } else {
  35. message.success('保存成功!');
  36. };
  37. }.bind(this),
  38. }).always(function () {
  39. this.setState({
  40. loading: false,
  41. visible: false,
  42. });
  43. }.bind(this));
  44. this.props.closeDesc(false);
  45. },
  46. handleCancel(e) {
  47. this.setState({
  48. visible: false,
  49. });
  50. this.props.closeDesc(false);
  51. },
  52. componentWillReceiveProps(nextProps) {
  53. this.state.visible = nextProps.showDesc
  54. },
  55. render() {
  56. if (this.props.data) {
  57. return (
  58. <div className="payment-desc">
  59. <Spin spinning={this.state.loading} className='spin-box'>
  60. <Modal title="通知答复确认" visible={this.state.visible}
  61. onOk={this.handleOk} onCancel={this.handleCancel}
  62. width='500px'
  63. footer={[
  64. <Button key="submit" type="primary" size="large" onClick={this.handleOk}>确认缴费</Button>,
  65. <Button key="back" type="ghost" size="large" onClick={this.handleCancel}>取消</Button>,
  66. ]}
  67. className="patent-desc-content">
  68. <div style={{ fontSize: '16px' }}>
  69. <p><span>公司:</span>{this.props.data.companyName}</p>
  70. <p><span>专利:</span>{this.props.data.patentName}</p>
  71. <p><span>专利号:</span><a href="">{this.props.data.patentNumber}</a></p>
  72. <p><span>审查意见/补正通知 确认已经答复?</span></p>
  73. </div>
  74. </Modal>
  75. </Spin>
  76. </div>
  77. );
  78. } else {
  79. return <div></div>
  80. }
  81. },
  82. });
  83. export default CorrectionDesc;