import React,{Component} from "react";
import {Input, Modal} from "antd";

class OperationTips extends Component{
    constructor(props) {
        super(props);
        this.state={
            reasonsTransfer:''
        }
    }

    render() {
        return (
            <Modal
                title={this.props.title}
                visible={this.props.visible}
                onOk={()=>{
                    this.props.onOk(this.state.reasonsTransfer);
                }}
                onCancel={()=>{
                    this.props.onCancel();
                }}
            >
                    <span style={{ color: "red" }}>
                        确定要操作以下客户吗？
                        {
                            this.props.selectedRows.map((value,index)=>(
                                <div key={index} style={{marginTop:'5px',color: "#000"}}>
                                    {value.userName}
                                </div>
                            ))
                        }
                        <div style={{marginTop:20}}>
                            <span style={{marginRight:10,color:'#000'}}>操作原因:</span>
                            <Input
                                placeholder="请输入操作原因"
                                value={this.state.reasonsTransfer}
                                style={{ width: 150 }}
                                onChange={(e) => {
                                    this.setState({reasonsTransfer : e.target.value });
                                }}
                            />
                        </div>
                    </span>
            </Modal>
        );
    }
}

export default OperationTips;
