orderDesc.jsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import React from 'react';
  2. import { Modal } from 'antd';
  3. import OrderDetaiel from './orderDetail';
  4. class DemandDesc extends React.Component {
  5. constructor(props) {
  6. super(props);
  7. this.state = {
  8. loading: false,
  9. showState: false
  10. };
  11. }
  12. handleCancel() {
  13. this.setState({
  14. visible: false,
  15. });
  16. this.props.closeDesc(false, false);
  17. }
  18. handOk() {
  19. this.setState({
  20. visible: false,
  21. });
  22. this.props.closeDesc(false, true);
  23. }
  24. componentWillReceiveProps(nextProps) {
  25. this.state.visible = nextProps.showDesc;
  26. }
  27. render() {
  28. return (
  29. <div className="patent-desc">
  30. {
  31. this.state.visible &&
  32. <Modal
  33. maskClosable={false}
  34. visible={this.state.visible}
  35. onOk={this.handOk.bind(this)}
  36. onCancel={this.handleCancel.bind(this)}
  37. width="1200px"
  38. title='订单详情'
  39. footer=""
  40. className="admin-desc-content"
  41. >
  42. <div>
  43. <div>
  44. {
  45. this.state.visible &&
  46. <OrderDetaiel
  47. closeDesc={this.handleCancel.bind(this)}
  48. data={this.props.data}
  49. visible={this.state.visible}
  50. handOk={this.handOk.bind(this)}
  51. />
  52. }
  53. </div>
  54. </div>
  55. </Modal>
  56. }
  57. </div>
  58. );
  59. }
  60. }
  61. export default DemandDesc;