import React,{Component} from 'react'; import { AutoComplete, Button, Cascader, DatePicker, Form, Icon, Input, message, Modal, Select, Spin, Table, Tabs, Tag } from "antd"; import { citySelect, provinceList } from '@/NewDicProvinceList'; import {getSocialAttribute, beforeUploadFile, getLevel, ShowModal} from "@/tools.js"; import moment from "moment"; import $ from "jquery/src/ajax"; import IntentionDetail from "../../NEW/intentionCustomer/intentionDetail/intentionDetail"; const {TabPane} = Tabs; const { RangePicker } = DatePicker; class DepartmentStatistics extends Component{ constructor(props) { super(props); this.state={ releaseDate: [], superId:'', nameSearch: '', columns: [ { title: "部门", dataIndex: "name", key: "name", width: '40%', }, { title: "客户总数", dataIndex: "userCount", key: "userCount", render: (text, record) => { return (
{ e.stopPropagation(); }}> {text}
); }, }, { title: "成交客户总数", dataIndex: "completeCount", key: "completeCount", render: (text, record) => { return (
{ e.stopPropagation(); }}> {text}
); }, }, { title: "新增客户数", dataIndex: "inputCount", key: "inputCount", render: (text, record) => { return (
{ e.stopPropagation(); }}> {text}
); }, }, { title: "新增面谈数", dataIndex: "interviewCount", key: "interviewCount", render: (text, record) => { return (
{ e.stopPropagation(); }}> {text}
); }, }, { title: "新增领取客户数", dataIndex: "receiveCount", key: "receiveCount", render: (text, record) => { return (
{ if(record.aid){ e.stopPropagation(); } }}> {text}
); }, }, ], contactsOption:null, loading: false, ispage: 1, }; this.loadData = this.loadData.bind(this); this.reset = this.reset.bind(this); this.selectSuperId = this.selectSuperId.bind(this); } componentDidMount() { this.loadData(); this.selectSuperId(); } loadData(pageNo) { this.setState({ loading: true, }); let api = '/api/admin/customer/selectAllUser'; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + api, data: {}, success: function (data) { let theArr = []; if (data.error.length !== 0) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { data.data.children = data.data.list; theArr.push(data.data); theArr = this.handleTabsInfor(theArr.concat(data.data.aList)); console.log(theArr,'表格数据') this.setState({ ispage: data.data.pageNo, dataSource: theArr, }); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }; //表格数据处理 handleTabsInfor(infor){ for(let i=0;i{ this.loadData(); }); }; //获取上级组织 selectSuperId() { this.state.data = [] $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/organization/selectSuperId", data:{}, success: function (data) { let theArr = []; let theId=[];//用于保存上级组织的ID和名称 let thedata=data.data; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; for(var i=0;i{theData.name} ); theId.push( [theData.id,theData.name] ); }; this.setState({ SuperArr:thedata, contactsOption: theArr, theId: theId, orderStatusOptions:data.data, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); } render() { return(
指导意见
{ this.setState({ releaseDate: dataString }); }} />
{ this.setState({ nameSearch: e.target.value }); }} />
) } } export default DepartmentStatistics;