import React from 'react';
import Button from '../../components/CommonComponent/ButtonComponent/ButtonComponent'
import HeaderComponent from '../../components/CommonComponent/HeaderComponent/HeaderComponent'
import LeftContainer from '../LeftContainer/LeftContainer';
import RightContainer from '../RightContainer/RightContainer';
import PropTypes from "prop-types";
require('./index.css');

export default class QuestionContainer extends React.Component{
    constructor(props){
        super(props);
        this.state = {
        };
    }

    componentWillMount(){

    }

    componentWillReceiveProps(nextProps){

    }


    handleNoQuestion(){
        let {menuType = '',changePages,willCloseDoor} = this.props;
        if(menuType){
            this.context.goBackTask()
        }else{
            // willCloseDoor();
            changePages(CONFIG.showPage[131])
        }
    }


    render(){
        let props = this.props;
        let {headerInfo,menuType="",changePages} = props;
        return(

            <div style={{width:'100%',height:'100%'}}>
                <HeaderComponent
                    showHeader={CONFIG.headerStatus[1]}
                    headerInfo={headerInfo}
                    showLogoutPopup={this.showLogoutPopup}
                />

                <LeftContainer leftInfo={props.headerInfo} menuType={menuType}/>
                <RightContainer>
                    <div className={"chooseTaskContainer"}>
                        <div className={"replenishHomePage"}>
                            <div className={"text font40 col333"} style={{'marginBottom':UTILPATH.getRemByPx(40)}}>请问您是否有问题需要反馈</div>
                        </div>
                        <div className={"chooseTaskButtons"}>
                            <Button text={"散落货品上报"} option={()=>changePages(CONFIG.showPage[51])} btnContainer={"bordere5e5e5 font32"} style={{'marginTop':UTILPATH.getRemByPx(40)}}/>
                            <Button text={"请求店铺保洁"} btnContainer={"bordere5e5e5 font32"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
                            <Button text={"其它问题反馈"} btnContainer={"bordere5e5e5 font32"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
                            <Button text={"没有问题"} option={()=>this.handleNoQuestion.bind(this)()} btnContainer={"bordere5e5e5 font32"} style={{'marginTop':UTILPATH.getRemByPx(20)}}/>
                        </div>
                    </div>
                </RightContainer>
            </div>
        )
    }
}

QuestionContainer.propTypes = {
};

QuestionContainer.defaultProps = {
}
QuestionContainer.contextTypes = {
    goBackTask: PropTypes.func
};