12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930 |
- import React from 'react';
- import { Radio, Icon, Button, Cascader, Input, Select, Tabs, Spin, Popconfirm, Table, Switch, message, DatePicker, Modal, Upload, Form, Row, Col } 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 '../../../areaList';
- import {getProvinceList} from '../../../addressList';
- const { Column, ColumnGroup } = Table;
- const TabPane = Tabs.TabPane;
- const monthFormat = 'YYYY/MM';
- import CustomerDetail from './myClientDesc.jsx';
- import QueryCustomer from './publicManagesOne.jsx';
- import { socialAttribute, industry, auditStatusL, newFollow, lvl, currentMember, statuslist, customerStatus, intentionalService } from '../../../dataDic.js';
- import { getSocialAttribute, splitUrl,getAuditStatus, getCompanyIntention, getStatuslist, getContactType, getfllowSituation, getWhether, getcustomerStatue, getCertification, getcustomerTyp, getLvl, getCurrentMember, getprovince } from '../../../tools.js';
- import AddContact from "../NEW/signCustomer/followDetail/addContact";
- //图片组件
- const PicturesWalls = 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 = (
- <div>
- <Icon type="plus" />
- <div className="ant-upload-text">点击上传</div>
- </div>
- );
- return(
- <div style={{display:"inline-block"}}>
- <Upload
- action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
- data={{ 'sign': '' }}
- listType="picture-card"
- fileList={fileList}
- onPreview={this.handlePreview}
- onChange={this.handleChange} >
- {fileList.length >= 1 ? null : uploadButton}
- </Upload>
- <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
- <img alt="example" style={{ width: '100%' }} src={previewImage} />
- </Modal>
- </div>
- );
- }
- });
- const PublicCustomer = Form.create()(React.createClass({
- //获取分配人员
- selectSuperId() {
- this.state.data = []
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/findAdminName",
- data:{
-
- },
- 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 contactIds=[];
- //for (let item in data.data) {
- for(var i=0;i<data.data.length;i++){
- let theData = data.data[i];
- theArr.push(
- <Select.Option value={i.toString()} key={theData.adminName}>{theData.adminName}</Select.Option>
- );
- };
- this.setState({
- SuperArr:thedata,
- contactsOption: theArr,
- orderStatusOptions:data.data,
- });
-
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- loadData(pageNo) {
- this.state.data = [];
- this.setState({
- loading: true,
- ispage:pageNo,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/listPublicOrganizationCustomer',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- type: this.state.typeSearch, //名称1
- name: this.state.nameSearch,
- shareType: this.state.shareTypeSearch,
- province: (this.state.addressSearch).length ? this.state.addressSearch[0] : this.state.provinceSearch,
- city: (this.state.addressSearch).length ? this.state.addressSearch[1] : '',
- //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
- status: this.state.statusSearch,
- industry: this.state.industrySearch,
- businessAudit: this.state.serviceCertificationSearch,
- auditStatus: this.state.userCertificationSearch,
- currentMemberStatus: this.state.currentMemberStatusSearch,
- international: this.state.internationalSearch,
- lvl: this.state.lvlSearch,
- societyTag: this.state.societyTagSearch,
- 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,
- businessAudit: thisdata.businessAudit,
- auditStatus: thisdata.auditStatus,
- lvl: thisdata.lvl,
- shareType: thisdata.shareType,
- societyTag: thisdata.societyTag,
- currentMemberStatus: thisdata.currentMemberStatus,
- international: thisdata.international,
- listed: thisdata.listed,
- adminName: thisdata.adminName,
- 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;
- };
- if(data.data&&data.data.list&&!data.data.list.length){
- this.state.pagination.current=0;
- this.state.pagination.total=0;
- }
- this.setState({
- dataSource: theArr,
- pagination: this.state.pagination,
- selectedRowKeys:[]
- });
- }.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 {
- addressSearch: [],
- orgCodeUrl: [],
- companyLogoUrl: [],
- visible: false,
- searchMore: true,
- 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 + '条数据';
- }
- },
- paginations: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function(page) {
- this.loadVisit(page);
- }.bind(this),
- showTotal: function(total) {
- return '共' + total + '条数据';
- }
- },
- paginationsy: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function(page) {
- this.loadBfVisit(page, false);
- }.bind(this),
- showTotal: function(total) {
- return '共' + total + '条数据';
- }
- },
- paginationt: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function(page) {
- this.BusinessList(page, false);
- }.bind(this),
- showTotal: function(total) {
- return '共' + total + '条数据';
- }
- },
- //业务意向列表
- intentionList: [{
- title: '业务名称',
- dataIndex: 'businessGlossoryId',
- key: 'businessGlossoryId',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
- {
- intentionalService.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select> : <span>{getCompanyIntention(text)}</span>
- }
- },
- {
- title: '最新进度',
- dataIndex: 'followSituation',
- key: 'followSituation',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
- {
- newFollow.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select> : <span>{getfllowSituation(text)}</span>
- }
- }, {
- title: '最新状态',
- dataIndex: 'customerStatus',
- key: 'customerStatus',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
- {
- customerStatus.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select> : <span>{getcustomerStatue(text)}</span>
- }
- }, {
- title: '跟进说明',
- dataIndex: 'remarks',
- key: 'remarks',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.remarks} placeholder="跟进说明"
- onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
- style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '操作',
- dataIndex: 'rrr',
- key: 'rrr',
- render: (text, record, index) => {
- return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
- <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
- </Popconfirm>
- </div>
- }
- }
- ],
- 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',
- render: text => { return getfllowSituation(text) }
- }, {
- title: '客户状态',
- dataIndex: 'customerStatus',
- key: 'customerStatus',
- render: text => { return getcustomerStatue(text) }
- }, {
- title: '操作',
- dataIndex: 'ooo',
- key: 'ooo',
- render: (text, record) => { return(<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>) }
- }],
- businessFollowList: [{
- title: '跟进时间',
- dataIndex: 'followTime',
- key: 'followTime',
- }, {
- title: '营销员',
- dataIndex: 'adminName',
- key: 'adminName',
- }, {
- title: '业务意向进度',
- dataIndex: 'followSituation',
- key: 'followSituation',
- render: text => { return getfllowSituation(text) }
- }, {
- title: '客户状态',
- dataIndex: 'customerStatus',
- key: 'customerStatus',
- render: text => { return getcustomerStatue(text) }
- },
- {
- title: '拜访方式',
- dataIndex: 'contactType',
- key: 'contactType',
- render: text => { return getContactType(text) }
- }, {
- title: '联系人',
- dataIndex: 'contacts',
- key: 'contacts',
- },
- {
- title: '联系电话',
- dataIndex: 'contactMobile',
- key: 'contactMobile',
- }, {
- title: '操作',
- dataIndex: 'ooo',
- key: 'ooo',
- render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>) }
- }
- ],
- visitsList: [{
- title: '拜访时间',
- dataIndex: 'followTime',
- key: 'followTime'
- }, {
- title: '客户名称',
- dataIndex: 'identifyName',
- key: 'identifyName'
- }, {
- title: '拜访方式',
- dataIndex: 'contactType',
- key: 'contactType',
- render: text => { return getContactType(text) }
- }, {
- 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 adminData.isSuperAdmin ? <div>
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
- <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
- </Popconfirm>
- </div> : <span></span>
- }
- }],
- ContactsLists: [{
- title: '姓名',
- dataIndex: 'name',
- key: 'name',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.name} placeholder="姓名" key={record.id} required="required"
- onChange={(e) => { record.name = e.target.value;
- this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '联系人部门',
- dataIndex: 'depatrment',
- key: 'depatrment',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
- onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '联系人职务',
- dataIndex: 'position',
- key: 'position',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.position} placeholder="联系人职务" key={record.id}
- onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '手机号码',
- dataIndex: 'mobile',
- key: 'mobile',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
- onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '微信',
- dataIndex: 'wechat',
- key: 'wechat',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.wechat} placeholder="微信" key={record.id}
- onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '联系人QQ',
- dataIndex: 'qq',
- key: 'qq',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.qq} placeholder="联系人QQ" key={record.id}
- onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- }, {
- title: '电子邮箱',
- dataIndex: 'email',
- key: 'email',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <Input value={record.email} placeholder="电子邮箱" key={record.id}
- onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
- }
- },
- {
- title: '操作',
- dataIndex: 'dels',
- key: 'dels',
- render: (text, record, index) => {
- return adminData.isSuperAdmin ? <div>
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
- <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
- </Popconfirm>
- </div> : <span>无权限</span>
- }
- }
- ],
- columnsman: [{
- title: '姓名',
- dataIndex: 'name',
- key: 'name'
- }, {
- title: '手机号码',
- dataIndex: 'mobile',
- key: 'mobile'
- }],
- columns: [{
- title: '客户名称',
- dataIndex: 'name',
- key: 'name',
- }, {
- title: '地区',
- dataIndex: 'locationProvince',
- key: 'locationProvince',
- },
- {
- title: '行业',
- dataIndex: 'industry',
- key: 'industry',
- },
- {
- title: '社会性质',
- dataIndex: 'societyTag',
- key: 'societyTag',
- render: text => { return getSocialAttribute(text) }
- },
- {
- title: '公共客户',
- dataIndex: 'shareType',
- key: 'shareType',
- render: (text, record) => { return record.shareType == '1' ? <span>公共客户</span> : <span>个人客户</span> }
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- },
- {
- title: '所属人',
- dataIndex: 'adminName',
- key: 'adminName',
- },
- {
- title: '业务认证',
- dataIndex: 'businessAudit',
- key: 'businessAudit',
- render: text => { return getCertification(text) }
- },
- {
- title: '实名认证',
- dataIndex: 'auditStatus',
- key: 'auditStatus',
- render: text => { return getAuditStatus(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) }
- }
- ],
- data: [],
- dataman: [],
- dataSource: [],
- visitArrList: [],
- searchTime: [, ]
- };
- },
- //更多操作
- ModalOperation() {
- this.setState({
- visible: true,
- });
- },
- //tab2获取联系人详情
- contactLists(ids) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/findCustomerContacts',
- data: {
- uid: ids, //名称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.length; i++) {
- let thisdata = data.data[i];
- theArr.push({
- id: thisdata.id,
- name: thisdata.name,
- mobile: thisdata.mobile,
- email: thisdata.email,
- qq: thisdata.qq,
- wechat: thisdata.wechat,
- depatrment: thisdata.depatrment,
- position: thisdata.position,
- });
- };
- };
- this.setState({
- contactList: theArr,
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //刷新新增拜访记录刷新
- deletelist(e) {
- $.ajax({
- method: "get",
- dataType: "json",
- url: globalConfig.context + '/api/admin/customer/toAddFollow',
- data: {
- uid: e,
- },
- success: function(data) {
- let listArr = [];
- let thedata = data.data;
- if(!thedata) {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- for(let i = 0; i < data.data.userBusinessList.length; i++) {
- let thisdata = data.data.userBusinessList[i];
- listArr.push({
- id: thisdata.id,
- businessGlossoryId: String(thisdata.businessGlossoryId),
- followSituation: String(thisdata.followSituation),
- customerStatus: String(thisdata.customerStatus),
- remarks: thisdata.remarks,
- });
- };
- this.setState({
- contacts: thedata.contacts,
- uid: thedata.uid,
- data: listArr,
- identifyName: thedata.identifyName,
- 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));
- },
- //进入新增拜访记录
- visit(e) {
- this.state.keys = true;
- this.getNewWoman(e.id);
- this.deletelist(e.id)
- this.setState({
- result: '',
- contactType: undefined,
- visitModul: true,
- loading: true
- });
- },
- //拜访记录删除
- visitDelet(e) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/deleteFollow",
- data: {
- followId: e.followId, //删除的ID
- }
- }).done(function(data) {
- if(!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.loadVisit();
- }.bind(this));
- },
- //进入修改拜访记录
- visitModify(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 = {};
- };
- for(let i = 0; i < data.data.userBusinessList.length; i++) {
- let thisdata = data.data.userBusinessList[i];
- theArr.push({
- id: thisdata.id,
- businessGlossoryId: String(thisdata.businessGlossoryId),
- followSituation: String(thisdata.followSituation),
- customerStatus: String(thisdata.customerStatus),
- remarks: thisdata.remarks,
- });
- };
- this.setState({
- followIds: thedata.followId,
- contacts: thedata.contacts,
- uid: thedata.uid,
- data: theArr,
- nub: thedata.contactMobile,
- result: thedata.result,
- contactType: parseInt(thedata.contactType),
- identifyName: thedata.identifyName,
- followTime: thedata.followTime,
- businessGlossoryId: thedata.businessGlossoryId,
- followSituation: thedata.followSituation,
- customerStatus: thedata.customerStatus,
- 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({
- loading: true,
- selectedRowKeys: [],
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/deleteCustomer",
- data: {
- uid: deletedIds, //删除的ID
- }
- }).done(function(data) {
- if(!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.loadData(this.state.ispage);
- }.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(e) {
- e.preventDefault();
- 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(this.state.ispage);
- }.bind(this));
- },
- getOrgCodeUrl(e) {
- this.setState({ orgCodeUrl: e });
- },
- getCompanyLogoUrl(e) {
- this.setState({ companyLogoUrl: e });
- },
- componentWillMount() {
- this.selectSuperId();
- let areaArr= getProvinceList();
- let Citys=citySelect(areaArr);
- let Areas=areaSelect(areaArr);
- this.setState({
- City: Citys,
- Area: Areas
- });
- //城市
- let Province = [];
- areaArr.map(function(item) {
- var id = String(item.id)
- Province.push(
- <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
- )
- });
- //行业
- let intentionalArr = [];
- industry.map(function(item) {
- intentionalArr.push(
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
- )
- });
- //会员等级
- let lvlArr = [];
- lvl.map(function(item) {
- lvlArr.push(
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
- )
- });
- //会员状态customerStatus
- let currentMemberArr = [];
- currentMember.map(function(item) {
- currentMemberArr.push(
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
- )
- });
- this.state.Provinces = Province;
- this.state.intentionalOption = intentionalArr;
- this.state.lvlArrOption = lvlArr;
- this.state.currentMemberArrOption = currentMemberArr;
- this.loadData();
- },
- search() {
- this.loadData();
- },
- reset() {
- this.state.internationalSearch = undefined;
- this.state.shareTypeSearch = undefined;
- 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.societyTagSearch = 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.selectSuperId();
- this.state.RowData = record;
- this.detailsModalOk(record);
- this.setState({
- callnub:'1',
- selectedRowKeys: [],
- rowId: record.id,
- editSuperId:undefined,
- })
- },
- VisitRowClick(record, index) {
- this.state.keys = false;
- this.state.RowData = record;
- this.visitModify(record.followId);
- this.setState({
- selectedRowKeys: [],
- delectId: record.followId,
- })
- },
- //基本信息提交
- newSubmit(e) {
- e.preventDefault();
- if(!this.state.industry) {
- message.warning('请选择行业');
- return false;
- };
- if(!this.state.societyTag) {
- message.warning('请选择社会性质');
- return false;
- };
- if(!this.state.ProvinceCity[1]) {
- message.warning('请选择地区');
- return false;
- };
- 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) {
- if ( item.response && item.response.data && item.response.data.length ){
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(",");
- };
- let thecompanyLogoUrl = [];
- if(this.state.companyLogoUrl.length) {
- let picArr = [];
- this.state.companyLogoUrl.map(function(item) {
- if ( item.response && item.response.data && item.response.data.length ){
- picArr.push(item.response.data);
- }
- });
- thecompanyLogoUrl = picArr.join(",");
- };
- if(this.state.editSuperId){
- let nameText=this.state.SuperArr;
- let superText=nameText[parseInt(this.state.editSuperId)].aid;
- $.ajax({
- method: "post",
- dataType: "json",
- url: globalConfig.context + '/api/admin/customer/updatePersonalCustomerz',
- data: {
- id: this.state.InformationId,
- uid: this.state.InformationUid,
- aid:superText,
- }
- });
- }
- if(!err) {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
- data: {
- id: this.state.InformationId,
- uid: this.state.InformationUid,
- societyTag: this.state.societyTag,
- introduction: this.state.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: this.state.postalAddress,
- contactsFixedTel: this.state.contactsFixedTel,
- contactsFax: this.state.contactsFax,
- registeredCapital: this.state.registeredCapital,
- enterpriseScale: this.state.enterpriseScale,
- legalPerson: this.state.legalPerson,
- international: this.state.international,
- legalPersonIdCard: this.state.legalPersonIdCard,
- legalPersonTel: this.state.legalPersonTel,
- legalPersonEmail: this.state.legalPersonEmail,
- highTechZone: this.state.highTechZone,
- listed: this.state.listed,
- orgCode: this.state.orgCode,
- businessScope: this.state.businessScope,
- companyLogoUrl: thecompanyLogoUrl,
- orgCodeUrl: theorgCodeUrl,
- investment: this.state.investment,
- auditStatus: this.state.auditStatus,
- businessAudit: this.state.businessAudit
- }
- }).done(function(data) {
- this.setState({
- loading: false
- });
- if(!data.error.length) {
- message.success('保存成功!');
- this.detailsModal()
- this.loadData(this.state.ispage);
- } 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);
- let cityArea = getprovince(ProvinceS) + '/' + getprovince(citys) + '/' + getprovince(Areas)
- this.setState({
- InformationId: thisData.id,
- InformationUid: thisData.uid,
- identifyName: thisData.identifyName,
- 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,
- proviceCityArea: ProvinceS ? cityArea : '',
- industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
- international: thisData.international,
- societyTag: thisData.societyTag,
- introduction: thisData.introduction,
- postalAddress: thisData.postalAddress,
- contactsFixedTel: thisData.contactsFixedTel,
- contactsFax: thisData.contactsFax,
- registeredCapital: thisData.registeredCapital,
- enterpriseScale: thisData.enterpriseScale,
- legalPerson: thisData.legalPerson,
- legalPersonIdCard: thisData.legalPersonIdCard,
- legalPersonTel: thisData.legalPersonTel,
- legalPersonEmail: thisData.legalPersonEmail,
- businessScope: thisData.businessScope,
- orgCode: thisData.orgCode,
- investment: thisData.investment,
- auditStatus: thisData.auditStatus?String(thisData.auditStatus):undefined,
- businessAudit: thisData.businessAudit
- });
- }.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(String(thisData.source)) {
- case '0':
- sourcecustomer = '注册客户'
- break;
- case '1':
- sourcecustomer = '录入客户'
- break;
- }
- this.setState({
- Accountuid: thisData.id,
- mobile: thisData.mobile,
- nickname: thisData.nickname,
- email: thisData.email,
- type: getcustomerTyp(String(thisData.type)),
- source: sourcecustomer,
- isMember: thisData.isMember,
- currentMemberStatus: String(thisData.currentMemberStatus),
- lvl: String(thisData.lvl),
- status: String(thisData.status),
- createTimes: thisData.createTimes,
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- detailsModalOk(e) {
- this.setState({ modal5Visible: true }); //需要一个请求数据
- this.loadInformation(e.id);
- this.contactLists(e.id);
- this.httpAccount(e.id);
- this.loadBfVisit(1, e.id);
- this.BusinessList(1, e.id);
- },
- //点击消失函数
- detailsModal(e) {
- this.setState({
- modal5Visible: false
- });
- },
- //拜访modul函数
- visitOk(e) {
- this.setState({
- visitModul: false
- });
- this.loadVisit()
- },
- visitCancel(e) {
- this.setState({
- visitModul: false
- });
- },
- //拜访保存函数
- visitSubmit(e) {
- e.preventDefault();
- let GlossoryId=false;
- this.state.data.map(function(item) {
- if(!item.businessGlossoryId||!item.followSituation||!item.customerStatus) {
- GlossoryId = true
- }
- })
- if(this.state.contactType == undefined) {
- message.warning('请选择拜访方式')
- return false;
- };
- if(this.state.keys) {
- if(this.state.lastName == undefined) {
- message.warning('请选择联系人')
- return false;
- }
- };
- if(GlossoryId) {
- message.warning("业务名称/最新进度/最新状态不能为空!")
- return false;
- };
- this.setState({
- selectedRowKeys: [],
- });
- this.setState({
- loading: true
- });
- let contactsId = '';
- if(this.state.keys) {
- let conts = this.state.lastName;
- 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,
- } : {
- followId: this.state.followIds,
- userBusinessList: JSON.stringify(this.state.data),
- uid: this.state.uid,
- 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.state.ispage);
- 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({
- customerStatus: undefined,
- businessGlossoryId: undefined,
- followSituation: undefined,
- remarks: '',
- });
- this.setState({
- data: this.state.data
- })
- },
- //tab2新增联系人
- addcontact() {
- this.state.contactList.push({
- id: null,
- name: '',
- mobile: '',
- email: '',
- qq: '',
- wechat: '',
- depatrment: '',
- position: '',
- });
- this.setState({
- contactList: this.state.contactList
- })
- },
- //tab5进入修改时
- //进入修改时
- listFollowUp(e) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
- data: {
- ufbId: e
- },
- success: function(data) {
- let thedata = data.data;
- if(!thedata) {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- this.setState({
- businessGlossoryIds: thedata.businessGlossoryId,
- followSituations: thedata.followSituation,
- customerStatuss: thedata.customerStatus,
- followTimes: thedata.followTime,
- createTimes: thedata.createTime,
- identifyNames: thedata.identifyName,
- contactTypes: parseInt(thedata.contactType),
- results: thedata.result,
- remarkss: thedata.remarks,
- adminNames: thedata.adminName,
- contactss: thedata.contacts,
- contactMobiles: thedata.contactMobile,
- ufbId: thedata.ufbId,
- followIds: thedata.followId,
- });
- }.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()
- },
- //点击新增详情
- newContacts() {
- this.state.newsex =undefined;
- this.state.newname ='';
- this.state.newmobile='';
- this.state.newwechat='';
- this.state.newqq='';
- this.state.newdepatrment='';
- this.state.newposition='';
- this.state.newemail='';
- this.setState({
- uids: this.state.uid,
- addcontactModul: true
- });
- },
- //获取联系人下拉框
- 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(
- <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
- );
- };
- this.setState({
- contactsIdArr: thedata,
- telNum: telNum,
- orderStatusOption: theArr,
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- deletId: ids,
- loading: false
- });
- }.bind(this));
- },
- //拜访意向服务列表单个删除
- intentionDelet(e, index) {
- if(!this.state.keys) {
- let detId = this.state.followIds;
- if(e.id) {
- this.setState({
- selectedRowKeys: [],
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
- data: {
- ufbId: e.id
- }
- }).done(function(data) {
- if(!data.error.length) {
- message.success('删除成功');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.visitModify(detId);
- }.bind(this));
- } else {
- this.visitModify(detId);
- }
- } else {
- let deteluserBusinessList = (this.state.data).splice(index, 1)
- this.setState({
- selectedRowKeys: [],
- });
- }
- },
- //tab5意向业务
- //意向业务查看列表单个详情
- businessIntentionDetails(e) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
- data: {
- businessId: e.businessId
- },
- success: function(data) {
- let thisData = data.data;
- if(!thisData) {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thisData = {};
- };
- this.setState({
- businessGlossoryId: thisData.businessGlossoryId,
- identifyName: thisData.identifyName,
- uid: thisData.uid,
- businessId: thisData.businessId,
- followSituation: thisData.followSituation,
- customerStatus: thisData.customerStatus,
- createTime: thisData.createTime,
- followTime: thisData.followTime,
- adminName: thisData.adminName,
- remarks: thisData.remarks,
- result: thisData.result,
- });
- }.bind(this),
- }).always(function() {
- this.loadVisit();
- this.setState({
- loading: false
- });
- }.bind(this));
- this.setState({
- businessModul: true
- })
- },
- //查看跟进记录列表
- loadVisit(pageNo) {
- 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.paginations.pageSize,
- uid: this.state.rowId, //名称1
- businessGlossoryId: this.state.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,
- identifyName: thisdata.identifyName,
- contacts: thisdata.contacts,
- contactMobile: thisdata.contactMobile,
- result: thisdata.result,
- ufbId: thisdata.ufbId,
- adminName: thisdata.adminName,
- followSituation: thisdata.followSituation,
- customerStatus: thisdata.customerStatus,
- contactType: thisdata.contactType
- });
- };
- this.state.paginations.current = data.data.pageNo;
- this.state.paginations.total = data.data.totalCount;
- };
- this.setState({
- visitArrList: theArr,
- paginations: this.state.paginations
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //tab3拜访记录
- loadBfVisit(pageNo, uids) {
- 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.paginationsy.pageSize,
- uid: uids ? uids : this.state.rowId, //名称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({
- followId: thisdata.followId,
- followTime: thisdata.followTime,
- identifyName: thisdata.identifyName,
- contacts: thisdata.contacts,
- contactMobile: thisdata.contactMobile,
- result: thisdata.result,
- ufbId: thisdata.ufbId,
- adminName: thisdata.adminName,
- followSituation: thisdata.followSituation,
- customerStatus: thisdata.customerStatus,
- contactType: thisdata.contactType
- });
- };
- this.state.paginationsy.current = data.data.pageNo;
- this.state.paginationsy.total = data.data.totalCount;
- };
- this.setState({
- visitArrList: theArr,
- paginationsy: this.state.paginationsy
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- businessIntentionOk() {
- this.setState({
- businessGlossoryId: '',
- businessModul: false
- })
- },
- businessIntentionCancel() {
- this.setState({
- businessGlossoryId: '',
- businessModul: false
- })
- },
- //业务跟进查看跟多
- businessFollowDetails(e) {
- this.listFollowUp(e.ufbId)
- this.setState({
- businessFollowModul: true
- })
- },
- businessFollowOk(e) {
- this.setState({
- businessFollowModul: false
- })
- },
- businessFollowCancel(e) {
- this.setState({
- businessFollowModul: false
- })
- },
- //tab2联系人保存
- contactSave(e) {
- e.preventDefault();
- this.setState({
- loading: true
- });
- $.ajax({
- url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
- method: 'post',
- data: {
- uid: this.state.rowId,
- contactList: JSON.stringify(this.state.contactList)
- }
- }).done(function(data) {
- this.setState({
- loading: false
- });
- if(!data.error.length) {
- message.success('保存成功!');
- this.detailsModal()
- this.loadData(this.state.ispage);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- },
- //详情tab切换数据处理
- callback(e) {
- if(e == '1') {
- this.loadInformation(this.state.rowId)
- }
- if(e == '2') {
- this.contactLists(this.state.rowId)
- }
- if(e == '3') {
- this.httpAccount(this.state.rowId)
- }
- if(e == '4') {
- this.loadBfVisit(1, this.state.rowId);
- }
- if(e == '5') {
- this.BusinessList(1, this.state.rowId);
- }
- if(e == '6') {
- }
- if(e == '7') {
- }
- if(e == '8') {
- }
- if(e == '9') {
- }
- this.setState({
- callnub: e,
- })
- },
- //账户信息保存
- accountSave(e) {
- e.preventDefault();
- if(!this.state.mobile) {
- message.warning('手机号码不能为空!')
- return false;
- }
- 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,
- 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(this.state.ispage);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- },
- //tab2删除
- confirmDelet(e) {
- this.setState({
- loading: true
- });
- if(e.id) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/deleteOneContact",
- data: {
- ocbId: e.id, //删除的ID
- }
- }).done(function(data) {
- if(!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.contactLists(this.state.rowId);
- }.bind(this));
- } else {
- this.contactLists(this.state.rowId);
- }
- },
- //tab5业务意向
- BusinessList(pageNo, uids) {
- 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.paginationt.pageSize,
- uid: uids ? uids : 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,
- businessId: thisdata.businessId,
- businessName: thisdata.businessName,
- identifyName: thisdata.identifyName,
- followSituation: thisdata.followSituation,
- customerStatus: thisdata.customerStatus,
- adminName: thisdata.adminName,
- createTime: thisdata.createTime
- });
- };
- this.state.paginationt.current = data.data.pageNo;
- this.state.paginationt.total = data.data.totalCount;
- };
- this.setState({
- dataBusiness: theArr,
- paginationt: this.state.paginationt
- });
- }.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 = [];
- //this.loadData(null);
- };
- },
- 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(
- <div className="user-content" >
- <div className="content-title">
- <span>公共单位客户管理</span>
- </div>
- <div className="user-search">
- <Input placeholder="客户名称"
- value={this.state.nameSearch}
- onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
- <Select placeholder="省"
- style={{ width: 80 }}
- value={this.state.provinceSearch}
- onChange={(e) => {this.setState({ provinceSearch: e});}}>
- {this.state.Provinces}
- </Select>
- <span style={{marginRight:'10px'}}>
- <Cascader options={this.state.City} value={this.state.addressSearch} placeholder="选择城市"
- onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
- </span>
- <Button type="primary" onClick={this.search}>搜索</Button>
- <Button onClick={this.reset}>重置</Button>
-
- <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
- <div className='clearfix' style={{marginTop:'5px'}}>
- <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
- <RangePicker
- value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
- this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
- onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
- <Select placeholder="账户状态"
- style={{ width: 100 }}
- value={this.state.statusSearch}
- onChange={(e) => { this.setState({ statusSearch: e }) }}>
- <Select.Option value="0" >正常</Select.Option>
- <Select.Option value="2" >锁定</Select.Option>
- </Select>
- <Select placeholder="行业"
- style={{ width: 100 }}
- value={this.state.industrySearch}
- onChange={(e) => { this.setState({ industrySearch: e }) }}>
- {this.state.intentionalOption}
- </Select>
- <span>认证:</span>
- <Select placeholder="业务认证"
- style={{ width: 100 }}
- value={this.state.serviceCertificationSearch}
- onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
- <Select.Option value="0" >未认证</Select.Option>
- <Select.Option value="1" >已认证</Select.Option>
- </Select>
- <Select placeholder="实名认证"
- style={{ width: 100 }}
- value={this.state.userCertificationSearch}
- onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
- {
- auditStatusL.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span>国际:</span>
- <Select placeholder="国际"
- style={{ width: 100 }}
- value={this.state.internationalSearch}
- onChange={(e) => { this.setState({ internationalSearch: e }) }}>
- <Select.Option value="0" >否</Select.Option>
- <Select.Option value="1" >是</Select.Option>
- </Select>
- <span>高新:</span>
- <Select placeholder="高新"
- style={{ width: 100 }}
- value={this.state.highTechZoneSearch}
- onChange={(e) => { this.setState({ highTechZoneSearch: e }) }}>
- <Select.Option value="0" >否</Select.Option>
- <Select.Option value="1" >是</Select.Option>
- </Select>
- <span>上市:</span>
- <Select placeholder="上市"
- style={{ width: 100 }}
- value={this.state.listedSearch}
- onChange={(e) => { this.setState({ listedSearch: e }) }}>
- <Select.Option value="0" >否</Select.Option>
- <Select.Option value="1" >是</Select.Option>
- </Select>
- <span>会员:</span>
- <Select placeholder="会员等级"
- style={{ width: 100 }}
- value={this.state.lvlSearch}
- onChange={(e) => { this.setState({ lvlSearch: e }) }}>
- {this.state.lvlArrOption}
- </Select>
- <Select placeholder="会员状态"
- style={{ width: 100 }}
- value={this.state.currentMemberStatusSearch}
- onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
- {this.state.currentMemberArrOption}
- </Select>
- <Select placeholder="社会性质"
- style={{ width: 100 }}
- value={this.state.societyTagSearch}
- onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
- {
- socialAttribute.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- </div>
- </div>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.columns}
- dataSource={this.state.dataSource}
- rowSelection={rowSelection}
- pagination={this.state.pagination}
- onRowClick={this.tableRowClick}
- />
- </Spin>
- </div>
- <Modal
- className="customeDetails"
- title="单位客户详情"
- width='1200px'
- visible={this.state.modal5Visible}
- onOk={this.detailsModal}
- onCancel={this.detailsModal}
- footer=''
- >
- <Tabs defaultActiveKey="1" onChange={this.callback} activeKey={this.state.callnub}>
- <TabPane tab="基本信息" key="1">
- <Form horizontal onSubmit={this.newSubmit} id="demand-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="客户名称"
- >
- <span>{theInformation.identifyName}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="行业">
- <Select placeholder="选择行业" value={this.state.industry} style={{width:'300px'}}
- onChange={(e)=>{this.setState({industry:e})}}>
- {
- industry.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span style={{color:'red',marginLeft:'15px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="社会属性"
- >
- <Select placeholder="客户社会属性(必填项)" value={this.state.societyTag} style={{width:'300px'}}
- onChange={(e)=>{this.setState({societyTag:e})}}>
- {
- socialAttribute.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <span style={{color:'red',marginLeft:'15px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="省-市-区"
- >
- <Cascader options={this.state.Area} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
- onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
- <span style={{color:'red',marginLeft:'15px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="通信地址"
- >
- <Input placeholder="客户通信地址" value={this.state.postalAddress}
- onChange={(e)=>{this.setState({postalAddress:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="固定电话"
- >
- <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
- onChange={(e)=>{this.setState({contactsFixedTel:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="客户传真"
- >
- <Input placeholder="客户传真" value={this.state.contactsFax}
- onChange={(e)=>{this.setState({contactsFax:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="注册资本"
- >
- <Input placeholder="注册资本" value={this.state.registeredCapital}
- onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="单位规模"
- >
- <Input placeholder="单位规模" value={this.state.enterpriseScale}
- onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="法人名称"
- >
- <Input placeholder="法人名称" value={this.state.legalPerson}
- onChange={(e)=>{this.setState({legalPerson:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="身份证号码"
- >
- <Input placeholder="法人身份证号码" value={this.state.legalPersonIdCard}
- onChange={(e)=>{this.setState({legalPersonIdCard:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="法人电话"
- >
- <Input placeholder="法人电话" value={this.state.legalPersonTel}
- onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="电子邮箱"
- >
- <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
- onChange={(e)=>{this.setState({legalPersonEmail:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="机构代码"
- >
- <Input placeholder="社会同意机构代码" value={this.state.orgCode}
- onChange={(e)=>{this.setState({orgCode:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="分配指定人"
- >
- <Select placeholder="请选择指定人" value={this.state.editSuperId} onChange={(e)=>{this.setState({editSuperId:e})}}
- notFoundContent="未获取到部门员工">
- {this.state.contactsOption}
- </Select>
-
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="业务认证"
- >
- {adminData.isSuperAdmin?<Radio.Group value={this.state.businessAudit} onChange={(e) => {
- this.setState({ businessAudit: e.target.value })
- }}>
- <Radio value={0}>未认证</Radio>
- <Radio value={1}>已认证</Radio>
- </Radio.Group>:<span>{this.state.businessAudit?'是':'否'}</span>}
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="高新"
- >
- <Radio.Group value={this.state.highTechZone} onChange={(e) => {
- this.setState({highTechZone:e.target.value})
- }}>
- <Radio value={0}>否</Radio>
- <Radio value={1}>是</Radio>
- </Radio.Group>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="上市"
- >
- <Radio.Group value={this.state.listed} onChange={(e) => {
- this.setState({listed:e.target.value })
- }}>
- <Radio value={0}>否</Radio>
- <Radio value={1}>是</Radio>
- </Radio.Group>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="国际化"
- >
- <Radio.Group value={this.state.international} onChange={(e) => {
- this.setState({international:e.target.value })
- }}>
- <Radio value={0}>否</Radio>
- <Radio value={1}>是</Radio>
- </Radio.Group>
- </FormItem>
- </div>
- <div className="clearfix pictures">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="机构证(PIC)" >
- <PicturesWalls
- pictureSign="PIC"
- fileList={this.getOrgCodeUrl}
- pictureUrl={this.state.orgCodeUrl} />
- <p>图片建议:图片要清晰。</p>
- </FormItem>
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="单位logo" >
- <PicturesWalls
- pictureSign="logo"
- fileList={this.getCompanyLogoUrl}
- pictureUrl={this.state.companyLogoUrl} />
- <p>图片建议:图片要清晰。</p>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 2 }}
- wrapperCol={{ span: 18 }}
- label="业务范围" >
- <Input type="textarea" rows={4} value={this.state.businessScope}
- onChange={(e)=>{this.setState({businessScope:e.target.value})}}/>
- </FormItem>
- <FormItem
- labelCol={{ span: 2 }}
- wrapperCol={{ span: 18 }}
- label="单位简介" >
- <Input type="textarea" rows={4} value={this.state.introduction}
- onChange={(e)=>{this.setState({introduction:e.target.value})}}/>
- </FormItem>
- </div>
- <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'90px',marginBottom:'30px'}}>保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
- </div>
- </Spin>
- </Form>
- </TabPane>
- <TabPane tab="联系人信息" key="2">
- <div className="clearfix" >
- <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>新增</Button>
- </div>
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Form horizontal id="demand-form" onSubmit={this.contactSave} >
- <Table
- pagination={false}
- columns={this.state.ContactsLists}
- dataSource={this.state.contactList}
- />
- <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
- <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
- <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
- </div>
- </Form>
- </Spin>
- </div>
- </TabPane>
- <TabPane tab="账户信息" key="3">
- <div className="clearfix">
- <Form horizontal id="demand-form" onSubmit={this.accountSave} >
- <Spin spinning={this.state.loading} >
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="注册手机号" >
- {adminData.isSuperAdmin?<div><Input value={this.state.mobile} disabled onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
- <Button onClick={this.modifyPassworld}>修改密码</Button></div>:<span>{this.state.mobile}</span>}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="注册用户名" >
- {adminData.isSuperAdmin?<Input value={this.state.nickname}
- onChange={(e) => { this.setState({ nickname: e.target.value }); }} />:<span>{this.state.nickname}</span>}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="注册邮箱" >
- {adminData.isSuperAdmin?<Input value={this.state.email}
- onChange={(e) => { this.setState({ email: e.target.value }); }} />:<span>{this.state.nickname}</span>}
- </FormItem>
- </div>
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户来源" >
- <span>{this.state.source}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户类型" >
- <span>{this.state.type}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="创建时间" >
- <span>{this.state.createTimes}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="账户状态"
- >
- {adminData.isSuperAdmin?<Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
- {
- statuslist.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>:<span>{getStatuslist(this.state.status)}</span>}
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="会员"
- >
- {adminData.isSuperAdmin?<Radio.Group value={this.state.isMember} onChange={(e) => {
- this.setState({ isMember: e.target.value })
- }}>
- <Radio value={0}>否</Radio>
- <Radio value={1}>是</Radio>
- </Radio.Group>:<span>{this.state.isMember?'是':'否'}</span>}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="会员等级"
- >
- {adminData.isSuperAdmin?<Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
- {
- lvl.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>:<span>{getLvl(this.state.lvl)}</span>}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="会员状态"
- >
- {adminData.isSuperAdmin?<Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
- {
- currentMember.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>:<span>{getCurrentMember(this.state.currentMemberStatus)}</span>}
- </FormItem>
- </div>
- <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
- <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
- <Button type="ghost" onClick={this.detailsModal}>取消</Button>
- </div>
- </Spin>
- </Form>
- </div>
- </TabPane>
- <TabPane tab="客户拜访" key="4">
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Table
- pagination={false}
- columns={this.state.visitsList}
- dataSource={this.state.visitArrList}
- onRowClick={this.VisitRowClick}
- />
- </Spin>
- </div>
- </TabPane>
- <TabPane tab="业务意向" key="5">
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Table
- pagination={this.state.paginationt}
- columns={this.state.businessIntentionList}
- dataSource={this.state.dataBusiness}
- />
- </Spin>
- </div>
- </TabPane>
- <TabPane tab="业务订单" key="6">
-
- </TabPane>
- <TabPane tab="技术需求" key="7">
-
- </TabPane>
- <TabPane tab="技术成果" key="8">
-
- </TabPane>
- <TabPane tab="技术专家" key="9">
-
- </TabPane>
- </Tabs>
- </Modal>
- <Modal
- className="customeDetails"
- footer=''
- title="拜访详情"
- width='1200px'
- visible={this.state.visitModul}
- onOk={this.visitOk}
- onCancel={this.visitCancel}
- >
- <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
- {adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访方式" >
- <Radio.Group value={this.state.contactType} onChange={(e) => {
- this.setState({ contactType: e.target.value })
- }}>
- <Radio value={0}>外出</Radio>
- <Radio value={1}>电话</Radio>
- <Radio value={2}>QQ</Radio>
- <Radio value={3}>微信</Radio>
- <Radio value={4}>邮箱</Radio>
- </Radio.Group>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- >
- <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户名称"
- >
- <span>{this.state.identifyName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访人"
- >
- <span>{this.state.adminName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="当前联系人"
- >
- <span>{this.state.contacts}</span>
- </FormItem>
- {this.state.contacts?<span></span>:
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系人"
- >
- <Select placeholder="选择联系人" style={{ width: 140 }}
- value={this.state.lastName}
- onChange={this.hundleName}>
- {this.state.orderStatusOption}
- </Select>
- </FormItem>
- }
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访时间"
- >
- <span>{this.state.followTime}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系电话"
- >
- <span>{this.state.nub}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="拜访备注" >
- <Input type="textarea" rows={4} value={this.state.result}
- onChange={(e)=>{this.setState({result:e.target.value})}}/>
- </FormItem>
- </div>
- <div className="clearfix">
- <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
- <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
- <Spin spinning={this.state.loading}>
- <Table
- rowKey={record => record.id}
- pagination={false}
- columns={this.state.intentionList}
- dataSource={this.state.data}
- />
- </Spin>
- </div>
- </div>
- </div>
- <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
- <Button size="large" onClick={this.visitCancel}>取消</Button>
- </Spin>:<Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访方式" >
- <span>{getContactType(String(this.state.contactType))}</span>
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户名称"
- >
- <span>{this.state.identifyName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访人"
- >
- <span>{this.state.adminName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="当前联系人"
- >
- <span>{this.state.contacts}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访时间"
- >
- <span>{this.state.followTime}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系电话"
- >
- <span>{this.state.nub}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="拜访备注" >
- <span>{this.state.result}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
- <Spin spinning={this.state.loading}>
- <Table
- rowKey={record => record.id}
- pagination={false}
- columns={this.state.intentionList}
- dataSource={this.state.data}
- />
- </Spin>
- </div>
- </div>
- </div>
- </Spin>}
- </Form>
- </Modal>
- <Modal
- footer=''
- title="修改密码"
- width='600px'
- visible={this.state.passworldModul}
- onOk={this.passworldOk}
- onCancel={this.passworldCancel}
- >
- <div className="clearfix">
- <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="原密码" >
- <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="新密码" >
- <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="确认密码" >
- <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
- </FormItem>
- </div>
- <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
- <Button size="large" onClick={this.passworldCancel}>取消</Button>
- </Spin>
- </Form>
- </div>
- </Modal>
- <AddContact
- addcontactModul={this.state.addcontactModul}
- uids={this.state.uids}
- closeFollow={()=>{
- this.setState({
- addcontactModul:false
- },()=>{
- this.getNewWoman(this.state.uids)
- })
- }}
- />
- <Modal
- footer=''
- title="业务意向详情"
- width='1200px'
- visible={this.state.businessModul}
- onOk={this.businessIntentionOk}
- onCancel={this.businessIntentionCancel}
- >
- <div className="clearfix">
- <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务名称" >
- <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向时间" >
- <span>{this.state.createTime}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户名称" >
- <span>{this.state.identifyName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="营销员" >
- <span>{this.state.adminName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务进度" >
- <span>{getfllowSituation(this.state.followSituation)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务客户状态" >
- <span>{getcustomerStatue(this.state.customerStatus)}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务意向说明" >
- <span>{this.state.remarks}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Table
- pagination={this.state.paginations}
- columns={this.state.businessFollowList}
- dataSource={this.state.visitArrList}
- />
- </Spin>
- </div>
- </div>
- </Spin>
- </Form>
- </div>
- </Modal>
- <Modal
- footer=''
- title="业务跟进详情"
- width='600px'
- visible={this.state.businessFollowModul}
- onOk={this.businessFollowOk}
- onCancel={this.businessFollowCancel}
- >
- <div className="clearfix">
- <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务名称" >
- <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向时间" >
- <span>{this.state.createTimes}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户名称" >
- <span>{this.state.identifyNames}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="营销员" >
- <span>{this.state.adminNames}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务进度" >
- <span>{getfllowSituation(this.state.followSituations)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务客户状态" >
- <span>{getcustomerStatue(this.state.customerStatuss)}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务意向说明" >
- <span>{this.state.remarkss}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访方式" >
- <span>{getContactType(this.state.contactTypes)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系人" >
- <span>{this.state.contactss}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系电话" >
- <span>{this.state.contactMobiles}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访时间" >
- <span>{this.state.followTimes}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访人" >
- <span>{this.state.adminNames}</span>
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访备注" >
- <span>{this.state.results}</span>
- </FormItem>
- </div>
- </div>
- </Spin>
- </Form>
- </div>
- </Modal>
- </div >
- );
- }
- }));
- const Tablees=Form.create()(React.createClass({
- //详情tab切换数据处理
- callbacks(e) {
- this.setState({
- callnubs: e,
- })
- if(e == '1') {
-
- }
- if(e == '2') {
-
- }
-
- },
- getInitialState() {
- return {
- callnubs: "1",
- }
- },
- render() {
- return(
- <div className="clearfix" style={{marginTop:'0px',marginLeft:'20px'}}>
- <Tabs onChange={this.callbacks} type="card" activeKey={this.state.callnubs} style={{paddingLeft:'15px',paddingRight:'15px',marginRight:'20px'}}>
- <TabPane tab="个人客户" key="1" >
- <QueryCustomer />
- </TabPane>
- <TabPane tab="单位客户" key="2">
- <PublicCustomer />
- </TabPane>
- </Tabs>
- </div>
- );
- }
- }));
- export default Tablees;
|