orderDesc.jsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. {this.state.visible ? <Modal
  31. maskClosable={false}
  32. visible={this.state.visible}
  33. onOk={this.handOk.bind(this)}
  34. onCancel={this.handleCancel.bind(this)}
  35. width="800px"
  36. title='订单详情'
  37. footer=""
  38. className="admin-desc-content"
  39. >
  40. <div>
  41. <div>
  42. <OrderDetaiel
  43. closeDesc={this.handleCancel.bind(this)}
  44. data={this.props.data}
  45. visible={this.state.visible}
  46. handOk={this.handOk.bind(this)}
  47. />
  48. </div>
  49. </div>
  50. </Modal> : <div/>}
  51. </div>
  52. );
  53. }
  54. }
  55. export default DemandDesc;