operationTips.jsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import React,{Component} from "react";
  2. import {Input, Modal} from "antd";
  3. class OperationTips extends Component{
  4. constructor(props) {
  5. super(props);
  6. this.state={
  7. reasonsTransfer:''
  8. }
  9. }
  10. render() {
  11. return (
  12. <Modal
  13. title={this.props.title}
  14. visible={this.props.visible}
  15. onOk={()=>{
  16. this.props.onOk(this.state.reasonsTransfer);
  17. }}
  18. onCancel={()=>{
  19. this.props.onCancel();
  20. }}
  21. >
  22. <span style={{ color: "red" }}>
  23. 确定要操作以下客户吗?
  24. {
  25. this.props.selectedRows.map((value,index)=>(
  26. <div key={index} style={{marginTop:'5px',color: "#000"}}>
  27. {value.userName}
  28. </div>
  29. ))
  30. }
  31. <div style={{marginTop:20}}>
  32. <span style={{marginRight:10,color:'#000'}}>操作原因:</span>
  33. <Input
  34. placeholder="请输入操作原因"
  35. value={this.state.reasonsTransfer}
  36. style={{ width: 150 }}
  37. onChange={(e) => {
  38. this.setState({reasonsTransfer : e.target.value });
  39. }}
  40. />
  41. </div>
  42. </span>
  43. </Modal>
  44. );
  45. }
  46. }
  47. export default OperationTips;