zhuanjiaoDetail.jsx 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. import React from "react";
  2. import {Spin, Button, Tabs, Table, message, Modal, Tooltip} from "antd";
  3. import $ from "jquery/src/ajax";
  4. import {getTransferType} from '@/tools.js';
  5. const ZhuanjiaoDetail = React.createClass({
  6. getInitialState() {
  7. return {
  8. loading: false,
  9. colunmn: [
  10. {
  11. title: "序号",
  12. dataIndex: "id",
  13. key: "id",
  14. },
  15. {
  16. title: "客户姓名",
  17. dataIndex: "userName",
  18. key: "userName",
  19. },
  20. {
  21. title: "管理员",
  22. dataIndex: "usedAName",
  23. key: "usedAName",
  24. },
  25. {
  26. title: "现管理员",
  27. dataIndex: "newAName",
  28. key: "newAName",
  29. },
  30. // 0录入 1 领取 2 转交私有客户 3转交业务 4 未跟进丢失(30) 5未签单丢失(270天)6移除 7转交签单客户 8渠道录入 9渠道客户分配 10 渠道客户转交 11渠道释放 12 回收 13离职转交 14 离职签单业务转交
  31. {
  32. title: "转交类型",
  33. dataIndex: "type",
  34. key: "type",
  35. render: text => {
  36. return (
  37. <span>
  38. {getTransferType(text)}
  39. </span>
  40. )
  41. }
  42. },
  43. {
  44. title: "项目名称",
  45. dataIndex: "pName",
  46. key: "pName",
  47. },
  48. {
  49. title: "创建时间",
  50. dataIndex: "createDate",
  51. key: "createDate",
  52. },
  53. {
  54. title: "备注",
  55. dataIndex: "remarks",
  56. key: "remarks",
  57. render: (text) => {
  58. return (
  59. <Tooltip placement="topLeft" title={text}>
  60. <div style={{
  61. maxWidth:'150px',
  62. overflow:'hidden',
  63. textOverflow: "ellipsis",
  64. whiteSpace:'nowrap',
  65. }}>{text}</div>
  66. </Tooltip>)
  67. }
  68. },
  69. ]
  70. };
  71. },
  72. loadData() {
  73. this.setState({
  74. loading: true
  75. });
  76. $.ajax({
  77. method: "get",
  78. dataType: "json",
  79. crossDomain: false,
  80. url: globalConfig.context + "/api/admin/customer/transferList",
  81. data: {
  82. uid: this.props.id,
  83. },
  84. success: function (data) {
  85. if (data.error.length || data.data.list == "") {
  86. if (data.error && data.error.length) {
  87. message.warning(data.error[0].message);
  88. }
  89. } else {
  90. this.setState({
  91. dataSource: data.data,
  92. });
  93. }
  94. }.bind(this),
  95. }).always(
  96. function () {
  97. this.setState({
  98. loading: false,
  99. });
  100. }.bind(this)
  101. );
  102. },
  103. componentWillMount() {
  104. this.loadData()
  105. },
  106. render() {
  107. return (
  108. <Modal
  109. style={{ position: "relative" }}
  110. title="转交记录"
  111. visible={this.props.visible}
  112. onCancel={this.props.cancel}
  113. footer={null}
  114. width={800}
  115. destroyOnClose={true}
  116. >
  117. <Spin spinning={this.state.loading} >
  118. <Table
  119. columns={this.state.colunmn}
  120. dataSource={this.state.dataSource}
  121. pagination={false}
  122. scroll={{ x: "max-content", y: 0 }}
  123. bordered
  124. size="small"
  125. />
  126. </Spin>
  127. </Modal>
  128. );
  129. },
  130. });
  131. export default ZhuanjiaoDetail;