import React from 'react';
import {  Modal } from 'antd';
import ProductOrderQuery from "./ProductOrderQuery";

class ShowOrderQuery extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      visible: false,
      showData: {}
    };
  };
  componentDidMount() {
  
  }

  handleClick=()=>{
    this.handleShowModal();
  };

  handleShowModal = () => {
    this.setState({
      visible: true
    });
  };
  handleCloseModal = () => {
    this.setState({
      visible: false
    });
  };

  render() {
    return (
      <div style={{ display: "inline-block"}}>
        <span onClick={this.handleClick}>{this.props.children}</span>
        <Modal visible={this.state.visible} maskClosable={false} onCancel={this.handleCloseModal}  footer={false} width={"80%"}>
          <ProductOrderQuery SearchNo={this.props.SearchNo} formCode={this.props.formCode} />
        </Modal>
      </div>
    );
  }
}


export default ShowOrderQuery;
