index.jsx 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. import React,{ Component } from 'react';
  2. import {Select} from "antd";
  3. import { provinceList} from '@/NewDicProvinceList';
  4. import './index.less';
  5. import TabelContent from '../../../../common/tabelContent'
  6. import DetailedList from './detailedList';
  7. class InterviewStatistics extends Component{
  8. constructor(props) {
  9. super(props);
  10. this.state={
  11. columns: [
  12. {
  13. title: "序号",
  14. dataIndex: "key",
  15. key: "key",
  16. },
  17. {
  18. title: "面谈部门",
  19. dataIndex: "province",
  20. key: "province",
  21. },
  22. {
  23. title: "老客户面谈数",
  24. dataIndex: "counts",
  25. key: "counts",
  26. },
  27. {
  28. title: "老客户签单数/金额",
  29. dataIndex: "counts",
  30. key: "counts",
  31. },
  32. {
  33. title: "老客户面谈率",
  34. dataIndex: "counts",
  35. key: "counts",
  36. },
  37. {
  38. title: "新客户面谈数",
  39. dataIndex: "counts",
  40. key: "counts",
  41. },
  42. {
  43. title: "新客户签单数/金额",
  44. dataIndex: "counts",
  45. key: "counts",
  46. },
  47. {
  48. title: "新客户面谈率",
  49. dataIndex: "counts",
  50. key: "counts",
  51. },
  52. {
  53. title: "总面数",
  54. dataIndex: "counts",
  55. key: "counts",
  56. },
  57. {
  58. title: "总签单数/金额",
  59. dataIndex: "counts",
  60. key: "counts",
  61. },
  62. {
  63. title: "总面谈率",
  64. dataIndex: "counts",
  65. key: "counts",
  66. },
  67. ],
  68. }
  69. }
  70. searchList(){
  71. let arr = [
  72. {
  73. type:'departmentSelect',
  74. dataKey:'depId',
  75. placeholder:'请选择部门'
  76. },
  77. {
  78. type:'select',
  79. dataKey:'province',
  80. placeholder:'请选择省份',
  81. selectOptionList:()=>{
  82. let Province = [];
  83. provinceList.map(function(item) {
  84. let id = String(item.id)
  85. Province.push(
  86. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  87. )
  88. });
  89. return Province
  90. },
  91. },
  92. //0 总数量 1总金额 2总面谈
  93. {
  94. type:'select',
  95. dataKey:'sort',
  96. placeholder:'请选择排序',
  97. selectList:[
  98. {
  99. value:'0',
  100. label:'按总数量排序'
  101. },
  102. {
  103. value:'1',
  104. label:'按总金额排序'
  105. },
  106. {
  107. value:'2',
  108. label:'按总面谈排序'
  109. },
  110. ]
  111. },
  112. {
  113. type:'times',
  114. title:'公出时间',
  115. dataKey:'date',
  116. format: 'YYYY/MM'
  117. },
  118. ]
  119. return arr;
  120. }
  121. render() {
  122. return (
  123. <div className="user-content interviewStatistics">
  124. <div className="content-title">
  125. <span>
  126. 公出面谈表<span style={{fontSize:'10px',color:'#0f2be5',marginLeft:'10px'}}>注:通过公出打卡,同一家公司,多次面谈数只计算1次</span>
  127. </span>
  128. </div>
  129. <TabelContent
  130. searchList={this.searchList()}
  131. columns={this.state.columns}
  132. tabelApi={'/api/admin/followStatisticsList'}
  133. exportApi={'/api/admin/followStatisticsListExport'}
  134. onRowClick={(row)=>{
  135. this.setState({
  136. visible: true,
  137. recordInfor: row,
  138. })
  139. }}
  140. exportExecProcessing={(data)=>{
  141. if(data.province){
  142. let arr = provinceList.filter(v=>String(v.id) === String(data.province))
  143. data.provinceName = arr[0].name
  144. }
  145. return data;
  146. }}
  147. dataProcessing={(data)=>{
  148. let theArr = [];
  149. for (let i = 0; i < data.data.length; i++) {
  150. let thisdata = data.data[i];
  151. thisdata.key=i + 1;
  152. theArr.push(thisdata);
  153. }
  154. return theArr;
  155. }}
  156. />
  157. {this.state.visible ? <DetailedList
  158. visible={this.state.visible}
  159. recordInfor={this.state.recordInfor}
  160. onCancel={()=>{
  161. this.setState({
  162. visible:false,
  163. recordInfor:{}
  164. })
  165. }}/> : null}
  166. </div>
  167. )
  168. }
  169. }
  170. export default InterviewStatistics;