import React from 'react';
import Button from '../../CommonComponent/ButtonComponent/ButtonComponent'
import PropTypes from "prop-types";
class DefaultComponent extends React.Component{
    constructor(props){
        super(props)
    }
    render(){
        return (
            <div className={'breakageContent'}>
            <p className={'currentTarget col333 font40'}  style={{width:'100%',textAlign:'center'}}><span>任务目标:</span>请仔细检查非货道区是否有遗留的商品</p>
            <Button 
                 text={'有,扫码上报'} 
                 btnContainer={'col333 font30 bordere5e5e5'}
                 style={{marginTop:UTILPATH.getRemByPx(150),marginLeft:'50%',transform:'translate(-50%)'}} 
                 option={this.skipInputCode.bind(this)}
            />
            {
                this.props.menuType===''?<Button 
                text={'没有'} 
                btnContainer={'col333 font30 bordere5e5e5'}
                style={{marginTop:UTILPATH.getRemByPx(30),marginLeft:'50%',transform:'translate(-50%)'}} 
                option={this.props.pullTaskList}
               />:<Button 
               text={'没有'} 
               btnContainer={'col333 font30 bordere5e5e5'}
               style={{marginTop:UTILPATH.getRemByPx(30),marginLeft:'50%',transform:'translate(-50%)'}} 
               option={this.context.goBackTask}
              />
            }
         </div>
        )
    }

    //控制显示扫码页面并且显示扫码页
    skipInputCode(){
        this.props.changeCodePage(false);
        this.props.changeSanCodePage('HandCode')
    }
}
DefaultComponent.contextTypes = {
    goBackTask: PropTypes.func
};
export default DefaultComponent;