import React from 'react'; import { Radio, Icon, Button, Cascader,Input, Select, Tabs,Spin,Popconfirm, Popover,Table, Switch, message, DatePicker, Modal, Upload,Form ,Row,Col,TimePicker} from 'antd'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import moment from 'moment'; import './myClient.less'; import { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList'; const { Column, ColumnGroup } = Table; const TabPane = Tabs.TabPane; import CustomerDetail from './myClientDesc.jsx'; import {socialAttribute,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js'; import {getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js'; const data = [{ id: '1', name: '长沙科技1', contacts: '午安行', contactMobile: '321312311', expert:'0', serviceCertification:'0', userCertification:'0', locationProvince:'湖南', area:'500', }, { id: '2', name: '上海科技', contacts: '老王', contactMobile: '231321311', expert:'1', serviceCertification:'1', userCertification:'0', locationProvince:'湖南-长沙', Province:'1', city:'38', area:'330', }, { id: '3', name: '广州科技', contacts: '老李', contactMobile: '1123213123', expert:'1', serviceCertification:'0', userCertification:'1', locationProvince:'湖南-长沙-雨花区', Province:'6', city:'24', area:'900', } ]; //图片组件 const PicturesWall = React.createClass({ getInitialState() { return { previewVisible: false, previewImage: '', fileList: [], } }, handleCancel() { this.setState({ previewVisible: false }) }, handlePreview(file) { this.setState({ previewImage: file.url || file.thumbUrl, previewVisible: true, }); }, handleChange(info) { let fileList = info.fileList; this.setState({ fileList }); this.props.fileList(fileList); }, componentWillReceiveProps(nextProps) { this.state.fileList = nextProps.pictureUrl; }, render() { const { previewVisible, previewImage, fileList } = this.state; const uploadButton = (
点击上传
); return (
{fileList.length >= 5 ? null : uploadButton} example
); } }); const MyClient = Form.create()(React.createClass({ loadData(pageNo, apiUrl) { this.state.data = []; this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url:globalConfig.context + '/api/admin/customer/listPrivateOrganizationCustomer', data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, type: this.state.typeSearch, //名称1 name:this.state.nameSearch, province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch, city: this.state.addressSearch?this.state.addressSearch[1]:'', //area: this.state.addressSearch?this.state.addressSearch[2].value:'', status:this.state.statusSearch, industry:this.state.industrySearch, serviceCertification:this.state.serviceCertificationSearch, userCertification: this.state.userCertificationSearch, currentMemberStatus:this.state.currentMemberStatusSearch, lvl:this.state.lvlSearch, listed:this.state.listedSearch, //是否上市 highTechZone:this.state.highTechZoneSearch, //是否高新 startDate: this.state.releaseDate[0], endDate: this.state.releaseDate[1], }, success: function (data) { let theArr = []; if (data.error.length || data.data.list=="") { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; theArr.push({ key: i, id: thisdata.uid, type:thisdata.type, name:thisdata.name, status:thisdata.status, contacts:thisdata.contacts, contactMobile:thisdata.contactMobile, industry:thisdata.industry, createTime:thisdata.createTime, serviceCertification:thisdata.serviceCertification, userCertification:thisdata.userCertification, lvl:thisdata.lvl, currentMemberStatus:thisdata.currentMemberStatus, international:thisdata.international, listed:thisdata.listed, highTechZone:thisdata.highTechZone, locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--' }); }; this.state.pagination.current = data.data.pageNo; this.state.pagination.total = data.data.totalCount; }; this.setState({ dataSource: theArr, pagination: this.state.pagination }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //点击出现函数 setModal2VisibleOk(e) { this.setState({ modal2Visible:true }); }, //点击消失函数 setModal2Visiblecancel(e) { this.setState({ modal2Visible:false }); }, getPictureUrl(e) { this.setState({pictureUrl: e }); }, handleOk(e){ this.setState({ visible: false, }); }, handleCancel(e){ this.setState({ visible: false, }); }, getInitialState() { return { orgCodeUrl:[], companyLogoUrl:[], visible: false , searchMore: true, releaseDate: [], releaseDate: [], selectedRowKeys: [], selectedRowKey: [], selectedRows: [], loading: false, pagination: { defaultCurrent: 1, defaultPageSize: 10, showQuickJumper: true, pageSize: 10, onChange: function (page) { this.loadData(page); }.bind(this), showTotal: function (total) { return '共' + total + '条数据'; } }, //业务意向列表 intentionList:[{ title: '高新', dataIndex: 'id', key:'id', render: (text, record, index) => { return let contacts=record.contacts||''; {contacts==''?:{text}} } },{ title: '最新进度', dataIndex: 'businessGlossoryId', key: 'businessGlossoryId', render: (text, record, index) => { return } },{ title: '最新状态', dataIndex: 'followSituation', key: 'followSituation', render: (text, record, index) => { return } },{ title: '跟进说明', dataIndex: 'remarks', key: 'remarks', render: (text, record, index) => { return { record.customerStatus = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'120px'}}/> } },{ title: '操作', dataIndex: 'rrr', key: 'rrr', render: (text, record, index) => { return
{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
} } ], businessIntentionList:[{ title: '意向时间', dataIndex: 'createTime', key: 'createTime' },{ title: '客户名称', dataIndex: 'identifyName', key: 'identifyName' },{ title: '业务名', dataIndex: 'businessName', key: 'businessName' } ,{ title: '营销员', dataIndex: 'adminName', key: 'adminName' },{ title: '业务意向进度', dataIndex: 'followSituation', key: 'followSituation' },{ title: '客户状态', dataIndex: 'customerStatus', key: 'customerStatus' },{ title: '操作', dataIndex: 'ooo', key: 'ooo', render:(text,record) =>{return ()} } ], businessFollowList:[{ title: '跟进时间', dataIndex: 'name', key: 'name' },{ title: '营销员', dataIndex: 'mobile2', key: 'mobile2' },{ title: '业务意向进度', dataIndex: 'mobile3', key: 'mobile3' } ,{ title: '客户状态', dataIndex: 'mobile4', key: 'mobile4' },{ title: '拜访方式', dataIndex: 'mobile5', key: 'mobile5' },{ title: '联系人', dataIndex: 'mobile6', key: 'mobile6' },{ title: '联系电话', dataIndex: 'mobile7', key: 'mobile7' },{ title: '操作', dataIndex: 'ooo', key: 'ooo', render:(text,record) =>{return ()} } ], visitsList:[{ title: '拜访时间', dataIndex: 'followTime', key: 'followTime' },{ title: '客户名称', dataIndex: 'identityName', key: 'identityName' },{ title: '拜访方式', dataIndex: 'contactType', key: 'contactType' } ,{ title: '联系人', dataIndex: 'contacts', key: 'contacts' },{ title: '联系电话', dataIndex: 'contactMobile', key: 'contactMobile' },{ title: '拜访人', dataIndex: 'adminName', key: 'adminName' },{ title: '拜访说明', dataIndex: 'result', key: 'result' },{ title: '操作', dataIndex: 'ttt', key: 'ttt', render: (text, record, index) => { return
{this.visitDelet(record)}} okText="删除" cancelText="不删除">
} } ], ContactsList:[{ title: '姓名', dataIndex: 'name', key: 'name', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '联系人部门', dataIndex: 'mobile1', key: 'mobile1', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '联系人职务', dataIndex: 'mobile2', key: 'mobile2', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '手机号码', dataIndex: 'mobile3', key: 'mobile3', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '固定电话', dataIndex: 'mobile4', key: 'mobile4', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '联系人QQ', dataIndex: 'mobile5', key: 'mobile5', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '电子邮箱', dataIndex: 'mobile6', key: 'mobile6', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '营销员', dataIndex: 'mobile7', key: 'mobile7', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '备注', dataIndex: 'mobile8', key: 'mobile8', render: (text, record, index) => { return { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/> } },{ title: '操作', dataIndex: 'dels', key: 'dels', render: (text, record, index) => { return
{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
} } ], columnsman:[{ title: '姓名', dataIndex: 'name', key: 'name' },{ title: '手机号码', dataIndex: 'mobile', key: 'mobile' } ], columns: [ { title: '客户名称', dataIndex: 'name', key: 'name', }, { title: '客户类型', dataIndex: 'type', key: 'type', render: text => { return getcustomerTyp(text) } }, { title: '地区', dataIndex: 'locationProvince', key: 'locationProvince', }, { title: '联系人', dataIndex: 'contacts', key: 'contacts', }, { title: '联系电话', dataIndex: 'contactMobile', key:'contactMobile', }, { title: '行业', dataIndex: 'industry', key: 'industry', //render: text => { return getcustomerStatue(text) } }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', }, { title: '业务认证', dataIndex: 'serviceCertification', key: 'serviceCertification', render: text => { return getCertification(text) } }, { title: '实名认证', dataIndex: 'userCertification', key: 'userCertification', render: text => { return getCertification(text) } }, { title: '是否高新', dataIndex: 'highTechZone', key: 'highTechZone', render: text => { return getWhether(text) } },{ title: '是否上市', dataIndex: 'listed', key: 'listed', render: text => { return getWhether(text) } }, { title: '是否国际', dataIndex: 'international', key: 'international', render: text => { return getWhether(text) } }, { title: '会员等级', dataIndex: 'lvl', key: 'lvl', render:text => {return getLvl(text)} }, { title: '会员状态', dataIndex: 'currentMemberStatus', key: 'currentMemberStatus', render:text => {return getCurrentMember(text)} }, { title: '操作', dataIndex: 'abc', key: 'abc', render: (text, record, index) => { return
} } ], data:[], dataman:[], dataSource: [], visitArrList:[], searchTime: [,] }; }, //更多操作 ModalOperation(){ this.setState({ visible: true, }); }, //进入新增拜访记录 visit(e){ this.state.keys=true; this.getNewWoman(e.id); this.setState({ visitModul:true, loading: true }); $.ajax({ method: "get", dataType: "json", url:globalConfig.context + '/api/admin/customer/toAddFollow', data: { uid: e.id, }, success: function (data) { let theArr = []; let thedata=data.data; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; this.setState({ uid:thedata.uid, data:thedata.list || [], identityName:thedata.identityName, followTime:thedata.followTime, businessGlossoryId:thedata.businessGlossoryId, followSituation:thedata.followSituation, customerStatus:thedata.customerStatus, remarks:thedata.remarks, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //拜访记录删除 visitDelet(e){ if(e){ $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/deleteCustomer", data: { id: e.followId,//删除的ID } }).done(function (data) { if (!data.error.length) { message.success('删除成功!'); this.setState({ loading: false, }); } else { message.warning(data.error[0].message); }; this.visitModify(e.followId); }.bind(this)); }else{ this.visitModify(this.state.delectId); } }, //进入修改拜访记录 visitModify(e){ this.getNewWoman(e); this.setState({ visitModul:true, loading: true }); $.ajax({ method: "get", dataType: "json", url:globalConfig.context + '/api/admin/customer/toUpdateFollow', data: { followId: e, }, success: function (data) { let theArr = []; let thedata=data.data; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; this.setState({ data:thedata.userBusinessList || [], followId:thedata.followId, identityName:thedata.identityName, uid:thedata.uid, contacts:thedata.contacts,//当前联系人 contactType:thedata.contactType, result:thedata.result, followTime:thedata.followTime, adminName:thedata.adminName, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //列表删除功能 delectRow() { let deletedIds; for (let idx = 0; idx < this.state.selectedRows.length; idx++) { let rowItem = this.state.selectedRows[idx]; if (rowItem.id) { deletedIds=rowItem.id; }; }; this.setState({ selectedRowKeys: [], }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/deleteCustomer", data: { id: deletedIds,//删除的ID } }).done(function (data) { if (!data.error.length) { message.success('删除成功!'); this.setState({ loading: false, }); } else { message.warning(data.error[0].message); }; this.loadData(); }.bind(this)); }, //指定转交人的点击函数 showModa(){ this.setState({ visible: true, }); this.setState({ selectedRowKey:[], }); this.setState({ selectedRowKeys:this.state.selectedRowKeys, }); let changeIds; let adminName; let customerStatus; let companyIntention; let followSituation; for (let idx = 0; idx < this.state.selectedRows.length; idx++) { let rowItem = this.state.selectedRows[idx]; if (rowItem.id) { changeIds=rowItem.id; adminName=rowItem.adminName; customerStatus=rowItem.customerStatus; companyIntention=rowItem.companyIntention; followSituation=rowItem.followSituation; }; }; $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/findAdmin", data: { id: changeIds,//这一行数据的ID beforeCompanyIntention:companyIntention,//意向服务 beforeCustomerStatus:customerStatus,//客户状态 beforeFollowSituation:followSituation,//最新跟进状态 beforeAdminName:adminName,//跟进人 } }).done(function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } else { let theAssigne = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { for (let i = 0; i < data.data.length; i++) { let thisdata = data.data[i]; //处理数据 进行循环 theAssigne.push({ name: thisdata.name, id: thisdata.id, ids: thisdata.cid, mobile:thisdata.mobile, adminName: thisdata.beforeAdminName, customerStatus: thisdata.beforeCustomerStatus, companyIntention: thisdata.beforeCompanyIntention, followSituation: thisdata.beforeFollowSituation, }); }; }; this.setState({ dataman: theAssigne, paginations:false }); } }.bind(this)); }, //选择了指定人之后的保存点击函数,需要修改函数 changeAssigner() { this.setState({ visible: false, }); this.setState({ selectedRowKeys:[], }); let datt=this.state.selectedRow; $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/transferCustomer", data: { id: datt[0].ids,//这一行数据的ID aid:datt[0].id,//指定转交人的ID beforeAdminName:datt[0].adminName,//之前的跟进人 adminName:datt[0].name,//转交的跟进人 } }).done(function (data) { if (!data.error.length) { message.success('转交成功!'); this.setState({ loading: false, }); } else { message.warning(data.error[0].message); }; this.loadData(); }.bind(this)); }, //转为公共客户 changeRow() { let deletedIds; let adminName; for (let idx = 0; idx < this.state.selectedRows.length; idx++) { let rowItem = this.state.selectedRows[idx]; if (rowItem.id) { deletedIds=rowItem.id; adminName=rowItem.adminName; }; }; this.setState({ selectedRowKeys: [], }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/transferToPublic", data: { id: deletedIds, beforeAdminName:adminName, } }).done(function (data) { if (!data.error.length) { message.success('已转为公共客户!'); this.setState({ loading: false, }); } else { message.warning(data.error[0].message); }; this.loadData(); }.bind(this)); }, getOrgCodeUrl(e) { this.setState({ orgCodeUrl: e }); }, getCompanyLogoUrl(e) { this.setState({ companyLogoUrl: e }); }, componentWillMount() { //城市 let Province = []; provinceList.map(function (item) { var id=item.id.toString() Province.push( {item.name} ) }); //意向服务 let intentionalArr = []; intentionalService.map(function (item) { intentionalArr.push( {item.key} ) }); //会员等级 let lvlArr = []; lvl.map(function (item) { lvlArr.push( {item.key} ) }); //会员状态customerStatus let currentMemberArr = []; currentMember.map(function (item) { currentMemberArr.push( {item.key} ) }); //客户状态 let customerStatusArr = []; customerStatus.map(function (item) { customerStatusArr.push( {item.key} ) }); this.state.Provinces = Province; this.state.intentionalOption = intentionalArr; this.state.lvlArrOption = lvlArr; this.state.currentMemberArrOption = currentMemberArr; this.state.customerStatusArrOption = customerStatusArr; this.loadData(); }, addClick() { this.state.RowData={}; this.setState({ showDesc: true, }); }, newmodal(e){ if(e){ this.tableRowClick(); } }, closeDesc(e, s) { this.state.showDesc = e; if (s) { this.loadData(); }; }, search() { this.loadData(); }, reset() { this.state.typeSearch=undefined; //名称1 this.state.nameSearch=''; this.state.addressSearch=[]; this.state.provinceSearch=undefined; this.state.citySearch=undefined; this.state.statusSearch=undefined; this.state.contactsSearch=undefined; this.state.contactMobileSearch=undefined; this.state.industrySearch=undefined; this.state.serviceCertificationSearch=undefined; this.state.userCertificationSearch=undefined; this.state.currentMemberStatusSearch=undefined; this.state.lvlSearch=undefined; this.state.listedSearch=undefined; this.state.highTechZoneSearch=undefined; this.state.releaseDate[0]=undefined; this.state.releaseDate[1]=undefined; this.loadData(); }, searchSwitch() { this.setState({ searchMore: !this.state.searchMore }); }, //详情保存函数 detailsSubmint(){ this.setState({ modal5Visible:false, }) }, //整行点击 tableRowClick(record, index) { this.state.RowData = record; console.log(record) this.detailsModalOk(record); this.setState({ selectedRowKeys:[], rowId:record.id, }) }, VisitRowClick(record, index) { this.state.keys=false; this.state.RowData = record; this.visitModify(record.id); this.setState({ selectedRowKeys:[], delectId:record.id, }) }, //基本信息提交 newSubmit(e){ e.preventDefault(); this.state.data=[]; this.setState({ selectedRowKeys: [], }); this.props.form.validateFields((err, values) => { let theorgCodeUrl = []; if (this.state.orgCodeUrl.length) { let picArr = []; this.state.orgCodeUrl.map(function (item) { picArr.push(item.response.data); }); theorgCodeUrl = picArr.join(","); }; let thecompanyLogoUrl = []; if (this.state.companyLogoUrl.length) { let picArr = []; this.state.companyLogoUrl.map(function (item) { picArr.push(item.response.data); }); thecompanyLogoUrl = picArr.join(","); }; if (!err) { this.setState({ loading: true }); console.log(this.state.ProvinceCity) $.ajax({ method: "post", dataType: "json", url:globalConfig.context + '/api/admin/customer/updateOrganizationCustomer', data: { id:this.state.InformationId, uid: this.state.InformationUid, societyTag:values.societyTag, introduction:values.introduction, unitName:this.state.unitName, industry:this.state.industry, locationProvince:(this.state.ProvinceCity)[0],//省- locationCity:(this.state.ProvinceCity)[1],//市 locationArea:(this.state.ProvinceCity)[2],//区 postalAddress:values.postalAddress, contactsFixedTel:values.contactsFixedTel, contactsFax:values.contactsFax, registeredCapital:values.registeredCapital, enterpriseScale:values.enterpriseScale, legalPerson:values.legalPerson, legalPersonIdCard:values.legalPersonIdCard, legalPersonTel:values.legalPersonTel, legalPersonEmail:values.legalPersonEmail, highTechZone:this.state.highTechZone, listed:this.state.listed, orgCode:values.orgCode, businessScope:values.businessScope, introduction:values.introduction, companyLogoUrl:thecompanyLogoUrl, orgCodeUrl:theorgCodeUrl, } }).done(function (data) { this.setState({ loading: false }); if (!data.error.length) { message.success('保存成功!'); this.detailsModal() this.loadData(); } else { message.warning(data.error[0].message); } }.bind(this)); } }) }, //点击整行查看详情 //查看基本详情基本信息 loadInformation(record){ this.RowClick; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail', data: { uid: record }, success: function (data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thisData = {}; }; let ProvinceCityArr=[]; let ProvinceS=thisData.locationProvince; //getprovince let citys=thisData.locationCity; let Areas=thisData.locationArea; ProvinceCityArr.push(ProvinceS,citys,Areas); this.setState({ InformationId:thisData.id, InformationUid:thisData.uid, unitName:thisData.unitName, listed:thisData.listed, highTechZone:thisData.highTechZone, orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [], companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [], dataInformation:thisData, ProvinceCity:ProvinceCityArr, industry:thisData.industry?(thisData.industry).toString():undefined, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //tab3账户信息请求数据 httpAccount(record){ this.RowClick; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/customer/findUserAccountDetail', data: { uid: record }, success: function (data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thisData = {}; }; let sourcecustomer='' switch((thisData.source).toString()){ case '0': sourcecustomer='注册客户' break; case '1': sourcecustomer='录入客户' break; } console.log(thisData) this.setState({ Accountuid:thisData.id, mobile:thisData.mobile, nickname:thisData.nickname, email:thisData.email, type:getcustomerTyp(thisData.type), source:sourcecustomer, isMember:thisData.isMember, currentMemberStatus:(thisData.currentMemberStatus).toString(), lvl:(thisData.lvl).toString(), serviceCertification:thisData.serviceCertification, status:(thisData.status).toString(), userCertification:thisData.userCertification, createTimes:thisData.createTimes, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, detailsModalOk(e) { this.setState({ modal5Visible:true });//需要一个请求数据 this.loadInformation(e.id) }, //点击消失函数 detailsModal(e) { this.setState({ modal5Visible:false }); }, //拜访modul函数 visitOk(e) { this.setState({ visitModul:false }); }, visitCancel(e) { this.setState({ visitModul:false }); }, //拜访保存函数 visitSubmit(e){ e.preventDefault(); if(this.state.contactType==undefined){ message.warning('请选择拜访方式') return false; }; if(this.state.keys){ }; if(this.state.lastName==undefined){ message.warning('请选择联系人') return false; } this.setState({ selectedRowKeys: [], }); this.setState({ loading: true }); let conts=this.state.lastName; let contactsId= this.state.contactsIdArr[conts].id; //新增 $.ajax({ method: "post", dataType: "json", url:this.state.keys?globalConfig.context + '/api/admin/customer/addFollow':globalConfig.context + '/api/admin/customer/updateFollow', data: this.state.keys?{ userBusinessList:JSON.stringify(this.state.data), uid: this.state.uid, ocbId:contactsId , contactType:this.state.contactType, result: this.state.result, followTime: this.state.followTime, }:{ userBusinessList:JSON.stringify(this.state.data), uid: this.state.uid, ocbId: contactsId, contactType:this.state.contactType, result: this.state.result, followTime: this.state.followTime, } }).done(function (data) { this.setState({ loading: false }); if (!data.error.length) { message.success('保存成功!'); this.loadVisit(); // this.loadData(); this.visitCancel() } else { message.warning(data.error[0].message); } }.bind(this)); }, //当选择联系人的列表变化时,则执行 hundleName(e){ let changNub=this.state.telNum[e]; this.setState({ nub:this.state.telNum[e], lastName: e, }); }, //添加新业务及单位客户详情新增 addNew() { this.state.data.push({ id: null, name: '', url: '' }); this.setState({ data: this.state.data }) }, //tab中列表点击修改拜访详情 //获取拜访详情ajax loadVisit(pageNo) { this.state.data = []; this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url:globalConfig.context + '/api/admin/customer/listFollowHistory', data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, uid: this.state.rowId, //名称1 businessGlossoryId:'', }, success: function (data) { let theArr = []; if (data.error.length || data.data.list=="") { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; theArr.push({ followId:thisdata.followId, followTime:thisdata.followTime, identityName:thisdata.identityName, contacts:thisdata.contacts, contactMobile:thisdata.contactMobile, result:thisdata.result, adminName:thisdata.adminName, contactType:thisdata.contactType }); }; this.state.pagination.current = data.data.pageNo; this.state.pagination.total = data.data.totalCount; }; this.setState({ visitArrList: theArr, pagination: this.state.pagination }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //修改密码Modul modifyPassworld(){ this.setState({ passworldModul:true }); }, passworldOk(e) { this.setState({ passworldModul:false }); }, passworldCancel(e) { this.setState({ passworldModul:false }); }, //修改密码保存 passworldSubmit(e){ e.preventDefault(); this.passworldCancel() }, //新增联系人 addcontactModulOK(){ this.setState({ addcontactModul:false }); }, addcontactModulcancel(){ this.setState({ addcontactModul:false }); }, //点击新增详情 newContacts(){ this.setState({ addcontactModul:true }); }, //新增联系人保存函数 submitcontactman(e){ e.preventDafault(); }, //获取联系人下拉框 getNewWoman(ids) { this.state.data = [] $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/findCustomerContacts", data:{ uid:ids, }, success: function (data) { let theArr = []; let thedata=data.data; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; var telNum=[]; var contactIds=[]; thedata.map(function (item,index) { contactIds.push(thedata[index].id); telNum.push(thedata[index].mobile); }); for (let item in data.data) { let theData = data.data[item]; theArr.push( {theData.name} ); }; this.setState({ contactsIdArr:thedata, telNum:telNum, orderStatusOption: theArr, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, //意向服务列表修改保存 intentionModify(e){ console.log(e) }, //意向服务列表单个删除 intentionDelet(e){ console.log(e) }, //tab5意向业务 //意向业务查看列表单个详情 businessIntentionDetails(e){ this.setState({ businessModul:true }) }, businessIntentionOk(){ this.setState({ businessModul:false }) }, businessIntentionCancel(){ this.setState({ businessModul:false }) }, //业务跟进查看跟多 businessFollowDetails(e){ this.setState({ businessFollowModul:true }) }, businessFollowOk(e){ this.setState({ businessFollowModul:false }) }, businessFollowCancel(e){ this.setState({ businessFollowModul:false }) }, //详情tab切换数据处理 callback(e){ if(e==1){ this.loadInformation(this.state.rowId) } if(e==2){ } if(e==3){ this.httpAccount(this.state.rowId) } if(e==4){ this.loadVisit(); } if(e==5){ this.BusinessList(); } if(e==6){ } if(e==7){ } if(e==8){ } if(e==9){ } }, //账户信息保存 accountSave(e){ e.preventDefault(); this.state.data=[]; this.setState({ selectedRowKeys: [], }); this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", url:globalConfig.context + '/api/admin/customer/updateUserAccount', data: { id: this.state.Accountuid, mobile: this.state.mobile, nickname: this.state.nickname, email: this.state.email, isMember: this.state.isMember, currentMemberStatus: this.state.currentMemberStatus, serviceCertification: this.state.serviceCertification, userCertification: this.state.userCertification, lvl:this.state.lvl, status:this.state.status, } }).done(function (data) { this.setState({ loading: false }); if (!data.error.length) { message.success('保存成功!'); this.detailsModal(); this.loadData(); } else { message.warning(data.error[0].message); } }.bind(this)); }, //列表详情tab2联系人新建 addContact(){ // this.state.data.push({ // name: '', // }); // // this.setState({ // data: this.state.data // }) }, //删除 confirmDelet(e){ console.log(e) }, //保存 ContactsListSave(e){ console.log(e) }, //tab5业务意向 BusinessList(pageNo) { this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url:globalConfig.context + '/api/admin/customer/listBusiness', data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, uid:this.state.rowId }, success: function (data) { let theArr = []; if (data.error.length || data.data.list=="") { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; theArr.push({ key: i, id: thisdata.id, businessId:thisdata.businessId, businessName:thisdata.businessName, identifyName:thisdata.identifyName, followSituation:thisdata.followSituation, customerStatus:thisdata.customerStatus, adminName:thisdata.adminName, createTime:thisdata.createTime }); }; this.state.pagination.current = data.data.pageNo; this.state.pagination.total = data.data.totalCount; }; this.setState({ dataBusiness: theArr, pagination: this.state.pagination }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, componentWillReceiveProps(nextProps) { if (!this.props.visible && nextProps.visible) { if (nextProps.data && nextProps.data.id) { this.loadData(nextProps.data.id, nextProps.detailApiUrl); }; this.state.data = {}; this.state.companyLogoUrl = []; this.state.orgCodeUrl = []; }; }, render() { const FormItem = Form.Item const rowSelection = { selectedRowKeys: this.state.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { this.setState({ selectedRows: selectedRows.slice(-1), selectedRowKeys: selectedRowKeys.slice(-1) }); }, onSelect: (recordt, selected, selectedRows) => { this.setState({ recordt:recordt.id }) }, }; const rowSelections = { selectedRowKeys: this.state.selectedRowKey, onChange: (selectedRowKey, selectedRow) => { this.setState({ selectedRow: selectedRow.slice(-1), selectedRowKey: selectedRowKey.slice(-1) }); }, onSelect: (records, selected, selectedRow) => { this.setState({ selectedRow: selectedRow.slice(-1), records:records.id, }) }, }; const hasSelected = this.state.selectedRowKeys.length > 0; const { RangePicker } = DatePicker; const { getFieldDecorator } = this.props.form; const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 }, }; //const theDatak = this.state.datak || {}; const theInformation=this.state.dataInformation || {} const contactsOption=""; const formItemLayput = { labelCol: { span: 10 }, wrapperCol: { span: 14 }, }; const contacts=this.state.contacts || ''; return (
我的客户
{ this.setState({ nameSearch: e.target.value }); }} /> { this.setState({ addressSearch: e }) }} /> { if (info.file.status !== 'uploading') { console.log(info.file, info.fileList); } if (info.file.status === 'done') { if (!info.file.response.error.length) { message.success(`${info.file.name} 文件上传成功!`); this.loadData(); } else { message.warning(info.file.response.error[0].message); return; }; } else if (info.file.status === 'error') { message.error(`${info.file.name} 文件上传失败。`); }; }} > 更多搜索
{ this.setState({ releaseDate: dataString }); }} /> 认证: 国际: 高新: 上市: 会员:
{theInformation.unitName}
{getFieldDecorator('societyTag', { initialValue: theInformation.societyTag })( )} { this.setState({ ProvinceCity: e }) }} /> {getFieldDecorator('postalAddress', { initialValue: theInformation.postalAddress })( )} {getFieldDecorator('contactsFixedTel', { initialValue: theInformation.contactsFixedTel })( )} {getFieldDecorator('contactsFax', { initialValue: theInformation.contactsFax })( )} {getFieldDecorator('registeredCapital', { initialValue: theInformation.registeredCapital })( )} {getFieldDecorator('enterpriseScale', { initialValue: theInformation.enterpriseScale })( )} {getFieldDecorator('legalPerson', { initialValue: theInformation.legalPerson })( )} {getFieldDecorator('legalPersonIdCard', { initialValue: theInformation.legalPersonIdCard })( )} {getFieldDecorator('legalPersonTel', { initialValue: theInformation.legalPersonTel })( )} {getFieldDecorator('legalPersonEmail', { initialValue: theInformation.legalPersonEmail })( )} { this.setState({highTechZone:e.target.value}) }}> { this.setState({listed:e.target.value }) }}> {getFieldDecorator('orgCode', { initialValue: theInformation.orgCode })( )}

图片建议:图片要清晰。

图片建议:图片要清晰。

{getFieldDecorator('businessScope', { initialValue: theInformation.businessScope })( )} {getFieldDecorator('introduction', { initialValue: theInformation.introduction })( )}
{ this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/> { this.setState({ nickname: e.target.value }); }} /> { this.setState({ email: e.target.value }); }} /> {this.state.source} {this.state.type} {this.state.createTimes}
{ this.setState({ isMember: e.target.value }) }}>
{ this.setState({ serviceCertification: e.target.value }) }}> 未认证 已认证 { this.setState({ userCertification: e.target.value }) }}> 未认证 已认证
{ this.setState({ contactType: e.target.value }) }}> 外出 电话 QQ 微信 邮箱
{this.state.identityName} {this.state.adminName} {contacts} {this.state.followTime} {this.state.nub}
{this.setState({result:e.target.value})}}/>
业务意向
{ this.setState({ companyNamet1: e.target.value }); }} required="required" />
{ this.setState({ companyName1: e.target.value }); }} required="required" />
{ this.setState({ companyNam1: e.target.value }); }} required="required" />
{ this.setState({ hotst: e.target.value }) }}> { this.setState({ hott: e.target.value }) }}>
姓名: { this.setState({ paymentIdt: e.target.value }) }} /> QQ号: { this.setState({ entIdt: e.target.value }) }} /> 手机号: { this.setState({ payt: e.target.value }) }} /> 座机号: { this.setState({ paymt: e.target.value }) }} /> 部门: { this.setState({ paytIdtt: e.target.value }) }} /> 职位: { this.setState({ paentIdt: e.target.value }) }} /> 微信号: { this.setState({ payIdt: e.target.value }) }} /> 邮箱: { this.setState({ emailst: e.target.value }) }} />
{this.state.a} {this.state.a1} {this.state.a} {this.state.a} {this.state.a} {this.state.a}
{this.state.a}
业务跟进
{this.state.a} {this.state.a1} {this.state.a} {this.state.a} {this.state.a} {this.state.a}
{this.state.a}
拜访情况
{this.state.a} {this.state.a} {this.state.a} {this.state.a} {this.state.a}
{this.state.a}
); } })); export default MyClient;