publicManages.jsx 244 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568
  1. import React from 'react';
  2. import { Radio, Icon, Button, Cascader, Input, Select, Tabs, Spin, Popconfirm, Table, Switch, message, DatePicker, Modal, Upload, Form, Row, Col } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import './myClient.less';
  7. import { citySelect, provinceList, areaSelect } from '../../../NewDicProvinceList';
  8. const { Column, ColumnGroup } = Table;
  9. const TabPane = Tabs.TabPane;
  10. const monthFormat = 'YYYY/MM';
  11. import CustomerDetail from './myClientDesc.jsx';
  12. import { socialAttribute, industry, auditStatusL, newFollow, lvl, currentMember, statuslist, customerStatus, intentionalService } from '../../../dataDic.js';
  13. import { getSocialAttribute, splitUrl,getAuditStatus, getCompanyIntention, getStatuslist, getContactType, getIndustryType, getfllowSituation, beforeUploadFile, getWhether, getcustomerStatue, getfllowSituationOn, getCertification, getcustomerTyp, getLvl, getCurrentMember, getprovince } from '../../../tools.js';
  14. //图片组件
  15. const PicturesWall = React.createClass({
  16. getInitialState() {
  17. return {
  18. previewVisible: false,
  19. previewImage: '',
  20. fileList: [],
  21. }
  22. },
  23. handleCancel() {
  24. this.setState({ previewVisible: false })
  25. },
  26. handlePreview(file) {
  27. this.setState({
  28. previewImage: file.url || file.thumbUrl,
  29. previewVisible: true,
  30. });
  31. },
  32. handleChange(info) {
  33. let fileList = info.fileList;
  34. this.setState({ fileList });
  35. this.props.fileList(fileList);
  36. },
  37. componentWillReceiveProps(nextProps) {
  38. this.state.fileList = nextProps.pictureUrl;
  39. },
  40. render() {
  41. const { previewVisible, previewImage, fileList } = this.state;
  42. const uploadButton = (
  43. <div>
  44. <Icon type="plus" />
  45. <div className="ant-upload-text">点击上传</div>
  46. </div>
  47. );
  48. return(
  49. <div style={{display:"inline-block"}}>
  50. <Upload
  51. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  52. data={{ 'sign': '' }}
  53. listType="picture-card"
  54. fileList={fileList}
  55. onPreview={this.handlePreview}
  56. onChange={this.handleChange} >
  57. {fileList.length >= 1 ? null : uploadButton}
  58. </Upload>
  59. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  60. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  61. </Modal>
  62. </div>
  63. );
  64. }
  65. });
  66. const QueryCustomer = Form.create()(React.createClass({
  67. //获取分配人员
  68. selectSuperId() {
  69. this.state.data = []
  70. $.ajax({
  71. method: "post",
  72. dataType: "json",
  73. crossDomain: false,
  74. url: globalConfig.context + "/api/admin/customer/findAdminName",
  75. data:{
  76. },
  77. success: function (data) {
  78. let theArr = [];
  79. let thedata=data.data;
  80. if (!thedata) {
  81. if (data.error && data.error.length) {
  82. message.warning(data.error[0].message);
  83. };
  84. thedata = {};
  85. };
  86. var contactIds=[];
  87. //for (let item in data.data) {
  88. for(var i=0;i<data.data.length;i++){
  89. let theData = data.data[i];
  90. theArr.push(
  91. <Select.Option value={i.toString()} key={theData.adminName}>{theData.adminName}</Select.Option>
  92. );
  93. };
  94. this.setState({
  95. SuperArr:thedata,
  96. contactsOption: theArr,
  97. orderStatusOptions:data.data,
  98. });
  99. }.bind(this),
  100. }).always(function () {
  101. this.setState({
  102. loading: false
  103. });
  104. }.bind(this));
  105. },
  106. loadData(pageNo, apiUrl) {
  107. this.state.data = [];
  108. this.setState({
  109. loading: true
  110. });
  111. $.ajax({
  112. method: "post",
  113. dataType: "json",
  114. crossDomain: false,
  115. url: globalConfig.context + '/api/admin/customer/listPublicPersonalCustomer',
  116. data: {
  117. pageNo: pageNo || 1,
  118. pageSize: this.state.pagination.pageSize,
  119. type: this.state.typeSearch, //名称1
  120. name: this.state.nameSearch,
  121. province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
  122. city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
  123. status: this.state.statusSearch,
  124. industry: this.state.industrySearch,
  125. businessAudit: this.state.serviceCertificationSearch,
  126. auditStatus: this.state.userCertificationSearch,
  127. currentMemberStatus: this.state.currentMemberStatusSearch,
  128. lvl: this.state.lvlSearch,
  129. listed: this.state.listedSearch, //是否上市
  130. highTechZone: this.state.highTechZoneSearch, //是否高新
  131. startDate: this.state.releaseDate[0],
  132. endDate: this.state.releaseDate[1],
  133. isMember: this.state.isMemberSearch,
  134. international: this.state.internationalSearch,
  135. celebrity: this.state.celebritySearch,
  136. expert: this.state.expertSearch,
  137. industry: this.state.industrySearch,
  138. shareType: this.state.shareTypeSearch,
  139. },
  140. success: function(data) {
  141. let theArr = [];
  142. if(data.error.length || data.data.list == "") {
  143. if(data.error && data.error.length) {
  144. message.warning(data.error[0].message);
  145. };
  146. } else {
  147. for(let i = 0; i < data.data.list.length; i++) {
  148. let thisdata = data.data.list[i];
  149. theArr.push({
  150. key: i,
  151. id: thisdata.uid,
  152. type: thisdata.type,
  153. name: thisdata.name,
  154. status: thisdata.status,
  155. contacts: thisdata.contacts,
  156. contactMobile: thisdata.contactMobile,
  157. industry: thisdata.industry,
  158. createTime: thisdata.createTime,
  159. businessAudit: thisdata.businessAudit,
  160. auditStatus: thisdata.auditStatus,
  161. lvl: thisdata.lvl,
  162. shareType: thisdata.shareType,
  163. isMember: thisdata.isMember,
  164. consultant: thisdata.consultant,
  165. societyTag: thisdata.societyTag,
  166. currentMemberStatus: thisdata.currentMemberStatus,
  167. international: thisdata.international,
  168. listed: thisdata.listed,
  169. international: thisdata.international,
  170. expert: thisdata.expert,
  171. celebrity: thisdata.celebrity,
  172. adminName: thisdata.adminName,
  173. highTechZone: thisdata.highTechZone,
  174. locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
  175. });
  176. };
  177. this.state.pagination.current = data.data.pageNo ;
  178. this.state.pagination.total = data.data.totalCount ;
  179. };
  180. if(!data.data.list.length){
  181. this.state.pagination.current=0
  182. this.state.pagination.total=0
  183. }
  184. this.setState({
  185. dataSource: theArr,
  186. pagination: this.state.pagination,
  187. selectedRowKeys:[]
  188. });
  189. }.bind(this),
  190. }).always(function() {
  191. this.setState({
  192. loading: false
  193. });
  194. }.bind(this));
  195. },
  196. //点击出现函数
  197. setModal2VisibleOk(e) {
  198. this.setState({
  199. modal2Visible: true
  200. });
  201. },
  202. //点击消失函数
  203. setModal2Visiblecancel(e) {
  204. this.setState({
  205. modal2Visible: false
  206. });
  207. },
  208. getPictureUrl(e) {
  209. this.setState({ pictureUrl: e });
  210. },
  211. handleOk(e) {
  212. this.setState({
  213. visible: false,
  214. });
  215. },
  216. handleCancel(e) {
  217. this.setState({
  218. visible: false,
  219. });
  220. },
  221. getInitialState() {
  222. return {
  223. addressSearch: [],
  224. positiveIdUrl: [],
  225. oppositeIdUrl: [],
  226. headPortraitUrl: [],
  227. visible: false,
  228. searchMore: true,
  229. releaseDate: [],
  230. releaseDate: [],
  231. selectedRowKeys: [],
  232. selectedRowKey: [],
  233. selectedRows: [],
  234. loading: false,
  235. pagination: {
  236. defaultCurrent: 1,
  237. defaultPageSize: 10,
  238. showQuickJumper: true,
  239. pageSize: 10,
  240. onChange: function(page) {
  241. this.loadData(page);
  242. }.bind(this),
  243. showTotal: function(total) {
  244. return '共' + total + '条数据';
  245. }
  246. },
  247. paginations: {
  248. defaultCurrent: 1,
  249. defaultPageSize: 10,
  250. showQuickJumper: true,
  251. pageSize: 10,
  252. onChange: function(page) {
  253. this.loadVisit(page);
  254. }.bind(this),
  255. showTotal: function(total) {
  256. return '共' + total + '条数据';
  257. }
  258. },
  259. paginationsy: {
  260. defaultCurrent: 1,
  261. defaultPageSize: 10,
  262. showQuickJumper: true,
  263. pageSize: 10,
  264. onChange: function(page) {
  265. this.loadBfVisit(page, false);
  266. }.bind(this),
  267. showTotal: function(total) {
  268. return '共' + total + '条数据';
  269. }
  270. },
  271. paginationt: {
  272. defaultCurrent: 1,
  273. defaultPageSize: 10,
  274. showQuickJumper: true,
  275. pageSize: 10,
  276. onChange: function(page) {
  277. this.BusinessList(page, false);
  278. }.bind(this),
  279. showTotal: function(total) {
  280. return '共' + total + '条数据';
  281. }
  282. },
  283. //业务意向列表
  284. intentionList: [{
  285. title: '业务名称',
  286. dataIndex: 'businessGlossoryId',
  287. key: 'businessGlossoryId',
  288. render: (text, record, index) => {
  289. return adminData.isSuperAdmin ? <Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
  290. {
  291. intentionalService.map(function (item) {
  292. return <Select.Option key={item.value} >{item.key}</Select.Option>
  293. })
  294. }
  295. </Select> : <span>{getCompanyIntention(text)}</span>
  296. }
  297. },
  298. {
  299. title: '最新进度',
  300. dataIndex: 'followSituation',
  301. key: 'followSituation',
  302. render: (text, record, index) => {
  303. return adminData.isSuperAdmin ? <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
  304. {
  305. newFollow.map(function (item) {
  306. return <Select.Option key={item.value} >{item.key}</Select.Option>
  307. })
  308. }
  309. </Select> : <span>{getfllowSituation(text)}</span>
  310. }
  311. }, {
  312. title: '最新状态',
  313. dataIndex: 'customerStatus',
  314. key: 'customerStatus',
  315. render: (text, record, index) => {
  316. return adminData.isSuperAdmin ? <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
  317. {
  318. customerStatus.map(function (item) {
  319. return <Select.Option key={item.value} >{item.key}</Select.Option>
  320. })
  321. }
  322. </Select> : <span>{getcustomerStatue(text)}</span>
  323. }
  324. }, {
  325. title: '跟进说明',
  326. dataIndex: 'remarks',
  327. key: 'remarks',
  328. render: (text, record, index) => {
  329. return adminData.isSuperAdmin ? <Input value={record.remarks} placeholder="跟进说明"
  330. onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
  331. style={{width:'120px'}}/> : <span>{text}</span>
  332. }
  333. }, {
  334. title: '操作',
  335. dataIndex: 'rrr',
  336. key: 'rrr',
  337. render: (text, record, index) => {
  338. return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
  339. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
  340. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  341. </Popconfirm>
  342. </div>
  343. }
  344. }
  345. ],
  346. businessIntentionList: [{
  347. title: '意向时间',
  348. dataIndex: 'createTime',
  349. key: 'createTime'
  350. }, {
  351. title: '客户姓名',
  352. dataIndex: 'identifyName',
  353. key: 'identifyName'
  354. }, {
  355. title: '业务名',
  356. dataIndex: 'businessName',
  357. key: 'businessName'
  358. }, {
  359. title: '营销员',
  360. dataIndex: 'adminName',
  361. key: 'adminName'
  362. }, {
  363. title: '业务意向进度',
  364. dataIndex: 'followSituation',
  365. key: 'followSituation',
  366. render: text => { return getfllowSituation(text) }
  367. }, {
  368. title: '客户状态',
  369. dataIndex: 'customerStatus',
  370. key: 'customerStatus',
  371. render: text => { return getcustomerStatue(text) }
  372. }, {
  373. title: '操作',
  374. dataIndex: 'ooo',
  375. key: 'ooo',
  376. render: (text, record) => { return(<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>) }
  377. }],
  378. businessFollowList: [{
  379. title: '跟进时间',
  380. dataIndex: 'followTime',
  381. key: 'followTime',
  382. }, {
  383. title: '营销员',
  384. dataIndex: 'adminName',
  385. key: 'adminName',
  386. }, {
  387. title: '业务意向进度',
  388. dataIndex: 'followSituation',
  389. key: 'followSituation',
  390. render: text => { return getfllowSituation(text) }
  391. }, {
  392. title: '客户状态',
  393. dataIndex: 'customerStatus',
  394. key: 'customerStatus',
  395. render: text => { return getcustomerStatue(text) }
  396. },
  397. {
  398. title: '拜访方式',
  399. dataIndex: 'contactType',
  400. key: 'contactType',
  401. render: text => { return getContactType(text) }
  402. }, {
  403. title: '联系人',
  404. dataIndex: 'contacts',
  405. key: 'contacts',
  406. },
  407. {
  408. title: '联系电话',
  409. dataIndex: 'contactMobile',
  410. key: 'contactMobile',
  411. }, {
  412. title: '操作',
  413. dataIndex: 'ooo',
  414. key: 'ooo',
  415. render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>) }
  416. }
  417. ],
  418. visitsList: [{
  419. title: '拜访时间',
  420. dataIndex: 'followTime',
  421. key: 'followTime'
  422. }, {
  423. title: '客户姓名',
  424. dataIndex: 'identifyName',
  425. key: 'identifyName'
  426. }, {
  427. title: '拜访方式',
  428. dataIndex: 'contactType',
  429. key: 'contactType',
  430. render: text => { return getContactType(text) }
  431. }, {
  432. title: '联系人',
  433. dataIndex: 'contacts',
  434. key: 'contacts'
  435. }, {
  436. title: '联系电话',
  437. dataIndex: 'contactMobile',
  438. key: 'contactMobile'
  439. }, {
  440. title: '拜访人',
  441. dataIndex: 'adminName',
  442. key: 'adminName'
  443. }, {
  444. title: '拜访说明',
  445. dataIndex: 'result',
  446. key: 'result',
  447. render: text => {
  448. return <span style={{width:'150px',display:'inline-block',overflow:'hidden'}}>{text}</span>
  449. }
  450. }, {
  451. title: '操作',
  452. dataIndex: 'ttt',
  453. key: 'ttt',
  454. render: (text, record, index) => {
  455. return adminData.isSuperAdmin ? <div>
  456. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
  457. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
  458. </Popconfirm>
  459. </div> : <span></span>
  460. }
  461. }],
  462. ContactsLists: [{
  463. title: '姓名',
  464. dataIndex: 'name',
  465. key: 'name',
  466. render: (text, record, index) => {
  467. return adminData.isSuperAdmin ? <Input value={record.name} placeholder="姓名" key={record.id}
  468. onChange={(e) => { record.name = e.target.value;
  469. this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  470. }
  471. }, {
  472. title: '联系人部门',
  473. dataIndex: 'depatrment',
  474. key: 'depatrment',
  475. render: (text, record, index) => {
  476. return adminData.isSuperAdmin ? <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
  477. onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  478. }
  479. }, {
  480. title: '联系人职务',
  481. dataIndex: 'position',
  482. key: 'position',
  483. render: (text, record, index) => {
  484. return adminData.isSuperAdmin ? <Input value={record.position} placeholder="联系人职务" key={record.id}
  485. onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  486. }
  487. }, {
  488. title: '手机号码',
  489. dataIndex: 'mobile',
  490. key: 'mobile',
  491. render: (text, record, index) => {
  492. return adminData.isSuperAdmin ? <Input value={record.mobile} placeholder="手机号码" key={record.id}
  493. onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  494. }
  495. }, {
  496. title: '微信',
  497. dataIndex: 'wechat',
  498. key: 'wechat',
  499. render: (text, record, index) => {
  500. return adminData.isSuperAdmin ? <Input value={record.wechat} placeholder="微信" key={record.id}
  501. onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  502. }
  503. }, {
  504. title: '联系人QQ',
  505. dataIndex: 'qq',
  506. key: 'qq',
  507. render: (text, record, index) => {
  508. return adminData.isSuperAdmin ? <Input value={record.qq} placeholder="联系人QQ" key={record.id}
  509. onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  510. }
  511. }, {
  512. title: '电子邮箱',
  513. dataIndex: 'email',
  514. key: 'email',
  515. render: (text, record, index) => {
  516. return adminData.isSuperAdmin ? <Input value={record.email} placeholder="电子邮箱" key={record.id}
  517. onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  518. }
  519. },
  520. {
  521. title: '操作',
  522. dataIndex: 'dels',
  523. key: 'dels',
  524. render: (text, record, index) => {
  525. return adminData.isSuperAdmin ? <div>
  526. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
  527. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  528. </Popconfirm>
  529. </div> : <span>无权限</span>
  530. }
  531. }
  532. ],
  533. columnsman: [{
  534. title: '姓名',
  535. dataIndex: 'name',
  536. key: 'name'
  537. }, {
  538. title: '手机号码',
  539. dataIndex: 'mobile',
  540. key: 'mobile'
  541. }],
  542. columns: [{
  543. title: '客户姓名',
  544. dataIndex: 'name',
  545. key: 'name',
  546. }, {
  547. title: '地区',
  548. dataIndex: 'locationProvince',
  549. key: 'locationProvince',
  550. },
  551. {
  552. title: '公共客户',
  553. dataIndex: 'shareType',
  554. key: 'shareType',
  555. render: (text, record) => { return record.shareType == '1' ? <span>公共客户</span> : <span>个人客户</span> }
  556. },
  557. {
  558. title: '行业',
  559. dataIndex: 'industry',
  560. key: 'industry',
  561. },
  562. {
  563. title: '社会性质',
  564. dataIndex: 'societyTag',
  565. key: 'societyTag',
  566. render: text => { return getSocialAttribute(text) }
  567. },
  568. {
  569. title: '创建时间',
  570. dataIndex: 'createTime',
  571. key: 'createTime',
  572. },{
  573. title: '所属人',
  574. dataIndex: 'adminName',
  575. key: 'adminName',
  576. },
  577. {
  578. title: '业务认证',
  579. dataIndex: 'businessAudit',
  580. key: 'businessAudit',
  581. render: text => { return getCertification(text) }
  582. },
  583. {
  584. title: '实名认证',
  585. dataIndex: 'auditStatus',
  586. key: 'auditStatus',
  587. render: text => { return getAuditStatus(text) }
  588. },
  589. {
  590. title: '是否专家',
  591. dataIndex: 'expert',
  592. key: 'expert',
  593. render: text => { return getWhether(text) }
  594. },
  595. {
  596. title: '是否会员',
  597. dataIndex: 'isMember',
  598. key: 'isMember',
  599. render: text => { return getWhether(text) }
  600. },
  601. {
  602. title: '是否国际',
  603. dataIndex: 'international',
  604. key: 'international',
  605. render: text => { return getWhether(text) }
  606. },
  607. {
  608. title: '会员等级',
  609. dataIndex: 'lvl',
  610. key: 'lvl',
  611. render: text => { return getLvl(text) }
  612. },
  613. {
  614. title: '会员状态',
  615. dataIndex: 'currentMemberStatus',
  616. key: 'currentMemberStatus',
  617. render: text => { return getCurrentMember(text) }
  618. },
  619. {
  620. title: '状态',
  621. dataIndex: 'status',
  622. key: 'status',
  623. render: text => { return getStatuslist(text) }
  624. }
  625. ],
  626. data: [],
  627. dataman: [],
  628. dataSource: [],
  629. visitArrList: [],
  630. searchTime: [, ]
  631. };
  632. },
  633. //更多操作
  634. ModalOperation() {
  635. this.setState({
  636. visible: true,
  637. });
  638. },
  639. //tab2获取联系人详情
  640. contactLists(ids) {
  641. this.setState({
  642. loading: true
  643. });
  644. $.ajax({
  645. method: "get",
  646. dataType: "json",
  647. crossDomain: false,
  648. url: globalConfig.context + '/api/admin/customer/findCustomerContacts',
  649. data: {
  650. uid: ids, //名称1
  651. },
  652. success: function(data) {
  653. let theArr = [];
  654. if(data.error.length || data.data.list == "") {
  655. if(data.error && data.error.length) {
  656. message.warning(data.error[0].message);
  657. };
  658. } else {
  659. for(let i = 0; i < data.data.length; i++) {
  660. let thisdata = data.data[i];
  661. theArr.push({
  662. id: thisdata.id,
  663. name: thisdata.name,
  664. mobile: thisdata.mobile,
  665. email: thisdata.email,
  666. qq: thisdata.qq,
  667. wechat: thisdata.wechat,
  668. depatrment: thisdata.depatrment,
  669. position: thisdata.position,
  670. });
  671. };
  672. };
  673. this.setState({
  674. contactList: theArr,
  675. });
  676. }.bind(this),
  677. }).always(function() {
  678. this.setState({
  679. loading: false
  680. });
  681. }.bind(this));
  682. },
  683. //刷新新增拜访记录刷新
  684. deletelist(e) {
  685. $.ajax({
  686. method: "get",
  687. dataType: "json",
  688. url: globalConfig.context + '/api/admin/customer/toAddFollow',
  689. data: {
  690. uid: e,
  691. },
  692. success: function(data) {
  693. let listArr = [];
  694. let thedata = data.data;
  695. if(!thedata) {
  696. if(data.error && data.error.length) {
  697. message.warning(data.error[0].message);
  698. };
  699. thedata = {};
  700. };
  701. for(let i = 0; i < data.data.userBusinessList.length; i++) {
  702. let thisdata = data.data.userBusinessList[i];
  703. listArr.push({
  704. id: thisdata.id,
  705. businessGlossoryId: String(thisdata.businessGlossoryId),
  706. followSituation: String(thisdata.followSituation),
  707. customerStatus: String(thisdata.customerStatus),
  708. remarks: thisdata.remarks,
  709. });
  710. };
  711. this.setState({
  712. contacts: thedata.contacts,
  713. uid: thedata.uid,
  714. data: listArr,
  715. identifyName: thedata.identifyName,
  716. followTime: thedata.followTime,
  717. businessGlossoryId: thedata.businessGlossoryId,
  718. followSituation: thedata.followSituation,
  719. customerStatus: thedata.customerStatus,
  720. remarks: thedata.remarks,
  721. });
  722. }.bind(this),
  723. }).always(function() {
  724. this.setState({
  725. loading: false
  726. });
  727. }.bind(this));
  728. },
  729. //拜访记录删除
  730. visitDelet(e) {
  731. this.setState({
  732. loading: true
  733. });
  734. $.ajax({
  735. method: "get",
  736. dataType: "json",
  737. crossDomain: false,
  738. url: globalConfig.context + "/api/admin/customer/deleteFollow",
  739. data: {
  740. followId: e.followId, //删除的ID
  741. }
  742. }).done(function(data) {
  743. if(!data.error.length) {
  744. message.success('删除成功!');
  745. this.setState({
  746. loading: false,
  747. });
  748. } else {
  749. message.warning(data.error[0].message);
  750. };
  751. this.loadVisit();
  752. }.bind(this));
  753. },
  754. //进入修改拜访记录
  755. visitModify(e) {
  756. this.setState({
  757. visitModul: true,
  758. loading: true
  759. });
  760. $.ajax({
  761. method: "get",
  762. dataType: "json",
  763. url: globalConfig.context + '/api/admin/customer/toUpdateFollow',
  764. data: {
  765. followId: e,
  766. },
  767. success: function(data) {
  768. let theArr = [];
  769. let thedata = data.data;
  770. if(!thedata) {
  771. if(data.error && data.error.length) {
  772. message.warning(data.error[0].message);
  773. };
  774. thedata = {};
  775. };
  776. for(let i = 0; i < data.data.userBusinessList.length; i++) {
  777. let thisdata = data.data.userBusinessList[i];
  778. theArr.push({
  779. id: thisdata.id,
  780. businessGlossoryId: String(thisdata.businessGlossoryId),
  781. followSituation: String(thisdata.followSituation),
  782. customerStatus: String(thisdata.customerStatus),
  783. remarks: thisdata.remarks,
  784. });
  785. };
  786. this.setState({
  787. followIds: thedata.followId,
  788. contacts: thedata.contacts,
  789. uid: thedata.uid,
  790. data: theArr,
  791. nub: thedata.contactMobile,
  792. result: thedata.result,
  793. contactType: parseInt(thedata.contactType),
  794. identifyName: thedata.identifyName,
  795. followTime: thedata.followTime,
  796. businessGlossoryId: thedata.businessGlossoryId,
  797. followSituation: thedata.followSituation,
  798. customerStatus: thedata.customerStatus,
  799. adminName: thedata.adminName,
  800. });
  801. }.bind(this),
  802. }).always(function() {
  803. this.setState({
  804. loading: false
  805. });
  806. }.bind(this));
  807. },
  808. //列表删除功能
  809. delectRow() {
  810. let deletedIds;
  811. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  812. let rowItem = this.state.selectedRows[idx];
  813. if(rowItem.id) {
  814. deletedIds = rowItem.id;
  815. };
  816. };
  817. this.setState({
  818. selectedRowKeys: [],
  819. });
  820. $.ajax({
  821. method: "get",
  822. dataType: "json",
  823. crossDomain: false,
  824. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  825. data: {
  826. uid: deletedIds, //删除的ID
  827. }
  828. }).done(function(data) {
  829. if(!data.error.length) {
  830. message.success('删除成功!');
  831. this.setState({
  832. loading: false,
  833. });
  834. } else {
  835. message.warning(data.error[0].message);
  836. };
  837. this.loadData();
  838. }.bind(this));
  839. },
  840. //领取
  841. changeRow(e) {
  842. this.setState({
  843. loading: true,
  844. selectedRowKeys: [],
  845. });
  846. $.ajax({
  847. method: "get",
  848. dataType: "json",
  849. crossDomain: false,
  850. url: globalConfig.context + "/api/admin/customer/receiveCustomer",
  851. data: {
  852. uid: e.id,
  853. }
  854. }).done(function(data) {
  855. if(!data.error.length) {
  856. message.success('已领取!');
  857. this.setState({
  858. loading: false,
  859. });
  860. } else {
  861. message.warning(data.error[0].message);
  862. };
  863. this.loadData();
  864. }.bind(this));
  865. },
  866. getHeadPortraitUrl(e) {
  867. this.setState({ headPortraitUrl: e });
  868. },
  869. getPositiveIdUrl(e) {
  870. this.setState({ positiveIdUrl: e });
  871. },
  872. getOppositeIdUrl(e) {
  873. this.setState({ oppositeIdUrl: e });
  874. },
  875. componentWillMount() {
  876. this.selectSuperId();
  877. //城市
  878. let Province = [];
  879. provinceList.map(function(item) {
  880. var id = String(item.id)
  881. Province.push(
  882. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  883. )
  884. });
  885. //行业
  886. let intentionalArr = [];
  887. industry.map(function(item) {
  888. intentionalArr.push(
  889. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  890. )
  891. });
  892. //会员等级
  893. let lvlArr = [];
  894. lvl.map(function(item) {
  895. lvlArr.push(
  896. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  897. )
  898. });
  899. //会员状态customerStatus
  900. let currentMemberArr = [];
  901. currentMember.map(function(item) {
  902. currentMemberArr.push(
  903. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  904. )
  905. });
  906. //客户状态
  907. let customerStatusArr = [];
  908. customerStatus.map(function(item) {
  909. customerStatusArr.push(
  910. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  911. )
  912. });
  913. this.state.Provinces = Province;
  914. this.state.intentionalOption = intentionalArr;
  915. this.state.lvlArrOption = lvlArr;
  916. this.state.currentMemberArrOption = currentMemberArr;
  917. this.state.customerStatusArrOption = customerStatusArr;
  918. this.loadData();
  919. },
  920. search() {
  921. this.loadData();
  922. },
  923. reset() {
  924. this.state.expertSearch = undefined;
  925. this.state.celebritySearch = undefined;
  926. this.state.shareTypeSearch = undefined;
  927. this.state.typeSearch = undefined; //名称1
  928. this.state.nameSearch = '';
  929. this.state.addressSearch = [];
  930. this.state.provinceSearch = undefined;
  931. this.state.citySearch = undefined;
  932. this.state.statusSearch = undefined;
  933. this.state.contactsSearch = undefined;
  934. this.state.contactMobileSearch = undefined;
  935. this.state.industrySearch = undefined;
  936. this.state.serviceCertificationSearch = undefined;
  937. this.state.userCertificationSearch = undefined;
  938. this.state.currentMemberStatusSearch = undefined;
  939. this.state.lvlSearch = undefined;
  940. this.state.listedSearch = undefined;
  941. this.state.highTechZoneSearch = undefined;
  942. this.state.releaseDate[0] = undefined;
  943. this.state.releaseDate[1] = undefined;
  944. this.state.editSuperId=undefined;
  945. this.loadData();
  946. },
  947. searchSwitch() {
  948. this.setState({
  949. searchMore: !this.state.searchMore
  950. });
  951. },
  952. //详情保存函数
  953. detailsSubmint() {
  954. this.setState({
  955. modal5Visible: false,
  956. })
  957. },
  958. //整行点击
  959. tableRowClick(record, index) {
  960. this.selectSuperId();
  961. this.state.RowData = record;
  962. this.detailsModalOk(record);
  963. this.loadInformation(record.id)
  964. this.httpAccount(record.id);
  965. this.loadBfVisit(1, record.id);
  966. this.BusinessList(1, record.id);
  967. this.contactLists(record.id);
  968. this.setState({
  969. callnub:'1',
  970. selectedRowKeys: [],
  971. rowId: record.id,
  972. editSuperId:undefined,
  973. })
  974. },
  975. VisitRowClick(record, index) {
  976. this.state.keys = false;
  977. this.state.RowData = record;
  978. this.visitModify(record.followId);
  979. this.setState({
  980. selectedRowKeys: [],
  981. delectId: record.followId,
  982. })
  983. },
  984. //基本信息提交
  985. newSubmit(e) {
  986. e.preventDefault();
  987. if(!this.state.industry) {
  988. message.warning('请选择行业');
  989. return false;
  990. };
  991. if(!this.state.societyTag) {
  992. message.warning('请选择社会性质');
  993. return false;
  994. };
  995. if(!this.state.ProvinceCity[1]) {
  996. message.warning('请选择地区');
  997. return false;
  998. };
  999. var reg=/^[1-9]\d*$|^0$/;
  1000. if(this.state.consultationPrice){
  1001. if(this.state.consultationPrice.length>6) {
  1002. message.warning('咨询费用不超过6位数');
  1003. this.refs.consul.focus();
  1004. return false;
  1005. };
  1006. if(!reg.test(this.state.consultationPrice)){
  1007. message.warning('咨询费用只能输入数字 ');
  1008. this.refs.consul.focus();
  1009. return false;
  1010. }
  1011. }
  1012. this.setState({
  1013. selectedRowKeys: [],
  1014. });
  1015. this.props.form.validateFields((err, values) => {
  1016. let theorgCodeUrl = [];
  1017. if(this.state.headPortraitUrl.length) {
  1018. let picArr = [];
  1019. this.state.headPortraitUrl.map(function(item) {
  1020. if ( item.response && item.response.data && item.response.data.length ){
  1021. picArr.push(item.response.data);
  1022. }
  1023. });
  1024. theorgCodeUrl = picArr.join(",");
  1025. };
  1026. let thecompanyLogoUrl = [];
  1027. if(this.state.positiveIdUrl.length) {
  1028. let picArr = [];
  1029. this.state.positiveIdUrl.map(function(item) {
  1030. if ( item.response && item.response.data && item.response.data.length ){
  1031. picArr.push(item.response.data);
  1032. }
  1033. });
  1034. thecompanyLogoUrl = picArr.join(",");
  1035. };
  1036. let thecompanyLogoUrls = [];
  1037. if(this.state.oppositeIdUrl.length) {
  1038. let picArr = [];
  1039. this.state.oppositeIdUrl.map(function(item) {
  1040. if ( item.response && item.response.data && item.response.data.length ){
  1041. picArr.push(item.response.data);
  1042. }
  1043. });
  1044. thecompanyLogoUrls = picArr.join(",");
  1045. };
  1046. if(this.state.editSuperId){
  1047. let nameText=this.state.SuperArr;
  1048. let superText=nameText[parseInt(this.state.editSuperId)].aid;
  1049. $.ajax({
  1050. method: "post",
  1051. dataType: "json",
  1052. url: globalConfig.context + '/api/admin/customer/updatePersonalCustomerz',
  1053. data: {
  1054. id: this.state.InformationId,
  1055. uid: this.state.InformationUid,
  1056. aid:superText,
  1057. }
  1058. });
  1059. }
  1060. if(!err) {
  1061. let years = [];
  1062. let yearMonth = new Date(this.state.yearMonth).toLocaleDateString();
  1063. years = yearMonth.split('/');
  1064. this.setState({
  1065. loading: true
  1066. });
  1067. $.ajax({
  1068. method: "post",
  1069. dataType: "json",
  1070. url: globalConfig.context + '/api/admin/customer/updatePersonalCustomer',
  1071. data: {
  1072. id: this.state.InformationId,
  1073. uid: this.state.InformationUid,
  1074. societyTag: this.state.societyTag,
  1075. identifyName: this.state.identifyName,
  1076. industry: this.state.industry,
  1077. dateOfBirthYear: years[0], //出生年
  1078. dateOfBirthMonth: years[1], //出生月
  1079. province: (this.state.ProvinceCity)[0], //省-
  1080. city: (this.state.ProvinceCity)[1], //市
  1081. area: (this.state.ProvinceCity)[2], //区
  1082. sex: this.state.sex,
  1083. expert: this.state.expert,
  1084. celebrity: this.state.celebrity,
  1085. international: this.state.international,
  1086. fixedTel: this.state.fixedTel,
  1087. consultationPrice: this.state.consultationPrice,
  1088. qq: this.state.qq,
  1089. contacts: this.state.contacts,
  1090. contactMobile: this.state.contactMobile,
  1091. idNumber: this.state.idNumber,
  1092. email: this.state.email,
  1093. isMember: this.state.isMember,
  1094. consultant: this.state.consultant,
  1095. postalAddress: this.state.postalAddress,
  1096. introduction: this.state.introduction,
  1097. positiveIdUrl: thecompanyLogoUrl,
  1098. oppositeIdUrl: thecompanyLogoUrls,
  1099. headPortraitUrl: theorgCodeUrl,
  1100. investment: this.state.investment,
  1101. professionalTitle: this.state.professionalTitle,
  1102. workUnit: this.state.workUnit,
  1103. education: this.state.education,
  1104. graduateSchool: this.state.graduateSchool,
  1105. majorCategory: this.state.majorCategory,
  1106. qualification: this.state.qualification,
  1107. businessAudit:this.state.businessAudit,
  1108. auditStatus:this.state.auditStatus
  1109. }
  1110. }).done(function(data) {
  1111. this.setState({
  1112. loading: false
  1113. });
  1114. if(!data.error.length) {
  1115. message.success('保存成功!');
  1116. this.detailsModal()
  1117. this.loadData();
  1118. } else {
  1119. message.warning(data.error[0].message);
  1120. }
  1121. }.bind(this));
  1122. }
  1123. })
  1124. },
  1125. //点击整行查看详情
  1126. //查看基本详情基本信息
  1127. loadInformation(record) {
  1128. this.RowClick;
  1129. $.ajax({
  1130. method: "get",
  1131. dataType: "json",
  1132. crossDomain: false,
  1133. url: globalConfig.context + '/api/admin/customer/findPersonalCustomerDetail',
  1134. data: {
  1135. uid: record
  1136. },
  1137. success: function(data) {
  1138. let thisData = data.data;
  1139. if(!thisData) {
  1140. if(data.error && data.error.length) {
  1141. message.warning(data.error[0].message);
  1142. };
  1143. thisData = {};
  1144. };
  1145. let ProvinceCityArr = [];
  1146. let ProvinceS = thisData.province; //getprovince
  1147. let citys = thisData.city;
  1148. let Areas = thisData.area;
  1149. ProvinceCityArr.push(ProvinceS, citys, Areas);
  1150. let cityArea = getprovince(ProvinceS) + '/' + getprovince(citys) + '/' + getprovince(Areas)
  1151. let month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : false;
  1152. this.setState({
  1153. proviceCityArea: ProvinceS ? cityArea : '',
  1154. InformationId: thisData.id,
  1155. InformationUid: thisData.uid,
  1156. identifyName: thisData.identifyName,
  1157. listed: thisData.listed,
  1158. highTechZone: thisData.highTechZone,
  1159. consultant: thisData.consultant,
  1160. headPortraitUrl: thisData.headPortraitUrl ? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1161. positiveIdUrl: thisData.positiveIdUrl ? splitUrl(thisData.positiveIdUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1162. oppositeIdUrl: thisData.oppositeIdUrl ? splitUrl(thisData.oppositeIdUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1163. dataInformation: thisData,
  1164. idNumber: thisData.idNumber,
  1165. ProvinceCity: ProvinceCityArr,
  1166. industry: String(thisData.industry),
  1167. societyTag: thisData.societyTag,
  1168. sex: thisData.sex,
  1169. contacts: thisData.contacts,
  1170. contactMobile: thisData.contactMobile,
  1171. yearMonth: month,
  1172. postalAddress: thisData.postalAddress,
  1173. fixedTel: thisData.fixedTel,
  1174. consultationPrice: thisData.consultationPrice,
  1175. email: thisData.email,
  1176. qq: thisData.qq,
  1177. introduction: thisData.introduction,
  1178. expert: thisData.expert,
  1179. celebrity: thisData.celebrity,
  1180. international: thisData.international,
  1181. investment: thisData.investment,
  1182. professionalTitle: thisData.professionalTitle,
  1183. workUnit: thisData.workUnit,
  1184. education: thisData.education,
  1185. graduateSchool: thisData.graduateSchool,
  1186. majorCategory: thisData.majorCategory,
  1187. qualification: thisData.qualification,
  1188. businessAudit:thisData.businessAudit,
  1189. auditStatus:thisData.auditStatus?String(thisData.auditStatus):undefined,
  1190. });
  1191. }.bind(this),
  1192. }).always(function() {
  1193. this.setState({
  1194. loading: false
  1195. });
  1196. }.bind(this));
  1197. },
  1198. //tab3账户信息请求数据
  1199. httpAccount(record) {
  1200. this.RowClick;
  1201. $.ajax({
  1202. method: "get",
  1203. dataType: "json",
  1204. crossDomain: false,
  1205. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  1206. data: {
  1207. uid: record
  1208. },
  1209. success: function(data) {
  1210. let thisData = data.data;
  1211. if(!thisData) {
  1212. if(data.error && data.error.length) {
  1213. message.warning(data.error[0].message);
  1214. };
  1215. thisData = {};
  1216. };
  1217. let sourcecustomer = ''
  1218. switch(String(thisData.source)) {
  1219. case '0':
  1220. sourcecustomer = '注册客户'
  1221. break;
  1222. case '1':
  1223. sourcecustomer = '录入客户'
  1224. break;
  1225. }
  1226. this.setState({
  1227. Accountuid: thisData.id,
  1228. mobile: thisData.mobile,
  1229. nickname: thisData.nickname,
  1230. email: thisData.email,
  1231. type: getcustomerTyp(String(thisData.type)),
  1232. source: sourcecustomer,
  1233. isMember: thisData.isMember,
  1234. currentMemberStatus: String(thisData.currentMemberStatus),
  1235. lvl: String(thisData.lvl),
  1236. status: String(thisData.status),
  1237. createTimes: thisData.createTimes,
  1238. });
  1239. }.bind(this),
  1240. }).always(function() {
  1241. this.setState({
  1242. loading: false
  1243. });
  1244. }.bind(this));
  1245. },
  1246. detailsModalOk(e) {
  1247. this.setState({ modal5Visible: true }); //需要一个请求数据
  1248. },
  1249. //点击消失函数
  1250. detailsModal(e) {
  1251. this.setState({
  1252. modal5Visible: false
  1253. });
  1254. },
  1255. //拜访modul函数
  1256. visitOk(e) {
  1257. this.setState({
  1258. visitModul: false
  1259. });
  1260. this.loadVisit()
  1261. },
  1262. visitCancel(e) {
  1263. this.setState({
  1264. visitModul: false
  1265. });
  1266. },
  1267. //拜访保存函数
  1268. visitSubmit(e) {
  1269. e.preventDefault();
  1270. if(this.state.contactType == undefined) {
  1271. message.warning('请选择拜访方式')
  1272. return false;
  1273. };
  1274. if(this.state.keys) {
  1275. if(this.state.lastName == undefined) {
  1276. message.warning('请选择联系人')
  1277. return false;
  1278. }
  1279. };
  1280. this.setState({
  1281. selectedRowKeys: [],
  1282. });
  1283. this.setState({
  1284. loading: true
  1285. });
  1286. let contactsId = '';
  1287. if(this.state.keys) {
  1288. let conts = this.state.lastName;
  1289. contactsId = this.state.contactsIdArr[conts].id;
  1290. }
  1291. //新增
  1292. $.ajax({
  1293. method: "post",
  1294. dataType: "json",
  1295. url: this.state.keys ? globalConfig.context + '/api/admin/customer/addFollow' : globalConfig.context + '/api/admin/customer/updateFollow',
  1296. data: this.state.keys ? {
  1297. userBusinessList: JSON.stringify(this.state.data),
  1298. uid: this.state.uid,
  1299. ocbId: contactsId,
  1300. contactType: this.state.contactType,
  1301. result: this.state.result,
  1302. followTime: this.state.followTime,
  1303. } : {
  1304. followId: this.state.followIds,
  1305. userBusinessList: JSON.stringify(this.state.data),
  1306. uid: this.state.uid,
  1307. contactType: this.state.contactType,
  1308. result: this.state.result,
  1309. followTime: this.state.followTime,
  1310. }
  1311. }).done(function(data) {
  1312. this.setState({
  1313. loading: false
  1314. });
  1315. if(!data.error.length) {
  1316. message.success('保存成功!');
  1317. this.loadVisit(); //
  1318. this.loadData();
  1319. this.visitCancel();
  1320. } else {
  1321. message.warning(data.error[0].message);
  1322. }
  1323. }.bind(this));
  1324. },
  1325. //当选择联系人的列表变化时,则执行
  1326. hundleName(e) {
  1327. let changNub = this.state.telNum[e];
  1328. this.setState({
  1329. nub: this.state.telNum[e],
  1330. lastName: e,
  1331. });
  1332. },
  1333. //添加新业务及单位客户详情新增
  1334. addNew() {
  1335. this.state.data.push({
  1336. customerStatus: undefined,
  1337. businessGlossoryId: undefined,
  1338. followSituation: undefined,
  1339. remarks: '',
  1340. });
  1341. this.setState({
  1342. data: this.state.data
  1343. })
  1344. },
  1345. //tab2新增联系人
  1346. addcontact() {
  1347. this.state.contactList.push({
  1348. id: null,
  1349. name: '',
  1350. mobile: '',
  1351. email: '',
  1352. qq: '',
  1353. wechat: '',
  1354. depatrment: '',
  1355. position: '',
  1356. });
  1357. this.setState({
  1358. contactList: this.state.contactList
  1359. })
  1360. },
  1361. //tab5进入修改时
  1362. //进入修改时
  1363. listFollowUp(e) {
  1364. $.ajax({
  1365. method: "get",
  1366. dataType: "json",
  1367. crossDomain: false,
  1368. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  1369. data: {
  1370. ufbId: e
  1371. },
  1372. success: function(data) {
  1373. let thedata = data.data;
  1374. if(!thedata) {
  1375. if(data.error && data.error.length) {
  1376. message.warning(data.error[0].message);
  1377. };
  1378. thedata = {};
  1379. };
  1380. this.setState({
  1381. businessGlossoryIds: thedata.businessGlossoryId,
  1382. followSituations: thedata.followSituation,
  1383. customerStatuss: thedata.customerStatus,
  1384. followTimes: thedata.followTime,
  1385. createTimes: thedata.createTime,
  1386. identifyNames: thedata.identifyName,
  1387. contactTypes: parseInt(thedata.contactType),
  1388. results: thedata.result,
  1389. remarkss: thedata.remarks,
  1390. adminNames: thedata.adminName,
  1391. contactss: thedata.contacts,
  1392. contactMobiles: thedata.contactMobile,
  1393. ufbId: thedata.ufbId,
  1394. followIds: thedata.followId,
  1395. });
  1396. }.bind(this),
  1397. }).always(function() {
  1398. this.setState({
  1399. loading: false
  1400. });
  1401. }.bind(this));
  1402. },
  1403. //修改密码Modul
  1404. modifyPassworld() {
  1405. this.setState({
  1406. passworldModul: true
  1407. });
  1408. },
  1409. passworldOk(e) {
  1410. this.setState({
  1411. passworldModul: false
  1412. });
  1413. },
  1414. passworldCancel(e) {
  1415. this.setState({
  1416. passworldModul: false
  1417. });
  1418. },
  1419. //修改密码保存
  1420. passworldSubmit(e) {
  1421. e.preventDefault();
  1422. this.passworldCancel()
  1423. },
  1424. //新增联系人
  1425. addcontactModulOK() {
  1426. this.setState({
  1427. addcontactModul: false
  1428. });
  1429. },
  1430. addcontactModulcancel() {
  1431. this.setState({
  1432. addcontactModul: false
  1433. });
  1434. },
  1435. //点击新增详情
  1436. newContacts() {
  1437. this.state.newsex =undefined;
  1438. this.state.newname ='';
  1439. this.state.newmobile='';
  1440. this.state.newwechat='';
  1441. this.state.newqq='';
  1442. this.state.newdepatrment='';
  1443. this.state.newposition='';
  1444. this.state.newemail='';
  1445. this.setState({
  1446. uids: this.state.uid,
  1447. addcontactModul: true
  1448. });
  1449. },
  1450. //新增联系人保存函数
  1451. submitcontactman() {
  1452. this.setState({
  1453. loading: true
  1454. })
  1455. $.ajax({
  1456. method: "post",
  1457. dataType: "json",
  1458. crossDomain: false,
  1459. url: globalConfig.context + "/api/admin/customer/addOneContact",
  1460. data: {
  1461. uid: this.state.uids,
  1462. name: this.state.newname,
  1463. mobile: this.state.newmobile,
  1464. email: this.state.newemail,
  1465. wechat: this.state.newwechat,
  1466. depatrment: this.state.newdepatrment,
  1467. position: this.state.newposition,
  1468. sex: this.state.newsex,
  1469. qq: this.state.newqq
  1470. },
  1471. success: function(data) {
  1472. if(!data.error.length) {
  1473. this.addcontactModulOK()
  1474. this.getNewWoman(this.state.uids)
  1475. this.setState({
  1476. loading: false,
  1477. })
  1478. } else {
  1479. message.warning(data.error[0].message);
  1480. };
  1481. }.bind(this)
  1482. });
  1483. },
  1484. //获取联系人下拉框
  1485. getNewWoman(ids) {
  1486. this.state.data = []
  1487. $.ajax({
  1488. method: "get",
  1489. dataType: "json",
  1490. crossDomain: false,
  1491. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  1492. data: {
  1493. uid: ids,
  1494. },
  1495. success: function(data) {
  1496. let theArr = [];
  1497. let thedata = data.data;
  1498. if(!thedata) {
  1499. if(data.error && data.error.length) {
  1500. message.warning(data.error[0].message);
  1501. };
  1502. thedata = {};
  1503. };
  1504. var telNum = [];
  1505. var contactIds = [];
  1506. thedata.map(function(item, index) {
  1507. contactIds.push(thedata[index].id);
  1508. telNum.push(thedata[index].mobile);
  1509. });
  1510. for(let item in data.data) {
  1511. let theData = data.data[item];
  1512. theArr.push(
  1513. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  1514. );
  1515. };
  1516. this.setState({
  1517. contactsIdArr: thedata,
  1518. telNum: telNum,
  1519. orderStatusOption: theArr,
  1520. });
  1521. }.bind(this),
  1522. }).always(function() {
  1523. this.setState({
  1524. deletId: ids,
  1525. loading: false
  1526. });
  1527. }.bind(this));
  1528. },
  1529. //拜访意向服务列表单个删除
  1530. intentionDelet(e, index) {
  1531. if(!this.state.keys) {
  1532. let detId = this.state.followIds;
  1533. if(e.id) {
  1534. this.setState({
  1535. selectedRowKeys: [],
  1536. });
  1537. $.ajax({
  1538. method: "get",
  1539. dataType: "json",
  1540. crossDomain: false,
  1541. url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
  1542. data: {
  1543. ufbId: e.id
  1544. }
  1545. }).done(function(data) {
  1546. if(!data.error.length) {
  1547. message.success('删除成功');
  1548. this.setState({
  1549. loading: false,
  1550. });
  1551. } else {
  1552. message.warning(data.error[0].message);
  1553. };
  1554. this.visitModify(detId);
  1555. }.bind(this));
  1556. } else {
  1557. this.visitModify(detId);
  1558. }
  1559. } else {
  1560. let deteluserBusinessList = (this.state.data).splice(index, 1)
  1561. this.setState({
  1562. selectedRowKeys: [],
  1563. });
  1564. }
  1565. },
  1566. //tab5意向业务
  1567. //意向业务查看列表单个详情
  1568. businessIntentionDetails(e) {
  1569. $.ajax({
  1570. method: "get",
  1571. dataType: "json",
  1572. crossDomain: false,
  1573. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  1574. data: {
  1575. businessId: e.businessId
  1576. },
  1577. success: function(data) {
  1578. let thisData = data.data;
  1579. if(!thisData) {
  1580. if(data.error && data.error.length) {
  1581. message.warning(data.error[0].message);
  1582. };
  1583. thisData = {};
  1584. };
  1585. this.setState({
  1586. businessGlossoryId: thisData.businessGlossoryId,
  1587. identifyName: thisData.identifyName,
  1588. uid: thisData.uid,
  1589. businessId: thisData.businessId,
  1590. followSituation: thisData.followSituation,
  1591. customerStatus: thisData.customerStatus,
  1592. createTime: thisData.createTime,
  1593. followTime: thisData.followTime,
  1594. adminName: thisData.adminName,
  1595. remarks: thisData.remarks,
  1596. result: thisData.result,
  1597. });
  1598. }.bind(this),
  1599. }).always(function() {
  1600. this.loadVisit();
  1601. this.setState({
  1602. loading: false
  1603. });
  1604. }.bind(this));
  1605. this.setState({
  1606. businessModul: true
  1607. })
  1608. },
  1609. //查看跟进记录列表
  1610. loadVisit(pageNo) {
  1611. this.setState({
  1612. loading: true
  1613. });
  1614. $.ajax({
  1615. method: "get",
  1616. dataType: "json",
  1617. crossDomain: false,
  1618. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1619. data: {
  1620. pageNo: pageNo || 1,
  1621. pageSize: this.state.paginations.pageSize,
  1622. uid: this.state.rowId, //名称1
  1623. businessGlossoryId: this.state.businessGlossoryId,
  1624. },
  1625. success: function(data) {
  1626. let theArr = [];
  1627. if(data.error.length || data.data.list == "") {
  1628. if(data.error && data.error.length) {
  1629. message.warning(data.error[0].message);
  1630. };
  1631. } else {
  1632. for(let i = 0; i < data.data.list.length; i++) {
  1633. let thisdata = data.data.list[i];
  1634. theArr.push({
  1635. followId: thisdata.followId,
  1636. followTime: thisdata.followTime,
  1637. identifyName: thisdata.identifyName,
  1638. contacts: thisdata.contacts,
  1639. contactMobile: thisdata.contactMobile,
  1640. result: thisdata.result,
  1641. ufbId: thisdata.ufbId,
  1642. adminName: thisdata.adminName,
  1643. followSituation: thisdata.followSituation,
  1644. customerStatus: thisdata.customerStatus,
  1645. contactType: thisdata.contactType
  1646. });
  1647. };
  1648. this.state.paginations.current = data.data.pageNo;
  1649. this.state.paginations.total = data.data.totalCount;
  1650. };
  1651. this.setState({
  1652. visitArrList: theArr,
  1653. paginations: this.state.paginations
  1654. });
  1655. }.bind(this),
  1656. }).always(function() {
  1657. this.setState({
  1658. loading: false
  1659. });
  1660. }.bind(this));
  1661. },
  1662. //tab3拜访记录
  1663. loadBfVisit(pageNo, ids) {
  1664. this.setState({
  1665. loading: true
  1666. });
  1667. $.ajax({
  1668. method: "get",
  1669. dataType: "json",
  1670. crossDomain: false,
  1671. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1672. data: {
  1673. pageNo: pageNo || 1,
  1674. pageSize: this.state.paginationsy.pageSize,
  1675. uid: ids ? ids : this.state.rowId, //名称1
  1676. },
  1677. success: function(data) {
  1678. let theArr = [];
  1679. if(data.error.length || data.data.list == "") {
  1680. if(data.error && data.error.length) {
  1681. message.warning(data.error[0].message);
  1682. };
  1683. } else {
  1684. for(let i = 0; i < data.data.list.length; i++) {
  1685. let thisdata = data.data.list[i];
  1686. theArr.push({
  1687. followId: thisdata.followId,
  1688. followTime: thisdata.followTime,
  1689. identifyName: thisdata.identifyName,
  1690. contacts: thisdata.contacts,
  1691. contactMobile: thisdata.contactMobile,
  1692. result: thisdata.result,
  1693. ufbId: thisdata.ufbId,
  1694. adminName: thisdata.adminName,
  1695. followSituation: thisdata.followSituation,
  1696. customerStatus: thisdata.customerStatus,
  1697. contactType: thisdata.contactType
  1698. });
  1699. };
  1700. this.state.paginationsy.current = data.data.pageNo;
  1701. this.state.paginationsy.total = data.data.totalCount;
  1702. };
  1703. this.setState({
  1704. visitArrList: theArr,
  1705. paginationsy: this.state.paginationsy
  1706. });
  1707. }.bind(this),
  1708. }).always(function() {
  1709. this.setState({
  1710. loading: false
  1711. });
  1712. }.bind(this));
  1713. },
  1714. businessIntentionOk() {
  1715. this.setState({
  1716. businessGlossoryId: '',
  1717. businessModul: false
  1718. })
  1719. },
  1720. businessIntentionCancel() {
  1721. this.setState({
  1722. businessGlossoryId: '',
  1723. businessModul: false
  1724. })
  1725. },
  1726. //业务跟进查看跟多
  1727. businessFollowDetails(e) {
  1728. this.listFollowUp(e.ufbId)
  1729. this.setState({
  1730. businessFollowModul: true
  1731. })
  1732. },
  1733. businessFollowOk(e) {
  1734. this.setState({
  1735. businessFollowModul: false
  1736. })
  1737. },
  1738. businessFollowCancel(e) {
  1739. this.setState({
  1740. businessFollowModul: false
  1741. })
  1742. },
  1743. //tab2联系人保存
  1744. contactSave() {
  1745. let err = '';
  1746. let contactArr = this.state.contactList;
  1747. contactArr.map(function(item) {
  1748. if(!item.name) {
  1749. err = '客户姓名不能为空!';
  1750. }
  1751. if(!item.mobile) {
  1752. err = '手机号码不能为空!';
  1753. }
  1754. return err;
  1755. })
  1756. if(err) {
  1757. message.warning(err)
  1758. return false;
  1759. };
  1760. $.ajax({
  1761. url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
  1762. method: 'post',
  1763. data: {
  1764. uid: this.state.rowId,
  1765. contactList: JSON.stringify(this.state.contactList)
  1766. }
  1767. }).done(function(data) {
  1768. this.setState({
  1769. loading: false
  1770. });
  1771. if(!data.error.length) {
  1772. message.success('保存成功!');
  1773. this.detailsModal()
  1774. this.loadData();
  1775. } else {
  1776. message.warning(data.error[0].message);
  1777. }
  1778. }.bind(this));
  1779. },
  1780. //详情tab切换数据处理
  1781. callback(e) {
  1782. if(e == '1') {
  1783. this.loadInformation(this.state.rowId)
  1784. }
  1785. if(e == '2') {
  1786. this.contactLists(this.state.rowId)
  1787. }
  1788. if(e == '3') {
  1789. this.httpAccount(this.state.rowId)
  1790. }
  1791. if(e == '4') {
  1792. this.loadBfVisit(1, this.state.rowId);
  1793. }
  1794. if(e == '5') {
  1795. this.BusinessList(1, this.state.rowId);
  1796. }
  1797. if(e == '6') {
  1798. }
  1799. if(e == '7') {
  1800. }
  1801. if(e == '8') {
  1802. }
  1803. if(e == '9') {
  1804. }
  1805. this.setState({
  1806. callnub: e,
  1807. })
  1808. },
  1809. //账户信息保存
  1810. accountSave(e) {
  1811. e.preventDefault();
  1812. this.state.data = [];
  1813. this.setState({
  1814. selectedRowKeys: [],
  1815. });
  1816. this.setState({
  1817. loading: true
  1818. });
  1819. $.ajax({
  1820. method: "post",
  1821. dataType: "json",
  1822. url: globalConfig.context + '/api/admin/customer/updateUserAccount',
  1823. data: {
  1824. id: this.state.Accountuid,
  1825. mobile: this.state.mobile,
  1826. nickname: this.state.nickname,
  1827. email: this.state.email,
  1828. isMember: this.state.isMember,
  1829. currentMemberStatus: this.state.currentMemberStatus,
  1830. lvl: this.state.lvl,
  1831. status: this.state.status,
  1832. }
  1833. }).done(function(data) {
  1834. this.setState({
  1835. loading: false
  1836. });
  1837. if(!data.error.length) {
  1838. message.success('保存成功!');
  1839. this.detailsModal();
  1840. this.loadData();
  1841. } else {
  1842. message.warning(data.error[0].message);
  1843. }
  1844. }.bind(this));
  1845. },
  1846. //tab2删除
  1847. confirmDelet(e) {
  1848. this.setState({
  1849. loading: true
  1850. });
  1851. if(e.id) {
  1852. $.ajax({
  1853. method: "get",
  1854. dataType: "json",
  1855. crossDomain: false,
  1856. url: globalConfig.context + "/api/admin/customer/deleteOneContact",
  1857. data: {
  1858. ocbId: e.id, //删除的ID
  1859. }
  1860. }).done(function(data) {
  1861. if(!data.error.length) {
  1862. message.success('删除成功!');
  1863. this.setState({
  1864. loading: false,
  1865. });
  1866. } else {
  1867. message.warning(data.error[0].message);
  1868. };
  1869. this.contactLists(this.state.rowId);
  1870. }.bind(this));
  1871. } else {
  1872. this.contactLists(this.state.rowId);
  1873. }
  1874. },
  1875. //tab5业务意向
  1876. BusinessList(pageNo, uids) {
  1877. this.setState({
  1878. loading: true
  1879. });
  1880. $.ajax({
  1881. method: "post",
  1882. dataType: "json",
  1883. crossDomain: false,
  1884. url: globalConfig.context + '/api/admin/customer/listBusiness',
  1885. data: {
  1886. pageNo: pageNo || 1,
  1887. pageSize: this.state.paginationt.pageSize,
  1888. uid: uids ? uids : this.state.rowId
  1889. },
  1890. success: function(data) {
  1891. let theArr = [];
  1892. if(data.error.length || data.data.list == "") {
  1893. if(data.error && data.error.length) {
  1894. message.warning(data.error[0].message);
  1895. };
  1896. } else {
  1897. for(let i = 0; i < data.data.list.length; i++) {
  1898. let thisdata = data.data.list[i];
  1899. theArr.push({
  1900. key: i,
  1901. businessId: thisdata.businessId,
  1902. businessName: thisdata.businessName,
  1903. identifyName: thisdata.identifyName,
  1904. followSituation: thisdata.followSituation,
  1905. customerStatus: thisdata.customerStatus,
  1906. adminName: thisdata.adminName,
  1907. createTime: thisdata.createTime
  1908. });
  1909. };
  1910. this.state.paginationt.current = data.data.pageNo;
  1911. this.state.paginationt.total = data.data.totalCount;
  1912. };
  1913. this.setState({
  1914. dataBusiness: theArr,
  1915. paginationt: this.state.paginationt
  1916. });
  1917. }.bind(this),
  1918. }).always(function() {
  1919. this.setState({
  1920. loading: false
  1921. });
  1922. }.bind(this));
  1923. },
  1924. componentWillReceiveProps(nextProps) {
  1925. if(!this.props.visible && nextProps.visible) {
  1926. if(nextProps.data && nextProps.data.id) {
  1927. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1928. };
  1929. this.state.data = {};
  1930. this.state.companyLogoUrl = [];
  1931. this.state.orgCodeUrl = [];
  1932. };
  1933. },
  1934. render() {
  1935. const FormItem = Form.Item
  1936. const rowSelection = {
  1937. selectedRowKeys: this.state.selectedRowKeys,
  1938. onChange: (selectedRowKeys, selectedRows) => {
  1939. this.setState({
  1940. selectedRows: selectedRows.slice(-1),
  1941. selectedRowKeys: selectedRowKeys.slice(-1)
  1942. });
  1943. },
  1944. onSelect: (recordt, selected, selectedRows) => {
  1945. this.setState({
  1946. recordt: recordt.id
  1947. })
  1948. },
  1949. };
  1950. const rowSelections = {
  1951. selectedRowKeys: this.state.selectedRowKey,
  1952. onChange: (selectedRowKey, selectedRow) => {
  1953. this.setState({
  1954. selectedRow: selectedRow.slice(-1),
  1955. selectedRowKey: selectedRowKey.slice(-1)
  1956. });
  1957. },
  1958. onSelect: (records, selected, selectedRow) => {
  1959. this.setState({
  1960. selectedRow: selectedRow.slice(-1),
  1961. records: records.id,
  1962. })
  1963. },
  1964. };
  1965. const hasSelected = this.state.selectedRowKeys.length > 0;
  1966. const { RangePicker, MonthPicker } = DatePicker;
  1967. const { getFieldDecorator } = this.props.form;
  1968. const formItemLayout = {
  1969. labelCol: { span: 8 },
  1970. wrapperCol: { span: 14 },
  1971. };
  1972. const theInformation = this.state.dataInformation || {}
  1973. const contactsOption = "";
  1974. const formItemLayput = {
  1975. labelCol: { span: 10 },
  1976. wrapperCol: { span: 14 },
  1977. };
  1978. const contacts = this.state.contacts || '';
  1979. return(
  1980. <div className="user-content" >
  1981. <div className="content-title">
  1982. <span>公共个人客户管理</span>
  1983. </div>
  1984. <div className="user-search">
  1985. <Input placeholder="客户姓名"
  1986. value={this.state.nameSearch}
  1987. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1988. <Select placeholder="省"
  1989. style={{ width: 80 }}
  1990. value={this.state.provinceSearch}
  1991. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  1992. {this.state.Provinces}
  1993. </Select>
  1994. <span style={{marginRight:'10px'}}>
  1995. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  1996. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  1997. </span>
  1998. <span style={{marginRight:'10px'}}>客户类型:</span>
  1999. <Select placeholder="选择客户类型"
  2000. style={{ width: 100 }}
  2001. value={this.state.shareTypeSearch}
  2002. onChange={(e) => { this.setState({ shareTypeSearch: e }) }}>
  2003. <Select.Option value="" >所有客户</Select.Option>
  2004. <Select.Option value="1" >公共客户</Select.Option>
  2005. </Select>
  2006. <Button type="primary" onClick={this.search}>搜索</Button>
  2007. <Button onClick={this.reset}>重置</Button>
  2008. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  2009. <div className='clearfix' style={{marginTop:'5px'}}>
  2010. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  2011. <RangePicker
  2012. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  2013. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  2014. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  2015. <Select placeholder="客户状态"
  2016. style={{ width: 100 }}
  2017. value={this.state.statusSearch}
  2018. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  2019. <Select.Option value="0" >正常</Select.Option>
  2020. <Select.Option value="2" >锁定</Select.Option>
  2021. </Select>
  2022. <Select placeholder="行业"
  2023. style={{ width: 100 }}
  2024. value={this.state.industrySearch}
  2025. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  2026. {this.state.intentionalOption}
  2027. </Select>
  2028. <span>认证:</span>
  2029. <Select placeholder="业务认证"
  2030. style={{ width: 100 }}
  2031. value={this.state.serviceCertificationSearch}
  2032. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  2033. <Select.Option value="0" >未认证</Select.Option>
  2034. <Select.Option value="1" >已认证</Select.Option>
  2035. </Select>
  2036. <Select placeholder="实名认证"
  2037. style={{ width: 100 }}
  2038. value={this.state.userCertificationSearch}
  2039. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  2040. {
  2041. auditStatusL.map(function (item) {
  2042. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2043. })
  2044. }
  2045. </Select>
  2046. <span>专家:</span>
  2047. <Select placeholder="专家"
  2048. style={{ width: 60 }}
  2049. value={this.state.expertSearch}
  2050. onChange={(e) => { this.setState({ expertSearch: e }) }}>
  2051. <Select.Option value="0" >否</Select.Option>
  2052. <Select.Option value="1" >是</Select.Option>
  2053. </Select>
  2054. <span>明星:</span>
  2055. <Select placeholder="明星"
  2056. style={{ width: 60 }}
  2057. value={this.state.celebritySearch}
  2058. onChange={(e) => { this.setState({ celebritySearch: e }) }}>
  2059. <Select.Option value="0" >否</Select.Option>
  2060. <Select.Option value="1" >是</Select.Option>
  2061. </Select>
  2062. <span>国际:</span>
  2063. <Select placeholder="国际"
  2064. style={{ width: 60 }}
  2065. value={this.state.internationalSearch}
  2066. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  2067. <Select.Option value="0" >否</Select.Option>
  2068. <Select.Option value="1" >是</Select.Option>
  2069. </Select>
  2070. <span>会员:</span>
  2071. <Select placeholder="会员等级"
  2072. style={{ width: 100 }}
  2073. value={this.state.lvlSearch}
  2074. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  2075. {this.state.lvlArrOption}
  2076. </Select>
  2077. <Select placeholder="会员状态"
  2078. style={{ width: 100 }}
  2079. value={this.state.currentMemberStatusSearch}
  2080. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  2081. {this.state.currentMemberArrOption}
  2082. </Select>
  2083. </div>
  2084. </div>
  2085. </div>
  2086. <div className="patent-table">
  2087. <Spin spinning={this.state.loading}>
  2088. <Table columns={this.state.columns}
  2089. dataSource={this.state.dataSource}
  2090. rowSelection={rowSelection}
  2091. pagination={this.state.pagination}
  2092. onRowClick={this.tableRowClick}
  2093. />
  2094. </Spin>
  2095. </div>
  2096. <Modal
  2097. className="customeDetails"
  2098. title="个人客户详情"
  2099. width='1200px'
  2100. visible={this.state.modal5Visible}
  2101. onOk={this.detailsModal}
  2102. onCancel={this.detailsModal}
  2103. footer=''
  2104. >
  2105. <Tabs onChange={this.callback} activeKey={this.state.callnub}>
  2106. <TabPane tab="基本信息" key="1">
  2107. {adminData.isSuperAdmin?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
  2108. <Spin spinning={this.state.loading}>
  2109. <div className="clearfix" >
  2110. <FormItem className="half-item"
  2111. {...formItemLayout}
  2112. label="客户姓名"
  2113. >
  2114. <span>{theInformation.identifyName}</span>
  2115. </FormItem>
  2116. </div>
  2117. <div className="clearfix" >
  2118. <FormItem className="half-item"
  2119. {...formItemLayout}
  2120. label="行业">
  2121. <Select placeholder="选择行业" value={this.state.industry} style={{width:'300px'}}
  2122. onChange={(e)=>{this.setState({industry:e})}}>
  2123. {
  2124. industry.map(function (item) {
  2125. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2126. })
  2127. }
  2128. </Select>
  2129. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2130. </FormItem>
  2131. <FormItem className="half-item"
  2132. {...formItemLayout}
  2133. label="社会属性"
  2134. >
  2135. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'300px'}}
  2136. onChange={(e)=>{this.setState({societyTag:e})}}>
  2137. {
  2138. socialAttribute.map(function (item) {
  2139. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2140. })
  2141. }
  2142. </Select>
  2143. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2144. </FormItem>
  2145. <FormItem className="half-item"
  2146. {...formItemLayout}
  2147. label="省-市-区"
  2148. >
  2149. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
  2150. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  2151. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2152. </FormItem>
  2153. <FormItem className="half-item"
  2154. {...formItemLayout}
  2155. label="出生日期"
  2156. >
  2157. {!this.state.yearMonth?<MonthPicker placeholder="选择出生年月" value={this.state.yearMonth||null} onChange={(time) => {this.setState({yearMonth: time});}}/>
  2158. :<MonthPicker value={moment(this.state.yearMonth, monthFormat)} format={monthFormat} onChange={(time) => {this.setState({yearMonth: time});}}/>
  2159. }
  2160. </FormItem>
  2161. <FormItem className="half-item"
  2162. {...formItemLayout}
  2163. label="身份证号码"
  2164. >
  2165. <Input placeholder="身份证号码" value={this.state.idNumber} onChange={(e) => {
  2166. this.setState({ idNumber: e.target.value })}}/>
  2167. </FormItem>
  2168. <FormItem className="half-item"
  2169. {...formItemLayout}
  2170. label="主要联系人"
  2171. >
  2172. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  2173. this.setState({ contacts: e.target.value })}}/>
  2174. </FormItem>
  2175. <FormItem className="half-item"
  2176. {...formItemLayout}
  2177. label="主要联系人号码"
  2178. >
  2179. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  2180. this.setState({ contactMobile: e.target.value })}}/>
  2181. </FormItem>
  2182. <FormItem className="half-item"
  2183. {...formItemLayout}
  2184. label="职称名字"
  2185. >
  2186. <Input placeholder="职称名字" value={this.state.professionalTitle} onChange={(e) => {
  2187. this.setState({ professionalTitle: e.target.value })}}/>
  2188. </FormItem>
  2189. <FormItem className="half-item"
  2190. {...formItemLayout}
  2191. label="就业单位"
  2192. >
  2193. <Input placeholder="就业单位" value={this.state.workUnit} onChange={(e) => {
  2194. this.setState({ workUnit: e.target.value })}}/>
  2195. </FormItem>
  2196. <FormItem className="half-item"
  2197. {...formItemLayout}
  2198. label="学历"
  2199. >
  2200. <Input placeholder="学历" value={this.state.education} onChange={(e) => {
  2201. this.setState({ education: e.target.value })}}/>
  2202. </FormItem>
  2203. <FormItem className="half-item"
  2204. {...formItemLayout}
  2205. label="毕业院校"
  2206. >
  2207. <Input placeholder="学历" value={this.state.graduateSchool} onChange={(e) => {
  2208. this.setState({ graduateSchool: e.target.value })}}/>
  2209. </FormItem>
  2210. <FormItem className="half-item"
  2211. {...formItemLayout}
  2212. label="专业类别"
  2213. >
  2214. <Input placeholder="专业类别" value={this.state.majorCategory} onChange={(e) => {
  2215. this.setState({ majorCategory: e.target.value })}}/>
  2216. </FormItem>
  2217. <FormItem className="half-item"
  2218. {...formItemLayout}
  2219. label="职业资格"
  2220. >
  2221. <Input placeholder="职业资格" value={this.state.qualification} onChange={(e) => {
  2222. this.setState({ qualification: e.target.value })}}/>
  2223. </FormItem>
  2224. <FormItem className="half-item"
  2225. {...formItemLayout}
  2226. label="通信地址"
  2227. >
  2228. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  2229. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  2230. </FormItem>
  2231. <FormItem className="half-item"
  2232. {...formItemLayout}
  2233. label="固定电话"
  2234. >
  2235. <Input placeholder="客户固定电话" value={this.state.fixedTel}
  2236. onChange={(e) => { this.setState({ fixedTel: e.target.value }) }}/>
  2237. </FormItem>
  2238. <FormItem className="half-item"
  2239. {...formItemLayout}
  2240. label="客户QQ"
  2241. >
  2242. <Input placeholder="客户QQ" value={this.state.qq}
  2243. onChange={(e) => { this.setState({ qq: e.target.value })}}/>
  2244. </FormItem>
  2245. <FormItem className="half-item"
  2246. {...formItemLayout}
  2247. label="电子邮箱"
  2248. >
  2249. <Input placeholder="客户电子邮箱" value={this.state.email}
  2250. onChange={(e) => {this.setState({email: e.target.value })}}/>
  2251. </FormItem>
  2252. <FormItem className="half-item"
  2253. {...formItemLayout}
  2254. label="咨询费用"
  2255. >
  2256. <Input ref='consul' placeholder="输入数字且不超过6位" value={this.state.consultationPrice}
  2257. onChange={(e) => {this.setState({consultationPrice: e.target.value })}}/>
  2258. </FormItem>
  2259. <FormItem className="half-item"
  2260. {...formItemLayout}
  2261. label="分配指定人"
  2262. >
  2263. <Select placeholder="请选择指定人" value={this.state.editSuperId} onChange={(e)=>{this.setState({editSuperId:e})}}
  2264. notFoundContent="未获取到部门员工">
  2265. {this.state.contactsOption}
  2266. </Select>
  2267. </FormItem>
  2268. <div className='clearfix'>
  2269. <FormItem
  2270. labelCol={{ span: 4 }}
  2271. wrapperCol={{ span: 18 }}
  2272. label="客户简介" >
  2273. <Input type="textarea" rows={4} value={this.state.introduction}
  2274. onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
  2275. </FormItem>
  2276. </div>
  2277. <div className="clearfix">
  2278. <FormItem className="half-item"
  2279. {...formItemLayout}
  2280. label="业务认证"
  2281. >
  2282. <Radio.Group value={this.state.businessAudit} onChange={(e) => {
  2283. this.setState({ businessAudit: e.target.value })
  2284. }}>
  2285. <Radio value={0}>未认证</Radio>
  2286. <Radio value={1}>已认证</Radio>
  2287. </Radio.Group>
  2288. </FormItem>
  2289. <FormItem className="half-item"
  2290. {...formItemLayout}
  2291. label="国际化"
  2292. >
  2293. <Radio.Group value={this.state.international} onChange={(e) => {
  2294. this.setState({ international: e.target.value })
  2295. }}>
  2296. <Radio value={0}>否</Radio>
  2297. <Radio value={1}>是</Radio>
  2298. </Radio.Group>
  2299. </FormItem>
  2300. <FormItem className="half-item"
  2301. {...formItemLayout}
  2302. label="性别"
  2303. >
  2304. <Radio.Group value={this.state.sex} onChange={(e) => {
  2305. this.setState({sex:e.target.value})
  2306. }}>
  2307. <Radio value={'男'}>男</Radio>
  2308. <Radio value={'女'}>女</Radio>
  2309. </Radio.Group>
  2310. </FormItem>
  2311. </div>
  2312. <div className="clearfix pictures">
  2313. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'60px'}}
  2314. labelCol={{ span: 8 }}
  2315. wrapperCol={{ span: 10 }}
  2316. label="身份证正面" >
  2317. <PicturesWall
  2318. pictureSign="ID"
  2319. fileList={this.getPositiveIdUrl}
  2320. pictureUrl={this.state.positiveIdUrl} />
  2321. <p>建议:图片要清晰。</p>
  2322. </FormItem>
  2323. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px'}}
  2324. labelCol={{ span: 8 }}
  2325. wrapperCol={{ span: 10 }}
  2326. label="身份证反面" >
  2327. <PicturesWall
  2328. pictureSign="ID"
  2329. fileList={this.getOppositeIdUrl}
  2330. pictureUrl={this.state.oppositeIdUrl} />
  2331. <p>建议:图片要清晰。</p>
  2332. </FormItem>
  2333. <FormItem style={{display:'inline-block' ,width:'350px',marginTop:'20px'}}
  2334. labelCol={{ span: 8 }}
  2335. wrapperCol={{ span: 10 }}
  2336. label="客户照片" >
  2337. <PicturesWall
  2338. pictureSign="portrait"
  2339. fileList={this.getHeadPortraitUrl}
  2340. pictureUrl={this.state.headPortraitUrl} />
  2341. <p>建议:图片要清晰。</p>
  2342. </FormItem>
  2343. </div>
  2344. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'146px',marginBottom:'30px'}}>保存</Button>
  2345. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  2346. </div>
  2347. </Spin>
  2348. </Form>:
  2349. <Form horizontal id="demand-form">
  2350. <Spin spinning={this.state.loading}>
  2351. <div className="clearfix" >
  2352. <FormItem className="half-item"
  2353. {...formItemLayout}
  2354. label="客户姓名"
  2355. >
  2356. <span>{theInformation.identifyName}</span>
  2357. </FormItem>
  2358. </div>
  2359. <div className="clearfix" >
  2360. <FormItem className="half-item"
  2361. {...formItemLayout}
  2362. label="行业"
  2363. >
  2364. <span>{getIndustryType(this.state.industry)}</span>
  2365. </FormItem>
  2366. <FormItem className="half-item"
  2367. {...formItemLayout}
  2368. label="社会属性"
  2369. >
  2370. <span>{getSocialAttribute(theInformation.societyTag)}</span>
  2371. </FormItem>
  2372. <FormItem className="half-item"
  2373. {...formItemLayout}
  2374. label="业务认证"
  2375. >
  2376. <span>{parseInt(this.state.businessAudit)?'已认证':'未认证'}</span>
  2377. </FormItem>
  2378. <FormItem className="half-item"
  2379. {...formItemLayout}
  2380. label="实名认证"
  2381. >
  2382. <span>{getAuditStatus(this.state.auditStatus)}</span>
  2383. </FormItem>
  2384. <FormItem className="half-item"
  2385. {...formItemLayout}
  2386. label="专家"
  2387. >
  2388. <span>{parseInt(this.state.expert)?'是':'否'}</span>
  2389. </FormItem>
  2390. <FormItem className="half-item"
  2391. {...formItemLayout}
  2392. label="明星"
  2393. >
  2394. <span>{parseInt(this.state.celebrity)?'是':'否'}</span>
  2395. </FormItem>
  2396. <FormItem className="half-item"
  2397. {...formItemLayout}
  2398. label="会员"
  2399. >
  2400. <span>{parseInt(this.state.isMember)?'是':'否'}</span>
  2401. </FormItem>
  2402. <FormItem className="half-item"
  2403. {...formItemLayout}
  2404. label="咨询师"
  2405. >
  2406. <span>{parseInt(this.state.consultant)?'是':'否'}</span>
  2407. </FormItem>
  2408. <FormItem className="half-item"
  2409. {...formItemLayout}
  2410. label="国际化"
  2411. >
  2412. <span>{parseInt(this.state.international)?'是':'否'}</span>
  2413. </FormItem>
  2414. <FormItem className="half-item"
  2415. {...formItemLayout}
  2416. label="性别"
  2417. >
  2418. <span>{this.state.sex}</span>
  2419. </FormItem>
  2420. <FormItem className="half-item"
  2421. {...formItemLayout}
  2422. label="出生日期"
  2423. >
  2424. <span>{this.state.yearMonth}</span>
  2425. </FormItem>
  2426. <FormItem className="half-item"
  2427. {...formItemLayout}
  2428. label="身份证号码"
  2429. >
  2430. <span>{theInformation.legalPersonIdCard}</span>
  2431. </FormItem>
  2432. <FormItem className="half-item"
  2433. {...formItemLayout}
  2434. label="主要联系人"
  2435. >
  2436. <span>{theInformation.contacts}</span>
  2437. </FormItem>
  2438. <FormItem className="half-item"
  2439. {...formItemLayout}
  2440. label="主要联系人号码"
  2441. >
  2442. <span>{theInformation.contactMobile}</span>
  2443. </FormItem>
  2444. <FormItem className="half-item"
  2445. {...formItemLayout}
  2446. label="省-市-区"
  2447. >
  2448. <span>{this.state.proviceCityArea}</span>
  2449. </FormItem>
  2450. <FormItem className="half-item"
  2451. {...formItemLayout}
  2452. label="投资机构"
  2453. >
  2454. <span>{this.state.investment?'是':'否'}</span>
  2455. </FormItem>
  2456. <FormItem className="half-item"
  2457. {...formItemLayout}
  2458. label="职称名字"
  2459. >
  2460. <span>{this.state.professionalTitle}</span>
  2461. </FormItem>
  2462. <FormItem className="half-item"
  2463. {...formItemLayout}
  2464. label="就业单位"
  2465. >
  2466. <span>{this.state.workUnit}</span>
  2467. </FormItem>
  2468. <FormItem className="half-item"
  2469. {...formItemLayout}
  2470. label="学历"
  2471. >
  2472. <span>{this.state.education}</span>
  2473. </FormItem>
  2474. <FormItem className="half-item"
  2475. {...formItemLayout}
  2476. label="毕业院校"
  2477. >
  2478. <span>{this.state.graduateSchool}</span>
  2479. </FormItem>
  2480. <FormItem className="half-item"
  2481. {...formItemLayout}
  2482. label="专业类别"
  2483. >
  2484. <span>{this.state.majorCategory}</span>
  2485. </FormItem>
  2486. <FormItem className="half-item"
  2487. {...formItemLayout}
  2488. label="职业资格"
  2489. >
  2490. <span>{this.state.qualification}</span>
  2491. </FormItem>
  2492. <FormItem className="half-item"
  2493. {...formItemLayout}
  2494. label="通信地址"
  2495. >
  2496. <span>{theInformation.postalAddress}</span>
  2497. </FormItem>
  2498. <FormItem className="half-item"
  2499. {...formItemLayout}
  2500. label="手机号码"
  2501. >
  2502. <span>{theInformation.modile}</span>
  2503. </FormItem>
  2504. <FormItem className="half-item"
  2505. {...formItemLayout}
  2506. label="客户传真"
  2507. >
  2508. <span>{theInformation.contactsFax}</span>
  2509. </FormItem>
  2510. <FormItem className="half-item"
  2511. {...formItemLayout}
  2512. label="固定电话"
  2513. >
  2514. <span>{theInformation.contactsFixedTel}</span>
  2515. </FormItem>
  2516. <FormItem className="half-item"
  2517. {...formItemLayout}
  2518. label="客户QQ"
  2519. >
  2520. <span>{theInformation.qq}</span>
  2521. </FormItem>
  2522. <FormItem className="half-item"
  2523. {...formItemLayout}
  2524. label="电子邮箱"
  2525. >
  2526. <span>{theInformation.email}</span>
  2527. </FormItem>
  2528. <FormItem className="half-item"
  2529. {...formItemLayout}
  2530. label="咨询费用"
  2531. >
  2532. <span>{theInformation.consultationPrice}</span>
  2533. </FormItem>
  2534. <div className='clearfix'>
  2535. <FormItem
  2536. labelCol={{ span: 4 }}
  2537. wrapperCol={{ span: 18 }}
  2538. label="客户简介" >
  2539. <span>{theInformation.introduction}</span>
  2540. </FormItem>
  2541. </div>
  2542. <div className="clearfix pictures">
  2543. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'60px'}}
  2544. labelCol={{ span: 8 }}
  2545. wrapperCol={{ span: 10 }}
  2546. label="身份证正面" >
  2547. <div className="clearfix">
  2548. <Upload className="demandDetailShow-upload"
  2549. listType="picture-card"
  2550. fileList={this.state.orgCodeUrl}
  2551. onPreview={(file) => {
  2552. this.setState({
  2553. previewImage: file.url || file.thumbUrl,
  2554. previewVisible: true,
  2555. });
  2556. }} >
  2557. </Upload>
  2558. <Modal maskClosable={false} footer={null}
  2559. visible={this.state.previewVisible}
  2560. onCancel={() => { this.setState({ previewVisible: false }) }}>
  2561. <img alt="" style={{ width: '100%' }} src={this.state.orgCodeUrl || ''} />
  2562. </Modal>
  2563. </div>
  2564. </FormItem>
  2565. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px'}}
  2566. labelCol={{ span: 8 }}
  2567. wrapperCol={{ span: 10 }}
  2568. label="身份证反面" >
  2569. <div className="clearfix">
  2570. <Upload className="demandDetailShow-upload"
  2571. listType="picture-card"
  2572. fileList={this.state.companyLogoUrl}
  2573. onPreview={(file) => {
  2574. this.setState({
  2575. previewImage: file.url || file.thumbUrl,
  2576. previewVisible: true,
  2577. });
  2578. }} >
  2579. </Upload>
  2580. <Modal maskClosable={false} footer={null}
  2581. visible={this.state.previewVisible}
  2582. onCancel={() => { this.setState({ previewVisible: false }) }}>
  2583. <img alt="" style={{ width: '100%' }} src={this.state.companyLogoUrl || ''} />
  2584. </Modal>
  2585. </div>
  2586. </FormItem>
  2587. <FormItem style={{display:'inline-block' ,width:'350px',marginTop:'20px'}}
  2588. labelCol={{ span: 8 }}
  2589. wrapperCol={{ span: 10 }}
  2590. label="客户照片" >
  2591. <div className="clearfix">
  2592. <Upload className="demandDetailShow-upload"
  2593. listType="picture-card"
  2594. fileList={this.state.companyLogoUrls}
  2595. onPreview={(file) => {
  2596. this.setState({
  2597. previewImage: file.url || file.thumbUrl,
  2598. previewVisible: true,
  2599. });
  2600. }} >
  2601. </Upload>
  2602. <Modal maskClosable={false} footer={null}
  2603. visible={this.state.previewVisible}
  2604. onCancel={() => { this.setState({ previewVisible: false }) }}>
  2605. <img alt="" style={{ width: '100%' }} src={this.state.companyLogoUrls || ''} />
  2606. </Modal>
  2607. </div>
  2608. </FormItem>
  2609. </div>
  2610. </div>
  2611. </Spin>
  2612. </Form>
  2613. }
  2614. </TabPane>
  2615. <TabPane tab="联系人信息" key="2">
  2616. <div className="clearfix" style={{display:adminData.isSuperAdmin?'block':'none'}}>
  2617. <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button>
  2618. </div>
  2619. <div className="clearfix">
  2620. <Spin spinning={this.state.loading}>
  2621. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  2622. <Table
  2623. pagination={false}
  2624. columns={this.state.ContactsLists}
  2625. dataSource={this.state.contactList}
  2626. />
  2627. <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
  2628. <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
  2629. <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
  2630. </div>
  2631. </Form>
  2632. </Spin>
  2633. </div>
  2634. </TabPane>
  2635. <TabPane tab="账户信息" key="3">
  2636. <div className="clearfix">
  2637. {adminData.isSuperAdmin?<Form horizontal id="demand-form" onSubmit={this.accountSave} >
  2638. <Spin spinning={this.state.loading} >
  2639. <FormItem className="half-item"
  2640. {...formItemLayout}
  2641. label="注册手机号" >
  2642. <Input value={this.state.mobile} disabled
  2643. onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  2644. <Button onClick={this.modifyPassworld}>修改密码</Button>
  2645. </FormItem>
  2646. <FormItem className="half-item"
  2647. {...formItemLayout}
  2648. label="注册用户名" >
  2649. <Input value={this.state.nickname} onChange={(e) => { this.setState({ nickname: e.target.value }); }} />
  2650. </FormItem>
  2651. <FormItem className="half-item"
  2652. {...formItemLayout}
  2653. label="注册邮箱" >
  2654. <Input value={this.state.email} onChange={(e) => { this.setState({ email: e.target.value }); }} />
  2655. </FormItem>
  2656. <div className="clearfix">
  2657. <FormItem className="half-item"
  2658. {...formItemLayout}
  2659. label="客户来源" >
  2660. <span>{this.state.source}</span>
  2661. </FormItem>
  2662. <FormItem className="half-item"
  2663. {...formItemLayout}
  2664. label="客户类型" >
  2665. <span>{this.state.type}</span>
  2666. </FormItem>
  2667. <FormItem className="half-item"
  2668. {...formItemLayout}
  2669. label="创建时间" >
  2670. <span>{this.state.createTimes}</span>
  2671. </FormItem>
  2672. <FormItem className="half-item"
  2673. {...formItemLayout}
  2674. label="账户状态"
  2675. >
  2676. <Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  2677. {
  2678. statuslist.map(function (item) {
  2679. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2680. })
  2681. }
  2682. </Select>
  2683. </FormItem>
  2684. </div>
  2685. <div className="clearfix">
  2686. <FormItem className="half-item"
  2687. {...formItemLayout}
  2688. label="会员"
  2689. >
  2690. <Radio.Group value={this.state.isMember} onChange={(e) => {
  2691. this.setState({ isMember: e.target.value })
  2692. }}>
  2693. <Radio value={0}>否</Radio>
  2694. <Radio value={1}>是</Radio>
  2695. </Radio.Group>
  2696. </FormItem>
  2697. <FormItem className="half-item"
  2698. {...formItemLayout}
  2699. label="会员等级"
  2700. >
  2701. <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  2702. {
  2703. lvl.map(function (item) {
  2704. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2705. })
  2706. }
  2707. </Select>
  2708. </FormItem>
  2709. <FormItem className="half-item"
  2710. {...formItemLayout}
  2711. label="会员状态"
  2712. >
  2713. <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  2714. {
  2715. currentMember.map(function (item) {
  2716. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2717. })
  2718. }
  2719. </Select>
  2720. </FormItem>
  2721. </div>
  2722. <div className="clearfix">
  2723. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  2724. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  2725. </div>
  2726. </Spin>
  2727. </Form> :
  2728. <Form horizontal id="demand-form" >
  2729. <Spin spinning={this.state.loading} >
  2730. <FormItem className="half-item"
  2731. {...formItemLayout}
  2732. label="注册手机号" >
  2733. <span>{this.state.mobile}</span>
  2734. </FormItem>
  2735. <FormItem className="half-item"
  2736. {...formItemLayout}
  2737. label="注册用户名" >
  2738. <span>{this.state.nickname}</span>
  2739. </FormItem>
  2740. <FormItem className="half-item"
  2741. {...formItemLayout}
  2742. label="注册邮箱" >
  2743. <span>{this.state.email}</span>
  2744. </FormItem>
  2745. <div className="clearfix">
  2746. <FormItem className="half-item"
  2747. {...formItemLayout}
  2748. label="客户来源" >
  2749. <span>{this.state.source}</span>
  2750. </FormItem>
  2751. <FormItem className="half-item"
  2752. {...formItemLayout}
  2753. label="客户类型" >
  2754. <span>{this.state.type}</span>
  2755. </FormItem>
  2756. <FormItem className="half-item"
  2757. {...formItemLayout}
  2758. label="创建时间" >
  2759. <span>{this.state.createTimes}</span>
  2760. </FormItem>
  2761. <FormItem className="half-item"
  2762. {...formItemLayout}
  2763. label="账户状态"
  2764. >
  2765. <span>{getStatuslist(this.state.status)}</span>
  2766. </FormItem>
  2767. </div>
  2768. <div className="clearfix">
  2769. <FormItem className="half-item"
  2770. {...formItemLayout}
  2771. label="专家"
  2772. >
  2773. <span>{this.state.isMembers?'是':'否'}</span>
  2774. </FormItem>
  2775. <FormItem className="half-item"
  2776. {...formItemLayout}
  2777. label="明星"
  2778. >
  2779. <span>{this.state.star?'是':'否'}</span>
  2780. </FormItem>
  2781. <FormItem className="half-item"
  2782. {...formItemLayout}
  2783. label="会员"
  2784. >
  2785. <span>{this.state.isMember?'是':'否'}</span>
  2786. </FormItem>
  2787. <FormItem className="half-item"
  2788. {...formItemLayout}
  2789. label="会员等级"
  2790. >
  2791. <span>{getLvl(this.state.lvl)}</span>
  2792. </FormItem>
  2793. <FormItem className="half-item"
  2794. {...formItemLayout}
  2795. label="会员状态"
  2796. >
  2797. <span>{getCurrentMember(this.state.currentMemberStatus)}</span>
  2798. </FormItem>
  2799. </div>
  2800. <FormItem className="half-item"
  2801. {...formItemLayout}
  2802. label="业务认证"
  2803. >
  2804. <span>{this.state.serviceCertification?'已认证':'未认证'}</span>
  2805. </FormItem>
  2806. <FormItem className="half-item"
  2807. {...formItemLayout}
  2808. label="实名认证"
  2809. >
  2810. <span>{getAuditStatus(this.state.userCertification)}</span>
  2811. </FormItem>
  2812. </Spin>
  2813. </Form>
  2814. }
  2815. </div>
  2816. </TabPane>
  2817. <TabPane tab="客户拜访" key="4">
  2818. <div className="clearfix">
  2819. <Spin spinning={this.state.loading}>
  2820. <Table
  2821. pagination={false}
  2822. columns={this.state.visitsList}
  2823. dataSource={this.state.visitArrList}
  2824. onRowClick={this.VisitRowClick}
  2825. />
  2826. </Spin>
  2827. </div>
  2828. </TabPane>
  2829. <TabPane tab="业务意向" key="5">
  2830. <div className="clearfix">
  2831. <Spin spinning={this.state.loading}>
  2832. <Table
  2833. pagination={this.state.paginationt}
  2834. columns={this.state.businessIntentionList}
  2835. dataSource={this.state.dataBusiness}
  2836. />
  2837. </Spin>
  2838. </div>
  2839. </TabPane>
  2840. <TabPane tab="业务订单" key="6">
  2841. </TabPane>
  2842. <TabPane tab="技术需求" key="7">
  2843. </TabPane>
  2844. <TabPane tab="技术成果" key="8">
  2845. </TabPane>
  2846. <TabPane tab="技术专家" key="9">
  2847. </TabPane>
  2848. </Tabs>
  2849. </Modal>
  2850. <Modal
  2851. className="customeDetails"
  2852. footer=''
  2853. title="拜访详情"
  2854. width='1000px'
  2855. visible={this.state.visitModul}
  2856. onOk={this.visitOk}
  2857. onCancel={this.visitCancel}
  2858. >
  2859. <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
  2860. {adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
  2861. <div className="clearfix">
  2862. <FormItem className="half-item"
  2863. {...formItemLayout}
  2864. label="拜访方式" >
  2865. <Radio.Group value={this.state.contactType} onChange={(e) => {
  2866. this.setState({ contactType: e.target.value })
  2867. }}>
  2868. <Radio value={0}>外出</Radio>
  2869. <Radio value={1}>电话</Radio>
  2870. <Radio value={2}>QQ</Radio>
  2871. <Radio value={3}>微信</Radio>
  2872. <Radio value={4}>邮箱</Radio>
  2873. </Radio.Group>
  2874. </FormItem>
  2875. <FormItem className="half-item"
  2876. {...formItemLayout}
  2877. >
  2878. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
  2879. </FormItem>
  2880. <div className="clearfix">
  2881. <FormItem className="half-item"
  2882. {...formItemLayout}
  2883. label="客户姓名"
  2884. >
  2885. <span>{this.state.identifyName}</span>
  2886. </FormItem>
  2887. <FormItem className="half-item"
  2888. {...formItemLayout}
  2889. label="拜访人"
  2890. >
  2891. <span>{this.state.adminName}</span>
  2892. </FormItem>
  2893. <FormItem className="half-item"
  2894. {...formItemLayout}
  2895. label="当前联系人"
  2896. >
  2897. <span>{this.state.contacts}</span>
  2898. </FormItem>
  2899. {this.state.contacts?<span></span>:
  2900. <FormItem className="half-item"
  2901. {...formItemLayout}
  2902. label="联系人"
  2903. >
  2904. <Select placeholder="选择联系人" style={{ width: 140 }}
  2905. value={this.state.lastName}
  2906. onChange={this.hundleName}>
  2907. {this.state.orderStatusOption}
  2908. </Select>
  2909. </FormItem>
  2910. }
  2911. <FormItem className="half-item"
  2912. {...formItemLayout}
  2913. label="拜访时间"
  2914. >
  2915. <span>{this.state.followTime}</span>
  2916. </FormItem>
  2917. <FormItem className="half-item"
  2918. {...formItemLayout}
  2919. label="联系电话"
  2920. >
  2921. <span>{this.state.nub}</span>
  2922. </FormItem>
  2923. </div>
  2924. <div className="clearfix">
  2925. <FormItem
  2926. labelCol={{ span: 4 }}
  2927. wrapperCol={{ span: 16 }}
  2928. label="拜访备注" >
  2929. <Input type="textarea" rows={4} value={this.state.result}
  2930. onChange={(e)=>{this.setState({result:e.target.value})}}/>
  2931. </FormItem>
  2932. </div>
  2933. <div className="clearfix">
  2934. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  2935. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2936. <Spin spinning={this.state.loading}>
  2937. <Table
  2938. rowKey={record => record.id}
  2939. pagination={false}
  2940. columns={this.state.intentionList}
  2941. dataSource={this.state.data}
  2942. />
  2943. </Spin>
  2944. </div>
  2945. </div>
  2946. </div>
  2947. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
  2948. <Button size="large" onClick={this.visitCancel}>取消</Button>
  2949. </Spin>:<Spin spinning={this.state.loading}>
  2950. <div className="clearfix">
  2951. <FormItem className="half-item"
  2952. {...formItemLayout}
  2953. label="拜访方式" >
  2954. <span>{getContactType(String(this.state.contactType))}</span>
  2955. </FormItem>
  2956. <div className="clearfix">
  2957. <FormItem className="half-item"
  2958. {...formItemLayout}
  2959. label="客户姓名"
  2960. >
  2961. <span>{this.state.identifyName}</span>
  2962. </FormItem>
  2963. <FormItem className="half-item"
  2964. {...formItemLayout}
  2965. label="拜访人"
  2966. >
  2967. <span>{this.state.adminName}</span>
  2968. </FormItem>
  2969. <FormItem className="half-item"
  2970. {...formItemLayout}
  2971. label="当前联系人"
  2972. >
  2973. <span>{this.state.contacts}</span>
  2974. </FormItem>
  2975. <FormItem className="half-item"
  2976. {...formItemLayout}
  2977. label="拜访时间"
  2978. >
  2979. <span>{this.state.followTime}</span>
  2980. </FormItem>
  2981. <FormItem className="half-item"
  2982. {...formItemLayout}
  2983. label="联系电话"
  2984. >
  2985. <span>{this.state.nub}</span>
  2986. </FormItem>
  2987. </div>
  2988. <div className="clearfix">
  2989. <FormItem
  2990. labelCol={{ span: 4 }}
  2991. wrapperCol={{ span: 16 }}
  2992. label="拜访备注" >
  2993. <span>{this.state.result}</span>
  2994. </FormItem>
  2995. </div>
  2996. <div className="clearfix">
  2997. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2998. <Spin spinning={this.state.loading}>
  2999. <Table
  3000. rowKey={record => record.id}
  3001. pagination={false}
  3002. columns={this.state.intentionList}
  3003. dataSource={this.state.data}
  3004. />
  3005. </Spin>
  3006. </div>
  3007. </div>
  3008. </div>
  3009. </Spin>}
  3010. </Form>
  3011. </Modal>
  3012. <Modal
  3013. footer=''
  3014. title="修改密码"
  3015. width='600px'
  3016. visible={this.state.passworldModul}
  3017. onOk={this.passworldOk}
  3018. onCancel={this.passworldCancel}
  3019. >
  3020. <div className="clearfix">
  3021. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  3022. <Spin spinning={this.state.loading}>
  3023. <div className="clearfix">
  3024. <FormItem className="half-item"
  3025. {...formItemLayout}
  3026. label="原密码" >
  3027. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  3028. </FormItem>
  3029. </div>
  3030. <div className="clearfix">
  3031. <FormItem className="half-item"
  3032. {...formItemLayout}
  3033. label="新密码" >
  3034. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
  3035. </FormItem>
  3036. </div>
  3037. <div className="clearfix">
  3038. <FormItem className="half-item"
  3039. {...formItemLayout}
  3040. label="确认密码" >
  3041. <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  3042. </FormItem>
  3043. </div>
  3044. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  3045. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  3046. </Spin>
  3047. </Form>
  3048. </div>
  3049. </Modal>
  3050. <Modal
  3051. footer=''
  3052. width='800px'
  3053. title="新增联系人"
  3054. visible={this.state.addcontactModul}
  3055. onOk={this.addcontactModulOK}
  3056. onCancel={this.addcontactModulcancel}
  3057. >
  3058. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  3059. <Spin spinning={this.state.loading}>
  3060. <Row>
  3061. <FormItem
  3062. labelCol={{ span: 3 }}
  3063. wrapperCol={{ span: 14 }}
  3064. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  3065. <Radio.Group value={this.state.newsex} onChange={(e) => {
  3066. this.setState({ newsex: e.target.value })
  3067. }}>
  3068. <Radio value='男'>男</Radio>
  3069. <Radio value='女'>女</Radio>
  3070. </Radio.Group>
  3071. </FormItem>
  3072. </Row>
  3073. <Row style={{ paddingLeft:'50px' }}>
  3074. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  3075. <Col span={8}>
  3076. <Input value={this.state.newname} required="required"
  3077. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  3078. </Col>
  3079. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  3080. <Col span={8}>
  3081. <Input value={this.state.newmobile} required="required"
  3082. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  3083. </Col>
  3084. </Row>
  3085. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  3086. <Col span={2}>微信:</Col>
  3087. <Col span={8}>
  3088. <Input value={this.state.newwechat}
  3089. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  3090. </Col>
  3091. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  3092. <Col span={8}>
  3093. <Input value={this.state.newqq}
  3094. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  3095. </Col>
  3096. </Row>
  3097. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  3098. <Col span={2}>部门:</Col>
  3099. <Col span={8}>
  3100. <Input value={this.state.newdepatrment}
  3101. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  3102. </Col>
  3103. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  3104. <Col span={8}>
  3105. <Input value={this.state.newposition}
  3106. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  3107. </Col>
  3108. </Row>
  3109. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  3110. <Col span={2}>邮箱:</Col>
  3111. <Col span={8}>
  3112. <Input value={this.state.newemail}
  3113. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  3114. </Col>
  3115. </Row>
  3116. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  3117. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  3118. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  3119. </Row>
  3120. </Spin>
  3121. </Form>
  3122. </Modal>
  3123. <Modal
  3124. footer=''
  3125. title="业务意向详情"
  3126. width='1000px'
  3127. visible={this.state.businessModul}
  3128. onOk={this.businessIntentionOk}
  3129. onCancel={this.businessIntentionCancel}
  3130. >
  3131. <div className="clearfix">
  3132. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  3133. <Spin spinning={this.state.loading}>
  3134. <div className="clearfix">
  3135. <FormItem className="half-item"
  3136. {...formItemLayout}
  3137. label="意向业务名称" >
  3138. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  3139. </FormItem>
  3140. <FormItem className="half-item"
  3141. {...formItemLayout}
  3142. label="意向时间" >
  3143. <span>{this.state.createTime}</span>
  3144. </FormItem>
  3145. <FormItem className="half-item"
  3146. {...formItemLayout}
  3147. label="客户姓名" >
  3148. <span>{this.state.identifyName}</span>
  3149. </FormItem>
  3150. <FormItem className="half-item"
  3151. {...formItemLayout}
  3152. label="营销员" >
  3153. <span>{this.state.adminName}</span>
  3154. </FormItem>
  3155. <FormItem className="half-item"
  3156. {...formItemLayout}
  3157. label="意向业务进度" >
  3158. <span>{getfllowSituation(this.state.followSituation)}</span>
  3159. </FormItem>
  3160. <FormItem className="half-item"
  3161. {...formItemLayout}
  3162. label="业务客户状态" >
  3163. <span>{getcustomerStatue(this.state.customerStatus)}</span>
  3164. </FormItem>
  3165. </div>
  3166. <div className="clearfix">
  3167. <FormItem className="half-item"
  3168. {...formItemLayout}
  3169. label="业务意向说明" >
  3170. <span>{this.state.remarks}</span>
  3171. </FormItem>
  3172. </div>
  3173. <div className="clearfix">
  3174. <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
  3175. <div className="clearfix">
  3176. <Spin spinning={this.state.loading}>
  3177. <Table
  3178. pagination={this.state.paginations}
  3179. columns={this.state.businessFollowList}
  3180. dataSource={this.state.visitArrList}
  3181. />
  3182. </Spin>
  3183. </div>
  3184. </div>
  3185. </Spin>
  3186. </Form>
  3187. </div>
  3188. </Modal>
  3189. <Modal
  3190. footer=''
  3191. title="业务跟进详情"
  3192. width='600px'
  3193. visible={this.state.businessFollowModul}
  3194. onOk={this.businessFollowOk}
  3195. onCancel={this.businessFollowCancel}
  3196. >
  3197. <div className="clearfix">
  3198. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  3199. <Spin spinning={this.state.loading}>
  3200. <div className="clearfix">
  3201. <FormItem className="half-item"
  3202. {...formItemLayout}
  3203. label="意向业务名称" >
  3204. <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
  3205. </FormItem>
  3206. <FormItem className="half-item"
  3207. {...formItemLayout}
  3208. label="意向时间" >
  3209. <span>{this.state.createTimes}</span>
  3210. </FormItem>
  3211. <FormItem className="half-item"
  3212. {...formItemLayout}
  3213. label="客户姓名" >
  3214. <span>{this.state.identifyNames}</span>
  3215. </FormItem>
  3216. <FormItem className="half-item"
  3217. {...formItemLayout}
  3218. label="营销员" >
  3219. <span>{this.state.adminNames}</span>
  3220. </FormItem>
  3221. <FormItem className="half-item"
  3222. {...formItemLayout}
  3223. label="意向业务进度" >
  3224. <span>{getfllowSituation(this.state.followSituations)}</span>
  3225. </FormItem>
  3226. <FormItem className="half-item"
  3227. {...formItemLayout}
  3228. label="业务客户状态" >
  3229. <span>{getcustomerStatue(this.state.customerStatuss)}</span>
  3230. </FormItem>
  3231. </div>
  3232. <div className="clearfix">
  3233. <FormItem className="half-item"
  3234. {...formItemLayout}
  3235. label="业务意向说明" >
  3236. <span>{this.state.remarkss}</span>
  3237. </FormItem>
  3238. </div>
  3239. <div className="clearfix">
  3240. <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
  3241. <FormItem className="half-item"
  3242. {...formItemLayout}
  3243. label="拜访方式" >
  3244. <span>{getContactType(this.state.contactTypes)}</span>
  3245. </FormItem>
  3246. <FormItem className="half-item"
  3247. {...formItemLayout}
  3248. label="联系人" >
  3249. <span>{this.state.contactss}</span>
  3250. </FormItem>
  3251. <FormItem className="half-item"
  3252. {...formItemLayout}
  3253. label="联系电话" >
  3254. <span>{this.state.contactMobiles}</span>
  3255. </FormItem>
  3256. <FormItem className="half-item"
  3257. {...formItemLayout}
  3258. label="拜访时间" >
  3259. <span>{this.state.followTimes}</span>
  3260. </FormItem>
  3261. <FormItem className="half-item"
  3262. {...formItemLayout}
  3263. label="拜访人" >
  3264. <span>{this.state.adminNames}</span>
  3265. </FormItem>
  3266. <div className="clearfix">
  3267. <FormItem className="half-item"
  3268. {...formItemLayout}
  3269. label="拜访备注" >
  3270. <span>{this.state.results}</span>
  3271. </FormItem>
  3272. </div>
  3273. </div>
  3274. </Spin>
  3275. </Form>
  3276. </div>
  3277. </Modal>
  3278. </div >
  3279. );
  3280. }
  3281. }));
  3282. //图片组件
  3283. const PicturesWalls = React.createClass({
  3284. getInitialState() {
  3285. return {
  3286. previewVisible: false,
  3287. previewImage: '',
  3288. fileList: [],
  3289. }
  3290. },
  3291. handleCancel() {
  3292. this.setState({ previewVisible: false })
  3293. },
  3294. handlePreview(file) {
  3295. this.setState({
  3296. previewImage: file.url || file.thumbUrl,
  3297. previewVisible: true,
  3298. });
  3299. },
  3300. handleChange(info) {
  3301. let fileList = info.fileList;
  3302. this.setState({ fileList });
  3303. this.props.fileList(fileList);
  3304. },
  3305. componentWillReceiveProps(nextProps) {
  3306. this.state.fileList = nextProps.pictureUrl;
  3307. },
  3308. render() {
  3309. const { previewVisible, previewImage, fileList } = this.state;
  3310. const uploadButton = (
  3311. <div>
  3312. <Icon type="plus" />
  3313. <div className="ant-upload-text">点击上传</div>
  3314. </div>
  3315. );
  3316. return(
  3317. <div style={{display:"inline-block"}}>
  3318. <Upload
  3319. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  3320. data={{ 'sign': '' }}
  3321. listType="picture-card"
  3322. fileList={fileList}
  3323. onPreview={this.handlePreview}
  3324. onChange={this.handleChange} >
  3325. {fileList.length >= 1 ? null : uploadButton}
  3326. </Upload>
  3327. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  3328. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  3329. </Modal>
  3330. </div>
  3331. );
  3332. }
  3333. });
  3334. const PublicCustomer = Form.create()(React.createClass({
  3335. //获取分配人员
  3336. selectSuperId() {
  3337. this.state.data = []
  3338. $.ajax({
  3339. method: "post",
  3340. dataType: "json",
  3341. crossDomain: false,
  3342. url: globalConfig.context + "/api/admin/customer/findAdminName",
  3343. data:{
  3344. },
  3345. success: function (data) {
  3346. let theArr = [];
  3347. let thedata=data.data;
  3348. if (!thedata) {
  3349. if (data.error && data.error.length) {
  3350. message.warning(data.error[0].message);
  3351. };
  3352. thedata = {};
  3353. };
  3354. var contactIds=[];
  3355. //for (let item in data.data) {
  3356. for(var i=0;i<data.data.length;i++){
  3357. let theData = data.data[i];
  3358. theArr.push(
  3359. <Select.Option value={i.toString()} key={theData.adminName}>{theData.adminName}</Select.Option>
  3360. );
  3361. };
  3362. this.setState({
  3363. SuperArr:thedata,
  3364. contactsOption: theArr,
  3365. orderStatusOptions:data.data,
  3366. });
  3367. }.bind(this),
  3368. }).always(function () {
  3369. this.setState({
  3370. loading: false
  3371. });
  3372. }.bind(this));
  3373. },
  3374. loadData(pageNo) {
  3375. this.state.data = [];
  3376. this.setState({
  3377. loading: true
  3378. });
  3379. $.ajax({
  3380. method: "post",
  3381. dataType: "json",
  3382. crossDomain: false,
  3383. url: globalConfig.context + '/api/admin/customer/listPublicOrganizationCustomer',
  3384. data: {
  3385. pageNo: pageNo || 1,
  3386. pageSize: this.state.pagination.pageSize,
  3387. type: this.state.typeSearch, //名称1
  3388. name: this.state.nameSearch,
  3389. shareType: this.state.shareTypeSearch,
  3390. province: (this.state.addressSearch).length ? this.state.addressSearch[0] : this.state.provinceSearch,
  3391. city: (this.state.addressSearch).length ? this.state.addressSearch[1] : '',
  3392. //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
  3393. status: this.state.statusSearch,
  3394. industry: this.state.industrySearch,
  3395. businessAudit: this.state.serviceCertificationSearch,
  3396. auditStatus: this.state.userCertificationSearch,
  3397. currentMemberStatus: this.state.currentMemberStatusSearch,
  3398. international: this.state.internationalSearch,
  3399. lvl: this.state.lvlSearch,
  3400. international: this.state.internationalSearch,
  3401. societyTag: this.state.societyTagSearch,
  3402. listed: this.state.listedSearch, //是否上市
  3403. highTechZone: this.state.highTechZoneSearch, //是否高新
  3404. startDate: this.state.releaseDate[0],
  3405. endDate: this.state.releaseDate[1],
  3406. },
  3407. success: function(data) {
  3408. let theArr = [];
  3409. if(data.error.length || data.data.list == "") {
  3410. if(data.error && data.error.length) {
  3411. message.warning(data.error[0].message);
  3412. };
  3413. } else {
  3414. for(let i = 0; i < data.data.list.length; i++) {
  3415. let thisdata = data.data.list[i];
  3416. theArr.push({
  3417. key: i,
  3418. id: thisdata.uid,
  3419. type: thisdata.type,
  3420. name: thisdata.name,
  3421. status: thisdata.status,
  3422. contacts: thisdata.contacts,
  3423. contactMobile: thisdata.contactMobile,
  3424. industry: thisdata.industry,
  3425. createTime: thisdata.createTime,
  3426. businessAudit: thisdata.businessAudit,
  3427. auditStatus: thisdata.auditStatus,
  3428. lvl: thisdata.lvl,
  3429. shareType: thisdata.shareType,
  3430. societyTag: thisdata.societyTag,
  3431. currentMemberStatus: thisdata.currentMemberStatus,
  3432. international: thisdata.international,
  3433. listed: thisdata.listed,
  3434. adminName: thisdata.adminName,
  3435. highTechZone: thisdata.highTechZone,
  3436. locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
  3437. });
  3438. };
  3439. this.state.pagination.current = data.data.pageNo;
  3440. this.state.pagination.total = data.data.totalCount;
  3441. };
  3442. if(!data.data.list.length){
  3443. this.state.pagination.current=0;
  3444. this.state.pagination.total=0;
  3445. }
  3446. this.setState({
  3447. dataSource: theArr,
  3448. pagination: this.state.pagination,
  3449. selectedRowKeys:[]
  3450. });
  3451. }.bind(this),
  3452. }).always(function() {
  3453. this.setState({
  3454. loading: false
  3455. });
  3456. }.bind(this));
  3457. },
  3458. //点击出现函数
  3459. setModal2VisibleOk(e) {
  3460. this.setState({
  3461. modal2Visible: true
  3462. });
  3463. },
  3464. //点击消失函数
  3465. setModal2Visiblecancel(e) {
  3466. this.setState({
  3467. modal2Visible: false
  3468. });
  3469. },
  3470. getPictureUrl(e) {
  3471. this.setState({ pictureUrl: e });
  3472. },
  3473. handleOk(e) {
  3474. this.setState({
  3475. visible: false,
  3476. });
  3477. },
  3478. handleCancel(e) {
  3479. this.setState({
  3480. visible: false,
  3481. });
  3482. },
  3483. getInitialState() {
  3484. return {
  3485. addressSearch: [],
  3486. orgCodeUrl: [],
  3487. companyLogoUrl: [],
  3488. visible: false,
  3489. searchMore: true,
  3490. releaseDate: [],
  3491. releaseDate: [],
  3492. selectedRowKeys: [],
  3493. selectedRowKey: [],
  3494. selectedRows: [],
  3495. loading: false,
  3496. pagination: {
  3497. defaultCurrent: 1,
  3498. defaultPageSize: 10,
  3499. showQuickJumper: true,
  3500. pageSize: 10,
  3501. onChange: function(page) {
  3502. this.loadData(page);
  3503. }.bind(this),
  3504. showTotal: function(total) {
  3505. return '共' + total + '条数据';
  3506. }
  3507. },
  3508. paginations: {
  3509. defaultCurrent: 1,
  3510. defaultPageSize: 10,
  3511. showQuickJumper: true,
  3512. pageSize: 10,
  3513. onChange: function(page) {
  3514. this.loadVisit(page);
  3515. }.bind(this),
  3516. showTotal: function(total) {
  3517. return '共' + total + '条数据';
  3518. }
  3519. },
  3520. paginationsy: {
  3521. defaultCurrent: 1,
  3522. defaultPageSize: 10,
  3523. showQuickJumper: true,
  3524. pageSize: 10,
  3525. onChange: function(page) {
  3526. this.loadBfVisit(page, false);
  3527. }.bind(this),
  3528. showTotal: function(total) {
  3529. return '共' + total + '条数据';
  3530. }
  3531. },
  3532. paginationt: {
  3533. defaultCurrent: 1,
  3534. defaultPageSize: 10,
  3535. showQuickJumper: true,
  3536. pageSize: 10,
  3537. onChange: function(page) {
  3538. this.BusinessList(page, false);
  3539. }.bind(this),
  3540. showTotal: function(total) {
  3541. return '共' + total + '条数据';
  3542. }
  3543. },
  3544. //业务意向列表
  3545. intentionList: [{
  3546. title: '业务名称',
  3547. dataIndex: 'businessGlossoryId',
  3548. key: 'businessGlossoryId',
  3549. render: (text, record, index) => {
  3550. return adminData.isSuperAdmin ? <Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
  3551. {
  3552. intentionalService.map(function (item) {
  3553. return <Select.Option key={item.value} >{item.key}</Select.Option>
  3554. })
  3555. }
  3556. </Select> : <span>{getCompanyIntention(text)}</span>
  3557. }
  3558. },
  3559. {
  3560. title: '最新进度',
  3561. dataIndex: 'followSituation',
  3562. key: 'followSituation',
  3563. render: (text, record, index) => {
  3564. return adminData.isSuperAdmin ? <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
  3565. {
  3566. newFollow.map(function (item) {
  3567. return <Select.Option key={item.value} >{item.key}</Select.Option>
  3568. })
  3569. }
  3570. </Select> : <span>{getfllowSituation(text)}</span>
  3571. }
  3572. }, {
  3573. title: '最新状态',
  3574. dataIndex: 'customerStatus',
  3575. key: 'customerStatus',
  3576. render: (text, record, index) => {
  3577. return adminData.isSuperAdmin ? <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
  3578. {
  3579. customerStatus.map(function (item) {
  3580. return <Select.Option key={item.value} >{item.key}</Select.Option>
  3581. })
  3582. }
  3583. </Select> : <span>{getcustomerStatue(text)}</span>
  3584. }
  3585. }, {
  3586. title: '跟进说明',
  3587. dataIndex: 'remarks',
  3588. key: 'remarks',
  3589. render: (text, record, index) => {
  3590. return adminData.isSuperAdmin ? <Input value={record.remarks} placeholder="跟进说明"
  3591. onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
  3592. style={{width:'120px'}}/> : <span>{text}</span>
  3593. }
  3594. }, {
  3595. title: '操作',
  3596. dataIndex: 'rrr',
  3597. key: 'rrr',
  3598. render: (text, record, index) => {
  3599. return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
  3600. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
  3601. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  3602. </Popconfirm>
  3603. </div>
  3604. }
  3605. }
  3606. ],
  3607. businessIntentionList: [{
  3608. title: '意向时间',
  3609. dataIndex: 'createTime',
  3610. key: 'createTime'
  3611. }, {
  3612. title: '客户名称',
  3613. dataIndex: 'identifyName',
  3614. key: 'identifyName'
  3615. }, {
  3616. title: '业务名',
  3617. dataIndex: 'businessName',
  3618. key: 'businessName'
  3619. }, {
  3620. title: '营销员',
  3621. dataIndex: 'adminName',
  3622. key: 'adminName'
  3623. }, {
  3624. title: '业务意向进度',
  3625. dataIndex: 'followSituation',
  3626. key: 'followSituation',
  3627. render: text => { return getfllowSituation(text) }
  3628. }, {
  3629. title: '客户状态',
  3630. dataIndex: 'customerStatus',
  3631. key: 'customerStatus',
  3632. render: text => { return getcustomerStatue(text) }
  3633. }, {
  3634. title: '操作',
  3635. dataIndex: 'ooo',
  3636. key: 'ooo',
  3637. render: (text, record) => { return(<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>) }
  3638. }],
  3639. businessFollowList: [{
  3640. title: '跟进时间',
  3641. dataIndex: 'followTime',
  3642. key: 'followTime',
  3643. }, {
  3644. title: '营销员',
  3645. dataIndex: 'adminName',
  3646. key: 'adminName',
  3647. }, {
  3648. title: '业务意向进度',
  3649. dataIndex: 'followSituation',
  3650. key: 'followSituation',
  3651. render: text => { return getfllowSituation(text) }
  3652. }, {
  3653. title: '客户状态',
  3654. dataIndex: 'customerStatus',
  3655. key: 'customerStatus',
  3656. render: text => { return getcustomerStatue(text) }
  3657. },
  3658. {
  3659. title: '拜访方式',
  3660. dataIndex: 'contactType',
  3661. key: 'contactType',
  3662. render: text => { return getContactType(text) }
  3663. }, {
  3664. title: '联系人',
  3665. dataIndex: 'contacts',
  3666. key: 'contacts',
  3667. },
  3668. {
  3669. title: '联系电话',
  3670. dataIndex: 'contactMobile',
  3671. key: 'contactMobile',
  3672. }, {
  3673. title: '操作',
  3674. dataIndex: 'ooo',
  3675. key: 'ooo',
  3676. render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>) }
  3677. }
  3678. ],
  3679. visitsList: [{
  3680. title: '拜访时间',
  3681. dataIndex: 'followTime',
  3682. key: 'followTime'
  3683. }, {
  3684. title: '客户名称',
  3685. dataIndex: 'identifyName',
  3686. key: 'identifyName'
  3687. }, {
  3688. title: '拜访方式',
  3689. dataIndex: 'contactType',
  3690. key: 'contactType',
  3691. render: text => { return getContactType(text) }
  3692. }, {
  3693. title: '联系人',
  3694. dataIndex: 'contacts',
  3695. key: 'contacts'
  3696. }, {
  3697. title: '联系电话',
  3698. dataIndex: 'contactMobile',
  3699. key: 'contactMobile'
  3700. }, {
  3701. title: '拜访人',
  3702. dataIndex: 'adminName',
  3703. key: 'adminName'
  3704. }, {
  3705. title: '拜访说明',
  3706. dataIndex: 'result',
  3707. key: 'result'
  3708. }, {
  3709. title: '操作',
  3710. dataIndex: 'ttt',
  3711. key: 'ttt',
  3712. render: (text, record, index) => {
  3713. return adminData.isSuperAdmin ? <div>
  3714. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
  3715. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
  3716. </Popconfirm>
  3717. </div> : <span></span>
  3718. }
  3719. }],
  3720. ContactsLists: [{
  3721. title: '姓名',
  3722. dataIndex: 'name',
  3723. key: 'name',
  3724. render: (text, record, index) => {
  3725. return adminData.isSuperAdmin ? <Input value={record.name} placeholder="姓名" key={record.id} required="required"
  3726. onChange={(e) => { record.name = e.target.value;
  3727. this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3728. }
  3729. }, {
  3730. title: '联系人部门',
  3731. dataIndex: 'depatrment',
  3732. key: 'depatrment',
  3733. render: (text, record, index) => {
  3734. return adminData.isSuperAdmin ? <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
  3735. onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3736. }
  3737. }, {
  3738. title: '联系人职务',
  3739. dataIndex: 'position',
  3740. key: 'position',
  3741. render: (text, record, index) => {
  3742. return adminData.isSuperAdmin ? <Input value={record.position} placeholder="联系人职务" key={record.id}
  3743. onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3744. }
  3745. }, {
  3746. title: '手机号码',
  3747. dataIndex: 'mobile',
  3748. key: 'mobile',
  3749. render: (text, record, index) => {
  3750. return adminData.isSuperAdmin ? <Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
  3751. onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3752. }
  3753. }, {
  3754. title: '微信',
  3755. dataIndex: 'wechat',
  3756. key: 'wechat',
  3757. render: (text, record, index) => {
  3758. return adminData.isSuperAdmin ? <Input value={record.wechat} placeholder="微信" key={record.id}
  3759. onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3760. }
  3761. }, {
  3762. title: '联系人QQ',
  3763. dataIndex: 'qq',
  3764. key: 'qq',
  3765. render: (text, record, index) => {
  3766. return adminData.isSuperAdmin ? <Input value={record.qq} placeholder="联系人QQ" key={record.id}
  3767. onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3768. }
  3769. }, {
  3770. title: '电子邮箱',
  3771. dataIndex: 'email',
  3772. key: 'email',
  3773. render: (text, record, index) => {
  3774. return adminData.isSuperAdmin ? <Input value={record.email} placeholder="电子邮箱" key={record.id}
  3775. onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/> : <span>{text}</span>
  3776. }
  3777. },
  3778. {
  3779. title: '操作',
  3780. dataIndex: 'dels',
  3781. key: 'dels',
  3782. render: (text, record, index) => {
  3783. return adminData.isSuperAdmin ? <div>
  3784. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
  3785. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  3786. </Popconfirm>
  3787. </div> : <span>无权限</span>
  3788. }
  3789. }
  3790. ],
  3791. columnsman: [{
  3792. title: '姓名',
  3793. dataIndex: 'name',
  3794. key: 'name'
  3795. }, {
  3796. title: '手机号码',
  3797. dataIndex: 'mobile',
  3798. key: 'mobile'
  3799. }],
  3800. columns: [{
  3801. title: '客户名称',
  3802. dataIndex: 'name',
  3803. key: 'name',
  3804. }, {
  3805. title: '地区',
  3806. dataIndex: 'locationProvince',
  3807. key: 'locationProvince',
  3808. },
  3809. {
  3810. title: '行业',
  3811. dataIndex: 'industry',
  3812. key: 'industry',
  3813. },
  3814. {
  3815. title: '社会性质',
  3816. dataIndex: 'societyTag',
  3817. key: 'societyTag',
  3818. render: text => { return getSocialAttribute(text) }
  3819. },
  3820. {
  3821. title: '公共客户',
  3822. dataIndex: 'shareType',
  3823. key: 'shareType',
  3824. render: (text, record) => { return record.shareType == '1' ? <span>公共客户</span> : <span>个人客户</span> }
  3825. },
  3826. {
  3827. title: '创建时间',
  3828. dataIndex: 'createTime',
  3829. key: 'createTime',
  3830. },
  3831. {
  3832. title: '所属人',
  3833. dataIndex: 'adminName',
  3834. key: 'adminName',
  3835. },
  3836. {
  3837. title: '业务认证',
  3838. dataIndex: 'businessAudit',
  3839. key: 'businessAudit',
  3840. render: text => { return getCertification(text) }
  3841. },
  3842. {
  3843. title: '实名认证',
  3844. dataIndex: 'auditStatus',
  3845. key: 'auditStatus',
  3846. render: text => { return getAuditStatus(text) }
  3847. },
  3848. {
  3849. title: '是否高新',
  3850. dataIndex: 'highTechZone',
  3851. key: 'highTechZone',
  3852. render: text => { return getWhether(text) }
  3853. },
  3854. {
  3855. title: '是否上市',
  3856. dataIndex: 'listed',
  3857. key: 'listed',
  3858. render: text => { return getWhether(text) }
  3859. },
  3860. {
  3861. title: '是否国际',
  3862. dataIndex: 'international',
  3863. key: 'international',
  3864. render: text => { return getWhether(text) }
  3865. },
  3866. {
  3867. title: '会员等级',
  3868. dataIndex: 'lvl',
  3869. key: 'lvl',
  3870. render: text => { return getLvl(text) }
  3871. },
  3872. {
  3873. title: '会员状态',
  3874. dataIndex: 'currentMemberStatus',
  3875. key: 'currentMemberStatus',
  3876. render: text => { return getCurrentMember(text) }
  3877. }
  3878. ],
  3879. data: [],
  3880. dataman: [],
  3881. dataSource: [],
  3882. visitArrList: [],
  3883. searchTime: [, ]
  3884. };
  3885. },
  3886. //更多操作
  3887. ModalOperation() {
  3888. this.setState({
  3889. visible: true,
  3890. });
  3891. },
  3892. //tab2获取联系人详情
  3893. contactLists(ids) {
  3894. this.setState({
  3895. loading: true
  3896. });
  3897. $.ajax({
  3898. method: "get",
  3899. dataType: "json",
  3900. crossDomain: false,
  3901. url: globalConfig.context + '/api/admin/customer/findCustomerContacts',
  3902. data: {
  3903. uid: ids, //名称1
  3904. },
  3905. success: function(data) {
  3906. let theArr = [];
  3907. if(data.error.length || data.data.list == "") {
  3908. if(data.error && data.error.length) {
  3909. message.warning(data.error[0].message);
  3910. };
  3911. } else {
  3912. for(let i = 0; i < data.data.length; i++) {
  3913. let thisdata = data.data[i];
  3914. theArr.push({
  3915. id: thisdata.id,
  3916. name: thisdata.name,
  3917. mobile: thisdata.mobile,
  3918. email: thisdata.email,
  3919. qq: thisdata.qq,
  3920. wechat: thisdata.wechat,
  3921. depatrment: thisdata.depatrment,
  3922. position: thisdata.position,
  3923. });
  3924. };
  3925. };
  3926. this.setState({
  3927. contactList: theArr,
  3928. });
  3929. }.bind(this),
  3930. }).always(function() {
  3931. this.setState({
  3932. loading: false
  3933. });
  3934. }.bind(this));
  3935. },
  3936. //刷新新增拜访记录刷新
  3937. deletelist(e) {
  3938. $.ajax({
  3939. method: "get",
  3940. dataType: "json",
  3941. url: globalConfig.context + '/api/admin/customer/toAddFollow',
  3942. data: {
  3943. uid: e,
  3944. },
  3945. success: function(data) {
  3946. let listArr = [];
  3947. let thedata = data.data;
  3948. if(!thedata) {
  3949. if(data.error && data.error.length) {
  3950. message.warning(data.error[0].message);
  3951. };
  3952. thedata = {};
  3953. };
  3954. for(let i = 0; i < data.data.userBusinessList.length; i++) {
  3955. let thisdata = data.data.userBusinessList[i];
  3956. listArr.push({
  3957. id: thisdata.id,
  3958. businessGlossoryId: String(thisdata.businessGlossoryId),
  3959. followSituation: String(thisdata.followSituation),
  3960. customerStatus: String(thisdata.customerStatus),
  3961. remarks: thisdata.remarks,
  3962. });
  3963. };
  3964. this.setState({
  3965. contacts: thedata.contacts,
  3966. uid: thedata.uid,
  3967. data: listArr,
  3968. identifyName: thedata.identifyName,
  3969. followTime: thedata.followTime,
  3970. businessGlossoryId: thedata.businessGlossoryId,
  3971. followSituation: thedata.followSituation,
  3972. customerStatus: thedata.customerStatus,
  3973. remarks: thedata.remarks,
  3974. });
  3975. }.bind(this),
  3976. }).always(function() {
  3977. this.setState({
  3978. loading: false
  3979. });
  3980. }.bind(this));
  3981. },
  3982. //进入新增拜访记录
  3983. visit(e) {
  3984. this.state.keys = true;
  3985. this.getNewWoman(e.id);
  3986. this.deletelist(e.id)
  3987. this.setState({
  3988. result: '',
  3989. contactType: undefined,
  3990. visitModul: true,
  3991. loading: true
  3992. });
  3993. },
  3994. //拜访记录删除
  3995. visitDelet(e) {
  3996. this.setState({
  3997. loading: true
  3998. });
  3999. $.ajax({
  4000. method: "get",
  4001. dataType: "json",
  4002. crossDomain: false,
  4003. url: globalConfig.context + "/api/admin/customer/deleteFollow",
  4004. data: {
  4005. followId: e.followId, //删除的ID
  4006. }
  4007. }).done(function(data) {
  4008. if(!data.error.length) {
  4009. message.success('删除成功!');
  4010. this.setState({
  4011. loading: false,
  4012. });
  4013. } else {
  4014. message.warning(data.error[0].message);
  4015. };
  4016. this.loadVisit();
  4017. }.bind(this));
  4018. },
  4019. //进入修改拜访记录
  4020. visitModify(e) {
  4021. this.setState({
  4022. visitModul: true,
  4023. loading: true
  4024. });
  4025. $.ajax({
  4026. method: "get",
  4027. dataType: "json",
  4028. url: globalConfig.context + '/api/admin/customer/toUpdateFollow',
  4029. data: {
  4030. followId: e,
  4031. },
  4032. success: function(data) {
  4033. let theArr = [];
  4034. let thedata = data.data;
  4035. if(!thedata) {
  4036. if(data.error && data.error.length) {
  4037. message.warning(data.error[0].message);
  4038. };
  4039. thedata = {};
  4040. };
  4041. for(let i = 0; i < data.data.userBusinessList.length; i++) {
  4042. let thisdata = data.data.userBusinessList[i];
  4043. theArr.push({
  4044. id: thisdata.id,
  4045. businessGlossoryId: String(thisdata.businessGlossoryId),
  4046. followSituation: String(thisdata.followSituation),
  4047. customerStatus: String(thisdata.customerStatus),
  4048. remarks: thisdata.remarks,
  4049. });
  4050. };
  4051. this.setState({
  4052. followIds: thedata.followId,
  4053. contacts: thedata.contacts,
  4054. uid: thedata.uid,
  4055. data: theArr,
  4056. nub: thedata.contactMobile,
  4057. result: thedata.result,
  4058. contactType: parseInt(thedata.contactType),
  4059. identifyName: thedata.identifyName,
  4060. followTime: thedata.followTime,
  4061. businessGlossoryId: thedata.businessGlossoryId,
  4062. followSituation: thedata.followSituation,
  4063. customerStatus: thedata.customerStatus,
  4064. adminName: thedata.adminName,
  4065. });
  4066. }.bind(this),
  4067. }).always(function() {
  4068. this.setState({
  4069. loading: false
  4070. });
  4071. }.bind(this));
  4072. },
  4073. //列表删除功能
  4074. delectRow() {
  4075. let deletedIds;
  4076. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  4077. let rowItem = this.state.selectedRows[idx];
  4078. if(rowItem.id) {
  4079. deletedIds = rowItem.id;
  4080. };
  4081. };
  4082. this.setState({
  4083. loading: true,
  4084. selectedRowKeys: [],
  4085. });
  4086. $.ajax({
  4087. method: "get",
  4088. dataType: "json",
  4089. crossDomain: false,
  4090. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  4091. data: {
  4092. uid: deletedIds, //删除的ID
  4093. }
  4094. }).done(function(data) {
  4095. if(!data.error.length) {
  4096. message.success('删除成功!');
  4097. this.setState({
  4098. loading: false,
  4099. });
  4100. } else {
  4101. message.warning(data.error[0].message);
  4102. };
  4103. this.loadData();
  4104. }.bind(this));
  4105. },
  4106. //指定转交人的点击函数
  4107. showModa() {
  4108. this.setState({
  4109. visible: true,
  4110. });
  4111. this.setState({
  4112. selectedRowKey: [],
  4113. });
  4114. this.setState({
  4115. selectedRowKeys: this.state.selectedRowKeys,
  4116. });
  4117. let changeIds;
  4118. let adminName;
  4119. let customerStatus;
  4120. let companyIntention;
  4121. let followSituation;
  4122. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  4123. let rowItem = this.state.selectedRows[idx];
  4124. if(rowItem.id) {
  4125. changeIds = rowItem.id;
  4126. adminName = rowItem.adminName;
  4127. customerStatus = rowItem.customerStatus;
  4128. companyIntention = rowItem.companyIntention;
  4129. followSituation = rowItem.followSituation;
  4130. };
  4131. };
  4132. $.ajax({
  4133. method: "post",
  4134. dataType: "json",
  4135. crossDomain: false,
  4136. url: globalConfig.context + "/api/admin/customer/findAdmin",
  4137. data: {
  4138. id: changeIds, //这一行数据的ID
  4139. beforeCompanyIntention: companyIntention, //意向服务
  4140. beforeCustomerStatus: customerStatus, //客户状态
  4141. beforeFollowSituation: followSituation, //最新跟进状态
  4142. beforeAdminName: adminName, //跟进人
  4143. }
  4144. }).done(function(data) {
  4145. if(data.error && data.error.length) {
  4146. message.warning(data.error[0].message);
  4147. } else {
  4148. let theAssigne = [];
  4149. if(!data.data) {
  4150. if(data.error && data.error.length) {
  4151. message.warning(data.error[0].message);
  4152. };
  4153. } else {
  4154. for(let i = 0; i < data.data.length; i++) {
  4155. let thisdata = data.data[i];
  4156. //处理数据 进行循环
  4157. theAssigne.push({
  4158. name: thisdata.name,
  4159. id: thisdata.id,
  4160. ids: thisdata.cid,
  4161. mobile: thisdata.mobile,
  4162. adminName: thisdata.beforeAdminName,
  4163. customerStatus: thisdata.beforeCustomerStatus,
  4164. companyIntention: thisdata.beforeCompanyIntention,
  4165. followSituation: thisdata.beforeFollowSituation,
  4166. });
  4167. };
  4168. };
  4169. this.setState({
  4170. dataman: theAssigne,
  4171. paginations: false
  4172. });
  4173. }
  4174. }.bind(this));
  4175. },
  4176. //选择了指定人之后的保存点击函数,需要修改函数
  4177. changeAssigner(e) {
  4178. e.preventDefault();
  4179. this.setState({
  4180. visible: false,
  4181. });
  4182. this.setState({
  4183. selectedRowKeys: [],
  4184. });
  4185. let datt = this.state.selectedRow;
  4186. $.ajax({
  4187. method: "post",
  4188. dataType: "json",
  4189. crossDomain: false,
  4190. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  4191. data: {
  4192. id: datt[0].ids, //这一行数据的ID
  4193. aid: datt[0].id, //指定转交人的ID
  4194. beforeAdminName: datt[0].adminName, //之前的跟进人
  4195. adminName: datt[0].name, //转交的跟进人
  4196. }
  4197. }).done(function(data) {
  4198. if(!data.error.length) {
  4199. message.success('转交成功!');
  4200. this.setState({
  4201. loading: false,
  4202. });
  4203. } else {
  4204. message.warning(data.error[0].message);
  4205. };
  4206. this.loadData();
  4207. }.bind(this));
  4208. },
  4209. //领取
  4210. changeRow(uids) {
  4211. this.setState({
  4212. loading: true,
  4213. selectedRowKeys: [],
  4214. });
  4215. $.ajax({
  4216. method: "get",
  4217. dataType: "json",
  4218. crossDomain: false,
  4219. url: globalConfig.context + "/api/admin/customer/receiveCustomer",
  4220. data: {
  4221. uid: uids.id,
  4222. }
  4223. }).done(function(data) {
  4224. if(!data.error.length) {
  4225. message.success('领取成功!');
  4226. this.setState({
  4227. loading: false,
  4228. });
  4229. } else {
  4230. message.warning(data.error[0].message);
  4231. };
  4232. this.loadData();
  4233. }.bind(this));
  4234. },
  4235. getOrgCodeUrl(e) {
  4236. this.setState({ orgCodeUrl: e });
  4237. },
  4238. getCompanyLogoUrl(e) {
  4239. this.setState({ companyLogoUrl: e });
  4240. },
  4241. componentWillMount() {
  4242. this.selectSuperId();
  4243. //城市
  4244. let Province = [];
  4245. provinceList.map(function(item) {
  4246. var id = String(item.id)
  4247. Province.push(
  4248. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  4249. )
  4250. });
  4251. //行业
  4252. let intentionalArr = [];
  4253. industry.map(function(item) {
  4254. intentionalArr.push(
  4255. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  4256. )
  4257. });
  4258. //会员等级
  4259. let lvlArr = [];
  4260. lvl.map(function(item) {
  4261. lvlArr.push(
  4262. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  4263. )
  4264. });
  4265. //会员状态customerStatus
  4266. let currentMemberArr = [];
  4267. currentMember.map(function(item) {
  4268. currentMemberArr.push(
  4269. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  4270. )
  4271. });
  4272. this.state.Provinces = Province;
  4273. this.state.intentionalOption = intentionalArr;
  4274. this.state.lvlArrOption = lvlArr;
  4275. this.state.currentMemberArrOption = currentMemberArr;
  4276. this.loadData();
  4277. },
  4278. search() {
  4279. this.loadData();
  4280. },
  4281. reset() {
  4282. this.state.internationalSearch = undefined;
  4283. this.state.shareTypeSearch = undefined;
  4284. this.state.typeSearch = undefined; //名称1
  4285. this.state.nameSearch = '';
  4286. this.state.addressSearch = [];
  4287. this.state.provinceSearch = undefined;
  4288. this.state.citySearch = undefined;
  4289. this.state.statusSearch = undefined;
  4290. this.state.contactsSearch = undefined;
  4291. this.state.contactMobileSearch = undefined;
  4292. this.state.industrySearch = undefined;
  4293. this.state.serviceCertificationSearch = undefined;
  4294. this.state.userCertificationSearch = undefined;
  4295. this.state.currentMemberStatusSearch = undefined;
  4296. this.state.lvlSearch = undefined;
  4297. this.state.listedSearch = undefined;
  4298. this.state.societyTagSearch = undefined;
  4299. this.state.highTechZoneSearch = undefined;
  4300. this.state.releaseDate[0] = undefined;
  4301. this.state.releaseDate[1] = undefined;
  4302. this.loadData();
  4303. },
  4304. searchSwitch() {
  4305. this.setState({
  4306. searchMore: !this.state.searchMore
  4307. });
  4308. },
  4309. //详情保存函数
  4310. detailsSubmint() {
  4311. this.setState({
  4312. modal5Visible: false,
  4313. })
  4314. },
  4315. //整行点击
  4316. tableRowClick(record, index) {
  4317. this.selectSuperId();
  4318. this.state.RowData = record;
  4319. this.detailsModalOk(record);
  4320. this.setState({
  4321. callnub:'1',
  4322. selectedRowKeys: [],
  4323. rowId: record.id,
  4324. editSuperId:undefined,
  4325. })
  4326. },
  4327. VisitRowClick(record, index) {
  4328. this.state.keys = false;
  4329. this.state.RowData = record;
  4330. this.visitModify(record.followId);
  4331. this.setState({
  4332. selectedRowKeys: [],
  4333. delectId: record.followId,
  4334. })
  4335. },
  4336. //基本信息提交
  4337. newSubmit(e) {
  4338. e.preventDefault();
  4339. if(!this.state.industry) {
  4340. message.warning('请选择行业');
  4341. return false;
  4342. };
  4343. if(!this.state.societyTag) {
  4344. message.warning('请选择社会性质');
  4345. return false;
  4346. };
  4347. if(!this.state.ProvinceCity[1]) {
  4348. message.warning('请选择地区');
  4349. return false;
  4350. };
  4351. this.state.data = [];
  4352. this.setState({
  4353. selectedRowKeys: [],
  4354. });
  4355. this.props.form.validateFields((err, values) => {
  4356. let theorgCodeUrl = [];
  4357. if(this.state.orgCodeUrl.length) {
  4358. let picArr = [];
  4359. this.state.orgCodeUrl.map(function(item) {
  4360. if ( item.response && item.response.data && item.response.data.length ){
  4361. picArr.push(item.response.data);
  4362. }
  4363. });
  4364. theorgCodeUrl = picArr.join(",");
  4365. };
  4366. let thecompanyLogoUrl = [];
  4367. if(this.state.companyLogoUrl.length) {
  4368. let picArr = [];
  4369. this.state.companyLogoUrl.map(function(item) {
  4370. if ( item.response && item.response.data && item.response.data.length ){
  4371. picArr.push(item.response.data);
  4372. }
  4373. });
  4374. thecompanyLogoUrl = picArr.join(",");
  4375. };
  4376. if(this.state.editSuperId){
  4377. let nameText=this.state.SuperArr;
  4378. let superText=nameText[parseInt(this.state.editSuperId)].aid;
  4379. $.ajax({
  4380. method: "post",
  4381. dataType: "json",
  4382. url: globalConfig.context + '/api/admin/customer/updatePersonalCustomerz',
  4383. data: {
  4384. id: this.state.InformationId,
  4385. uid: this.state.InformationUid,
  4386. aid:superText,
  4387. }
  4388. });
  4389. }
  4390. if(!err) {
  4391. this.setState({
  4392. loading: true
  4393. });
  4394. $.ajax({
  4395. method: "post",
  4396. dataType: "json",
  4397. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  4398. data: {
  4399. id: this.state.InformationId,
  4400. uid: this.state.InformationUid,
  4401. societyTag: this.state.societyTag,
  4402. introduction: this.state.introduction,
  4403. unitName: this.state.unitName,
  4404. industry: this.state.industry,
  4405. locationProvince: (this.state.ProvinceCity)[0], //省-
  4406. locationCity: (this.state.ProvinceCity)[1], //市
  4407. locationArea: (this.state.ProvinceCity)[2], //区
  4408. postalAddress: this.state.postalAddress,
  4409. contactsFixedTel: this.state.contactsFixedTel,
  4410. contactsFax: this.state.contactsFax,
  4411. registeredCapital: this.state.registeredCapital,
  4412. enterpriseScale: this.state.enterpriseScale,
  4413. legalPerson: this.state.legalPerson,
  4414. international: this.state.international,
  4415. legalPersonIdCard: this.state.legalPersonIdCard,
  4416. legalPersonTel: this.state.legalPersonTel,
  4417. legalPersonEmail: this.state.legalPersonEmail,
  4418. highTechZone: this.state.highTechZone,
  4419. listed: this.state.listed,
  4420. orgCode: this.state.orgCode,
  4421. businessScope: this.state.businessScope,
  4422. introduction: this.state.introduction,
  4423. companyLogoUrl: thecompanyLogoUrl,
  4424. orgCodeUrl: theorgCodeUrl,
  4425. investment: this.state.investment,
  4426. auditStatus: this.state.auditStatus,
  4427. businessAudit: this.state.businessAudit
  4428. }
  4429. }).done(function(data) {
  4430. this.setState({
  4431. loading: false
  4432. });
  4433. if(!data.error.length) {
  4434. message.success('保存成功!');
  4435. this.detailsModal()
  4436. this.loadData();
  4437. } else {
  4438. message.warning(data.error[0].message);
  4439. }
  4440. }.bind(this));
  4441. }
  4442. })
  4443. },
  4444. //点击整行查看详情
  4445. //查看基本详情基本信息
  4446. loadInformation(record) {
  4447. this.RowClick;
  4448. $.ajax({
  4449. method: "get",
  4450. dataType: "json",
  4451. crossDomain: false,
  4452. url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail',
  4453. data: {
  4454. uid: record
  4455. },
  4456. success: function(data) {
  4457. let thisData = data.data;
  4458. if(!thisData) {
  4459. if(data.error && data.error.length) {
  4460. message.warning(data.error[0].message);
  4461. };
  4462. thisData = {};
  4463. };
  4464. let ProvinceCityArr = [];
  4465. let ProvinceS = thisData.locationProvince; //getprovince
  4466. let citys = thisData.locationCity;
  4467. let Areas = thisData.locationArea;
  4468. ProvinceCityArr.push(ProvinceS, citys, Areas);
  4469. let cityArea = getprovince(ProvinceS) + '/' + getprovince(citys) + '/' + getprovince(Areas)
  4470. this.setState({
  4471. InformationId: thisData.id,
  4472. InformationUid: thisData.uid,
  4473. identifyName: thisData.identifyName,
  4474. listed: thisData.listed,
  4475. highTechZone: thisData.highTechZone,
  4476. orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
  4477. companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
  4478. dataInformation: thisData,
  4479. ProvinceCity: ProvinceCityArr,
  4480. proviceCityArea: ProvinceS ? cityArea : '',
  4481. industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
  4482. international: thisData.international,
  4483. societyTag: thisData.societyTag,
  4484. introduction: thisData.introduction,
  4485. postalAddress: thisData.postalAddress,
  4486. contactsFixedTel: thisData.contactsFixedTel,
  4487. contactsFax: thisData.contactsFax,
  4488. registeredCapital: thisData.registeredCapital,
  4489. enterpriseScale: thisData.enterpriseScale,
  4490. legalPerson: thisData.legalPerson,
  4491. legalPersonIdCard: thisData.legalPersonIdCard,
  4492. legalPersonTel: thisData.legalPersonTel,
  4493. legalPersonEmail: thisData.legalPersonEmail,
  4494. businessScope: thisData.businessScope,
  4495. orgCode: thisData.orgCode,
  4496. investment: thisData.investment,
  4497. auditStatus: thisData.auditStatus?String(thisData.auditStatus):undefined,
  4498. businessAudit: thisData.businessAudit
  4499. });
  4500. }.bind(this),
  4501. }).always(function() {
  4502. this.setState({
  4503. loading: false
  4504. });
  4505. }.bind(this));
  4506. },
  4507. //tab3账户信息请求数据
  4508. httpAccount(record) {
  4509. this.RowClick;
  4510. $.ajax({
  4511. method: "get",
  4512. dataType: "json",
  4513. crossDomain: false,
  4514. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  4515. data: {
  4516. uid: record
  4517. },
  4518. success: function(data) {
  4519. let thisData = data.data;
  4520. if(!thisData) {
  4521. if(data.error && data.error.length) {
  4522. message.warning(data.error[0].message);
  4523. };
  4524. thisData = {};
  4525. };
  4526. let sourcecustomer = ''
  4527. switch(String(thisData.source)) {
  4528. case '0':
  4529. sourcecustomer = '注册客户'
  4530. break;
  4531. case '1':
  4532. sourcecustomer = '录入客户'
  4533. break;
  4534. }
  4535. this.setState({
  4536. Accountuid: thisData.id,
  4537. mobile: thisData.mobile,
  4538. nickname: thisData.nickname,
  4539. email: thisData.email,
  4540. type: getcustomerTyp(String(thisData.type)),
  4541. source: sourcecustomer,
  4542. isMember: thisData.isMember,
  4543. currentMemberStatus: String(thisData.currentMemberStatus),
  4544. lvl: String(thisData.lvl),
  4545. status: String(thisData.status),
  4546. createTimes: thisData.createTimes,
  4547. });
  4548. }.bind(this),
  4549. }).always(function() {
  4550. this.setState({
  4551. loading: false
  4552. });
  4553. }.bind(this));
  4554. },
  4555. detailsModalOk(e) {
  4556. this.setState({ modal5Visible: true }); //需要一个请求数据
  4557. this.loadInformation(e.id);
  4558. this.contactLists(e.id);
  4559. this.httpAccount(e.id);
  4560. this.loadBfVisit(1, e.id);
  4561. this.BusinessList(1, e.id);
  4562. },
  4563. //点击消失函数
  4564. detailsModal(e) {
  4565. this.setState({
  4566. modal5Visible: false
  4567. });
  4568. },
  4569. //拜访modul函数
  4570. visitOk(e) {
  4571. this.setState({
  4572. visitModul: false
  4573. });
  4574. this.loadVisit()
  4575. },
  4576. visitCancel(e) {
  4577. this.setState({
  4578. visitModul: false
  4579. });
  4580. },
  4581. //拜访保存函数
  4582. visitSubmit(e) {
  4583. e.preventDefault();
  4584. let GlossoryId;
  4585. this.state.data.map(function(item) {
  4586. if(!item.businessGlossoryId) {
  4587. GlossoryId = true
  4588. }
  4589. })
  4590. if(this.state.contactType == undefined) {
  4591. message.warning('请选择拜访方式')
  4592. return false;
  4593. };
  4594. if(this.state.keys) {
  4595. if(this.state.lastName == undefined) {
  4596. message.warning('请选择联系人')
  4597. return false;
  4598. }
  4599. };
  4600. if(GlossoryId) {
  4601. message.warning("请选择业务名称!")
  4602. return false;
  4603. };
  4604. this.setState({
  4605. selectedRowKeys: [],
  4606. });
  4607. this.setState({
  4608. loading: true
  4609. });
  4610. let contactsId = '';
  4611. if(this.state.keys) {
  4612. let conts = this.state.lastName;
  4613. contactsId = this.state.contactsIdArr[conts].id;
  4614. }
  4615. //新增
  4616. $.ajax({
  4617. method: "post",
  4618. dataType: "json",
  4619. url: this.state.keys ? globalConfig.context + '/api/admin/customer/addFollow' : globalConfig.context + '/api/admin/customer/updateFollow',
  4620. data: this.state.keys ? {
  4621. userBusinessList: JSON.stringify(this.state.data),
  4622. uid: this.state.uid,
  4623. ocbId: contactsId,
  4624. contactType: this.state.contactType,
  4625. result: this.state.result,
  4626. followTime: this.state.followTime,
  4627. } : {
  4628. followId: this.state.followIds,
  4629. userBusinessList: JSON.stringify(this.state.data),
  4630. uid: this.state.uid,
  4631. contactType: this.state.contactType,
  4632. result: this.state.result,
  4633. followTime: this.state.followTime,
  4634. }
  4635. }).done(function(data) {
  4636. this.setState({
  4637. loading: false
  4638. });
  4639. if(!data.error.length) {
  4640. message.success('保存成功!');
  4641. this.loadVisit(); //
  4642. this.loadData();
  4643. this.visitCancel();
  4644. } else {
  4645. message.warning(data.error[0].message);
  4646. }
  4647. }.bind(this));
  4648. },
  4649. //当选择联系人的列表变化时,则执行
  4650. hundleName(e) {
  4651. let changNub = this.state.telNum[e];
  4652. this.setState({
  4653. nub: this.state.telNum[e],
  4654. lastName: e,
  4655. });
  4656. },
  4657. //添加新业务及单位客户详情新增
  4658. addNew() {
  4659. this.state.data.push({
  4660. customerStatus: undefined,
  4661. businessGlossoryId: undefined,
  4662. followSituation: undefined,
  4663. remarks: '',
  4664. });
  4665. this.setState({
  4666. data: this.state.data
  4667. })
  4668. },
  4669. //tab2新增联系人
  4670. addcontact() {
  4671. this.state.contactList.push({
  4672. id: null,
  4673. name: '',
  4674. mobile: '',
  4675. email: '',
  4676. qq: '',
  4677. wechat: '',
  4678. depatrment: '',
  4679. position: '',
  4680. });
  4681. this.setState({
  4682. contactList: this.state.contactList
  4683. })
  4684. },
  4685. //tab5进入修改时
  4686. //进入修改时
  4687. listFollowUp(e) {
  4688. $.ajax({
  4689. method: "get",
  4690. dataType: "json",
  4691. crossDomain: false,
  4692. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  4693. data: {
  4694. ufbId: e
  4695. },
  4696. success: function(data) {
  4697. let thedata = data.data;
  4698. if(!thedata) {
  4699. if(data.error && data.error.length) {
  4700. message.warning(data.error[0].message);
  4701. };
  4702. thedata = {};
  4703. };
  4704. this.setState({
  4705. businessGlossoryIds: thedata.businessGlossoryId,
  4706. followSituations: thedata.followSituation,
  4707. customerStatuss: thedata.customerStatus,
  4708. followTimes: thedata.followTime,
  4709. createTimes: thedata.createTime,
  4710. identifyNames: thedata.identifyName,
  4711. contactTypes: parseInt(thedata.contactType),
  4712. results: thedata.result,
  4713. remarkss: thedata.remarks,
  4714. adminNames: thedata.adminName,
  4715. contactss: thedata.contacts,
  4716. contactMobiles: thedata.contactMobile,
  4717. ufbId: thedata.ufbId,
  4718. followIds: thedata.followId,
  4719. });
  4720. }.bind(this),
  4721. }).always(function() {
  4722. this.setState({
  4723. loading: false
  4724. });
  4725. }.bind(this));
  4726. },
  4727. //修改密码Modul
  4728. modifyPassworld() {
  4729. this.setState({
  4730. passworldModul: true
  4731. });
  4732. },
  4733. passworldOk(e) {
  4734. this.setState({
  4735. passworldModul: false
  4736. });
  4737. },
  4738. passworldCancel(e) {
  4739. this.setState({
  4740. passworldModul: false
  4741. });
  4742. },
  4743. //修改密码保存
  4744. passworldSubmit(e) {
  4745. e.preventDefault();
  4746. this.passworldCancel()
  4747. },
  4748. //新增联系人
  4749. addcontactModulOK() {
  4750. this.setState({
  4751. addcontactModul: false
  4752. });
  4753. },
  4754. addcontactModulcancel() {
  4755. this.setState({
  4756. addcontactModul: false
  4757. });
  4758. },
  4759. //点击新增详情
  4760. newContacts() {
  4761. this.state.newsex =undefined;
  4762. this.state.newname ='';
  4763. this.state.newmobile='';
  4764. this.state.newwechat='';
  4765. this.state.newqq='';
  4766. this.state.newdepatrment='';
  4767. this.state.newposition='';
  4768. this.state.newemail='';
  4769. this.setState({
  4770. uids: this.state.uid,
  4771. addcontactModul: true
  4772. });
  4773. },
  4774. //新增联系人保存函数
  4775. submitcontactman(e) {
  4776. e.preventDefault();
  4777. this.setState({
  4778. loading: true
  4779. })
  4780. $.ajax({
  4781. method: "post",
  4782. dataType: "json",
  4783. crossDomain: false,
  4784. url: globalConfig.context + "/api/admin/customer/addOneContact",
  4785. data: {
  4786. uid: this.state.uids,
  4787. name: this.state.newname,
  4788. mobile: this.state.newmobile,
  4789. email: this.state.newemail,
  4790. wechat: this.state.newwechat,
  4791. depatrment: this.state.newdepatrment,
  4792. position: this.state.newposition,
  4793. sex: this.state.newsex,
  4794. qq: this.state.newqq
  4795. },
  4796. success: function(data) {
  4797. if(!data.error.length) {
  4798. this.addcontactModulOK()
  4799. this.getNewWoman(this.state.uids)
  4800. this.setState({
  4801. loading: false,
  4802. })
  4803. } else {
  4804. message.warning(data.error[0].message);
  4805. };
  4806. }.bind(this)
  4807. });
  4808. },
  4809. //获取联系人下拉框
  4810. getNewWoman(ids) {
  4811. this.state.data = []
  4812. $.ajax({
  4813. method: "get",
  4814. dataType: "json",
  4815. crossDomain: false,
  4816. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  4817. data: {
  4818. uid: ids,
  4819. },
  4820. success: function(data) {
  4821. let theArr = [];
  4822. let thedata = data.data;
  4823. if(!thedata) {
  4824. if(data.error && data.error.length) {
  4825. message.warning(data.error[0].message);
  4826. };
  4827. thedata = {};
  4828. };
  4829. var telNum = [];
  4830. var contactIds = [];
  4831. thedata.map(function(item, index) {
  4832. contactIds.push(thedata[index].id);
  4833. telNum.push(thedata[index].mobile);
  4834. });
  4835. for(let item in data.data) {
  4836. let theData = data.data[item];
  4837. theArr.push(
  4838. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  4839. );
  4840. };
  4841. this.setState({
  4842. contactsIdArr: thedata,
  4843. telNum: telNum,
  4844. orderStatusOption: theArr,
  4845. });
  4846. }.bind(this),
  4847. }).always(function() {
  4848. this.setState({
  4849. deletId: ids,
  4850. loading: false
  4851. });
  4852. }.bind(this));
  4853. },
  4854. //拜访意向服务列表单个删除
  4855. intentionDelet(e, index) {
  4856. if(!this.state.keys) {
  4857. let detId = this.state.followIds;
  4858. if(e.id) {
  4859. this.setState({
  4860. selectedRowKeys: [],
  4861. });
  4862. $.ajax({
  4863. method: "get",
  4864. dataType: "json",
  4865. crossDomain: false,
  4866. url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
  4867. data: {
  4868. ufbId: e.id
  4869. }
  4870. }).done(function(data) {
  4871. if(!data.error.length) {
  4872. message.success('删除成功');
  4873. this.setState({
  4874. loading: false,
  4875. });
  4876. } else {
  4877. message.warning(data.error[0].message);
  4878. };
  4879. this.visitModify(detId);
  4880. }.bind(this));
  4881. } else {
  4882. this.visitModify(detId);
  4883. }
  4884. } else {
  4885. let deteluserBusinessList = (this.state.data).splice(index, 1)
  4886. this.setState({
  4887. selectedRowKeys: [],
  4888. });
  4889. }
  4890. },
  4891. //tab5意向业务
  4892. //意向业务查看列表单个详情
  4893. businessIntentionDetails(e) {
  4894. $.ajax({
  4895. method: "get",
  4896. dataType: "json",
  4897. crossDomain: false,
  4898. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  4899. data: {
  4900. businessId: e.businessId
  4901. },
  4902. success: function(data) {
  4903. let thisData = data.data;
  4904. if(!thisData) {
  4905. if(data.error && data.error.length) {
  4906. message.warning(data.error[0].message);
  4907. };
  4908. thisData = {};
  4909. };
  4910. this.setState({
  4911. businessGlossoryId: thisData.businessGlossoryId,
  4912. identifyName: thisData.identifyName,
  4913. uid: thisData.uid,
  4914. businessId: thisData.businessId,
  4915. followSituation: thisData.followSituation,
  4916. customerStatus: thisData.customerStatus,
  4917. createTime: thisData.createTime,
  4918. followTime: thisData.followTime,
  4919. adminName: thisData.adminName,
  4920. remarks: thisData.remarks,
  4921. result: thisData.result,
  4922. });
  4923. }.bind(this),
  4924. }).always(function() {
  4925. this.loadVisit();
  4926. this.setState({
  4927. loading: false
  4928. });
  4929. }.bind(this));
  4930. this.setState({
  4931. businessModul: true
  4932. })
  4933. },
  4934. //查看跟进记录列表
  4935. loadVisit(pageNo) {
  4936. this.setState({
  4937. loading: true
  4938. });
  4939. $.ajax({
  4940. method: "get",
  4941. dataType: "json",
  4942. crossDomain: false,
  4943. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  4944. data: {
  4945. pageNo: pageNo || 1,
  4946. pageSize: this.state.paginations.pageSize,
  4947. uid: this.state.rowId, //名称1
  4948. businessGlossoryId: this.state.businessGlossoryId,
  4949. },
  4950. success: function(data) {
  4951. let theArr = [];
  4952. if(data.error.length || data.data.list == "") {
  4953. if(data.error && data.error.length) {
  4954. message.warning(data.error[0].message);
  4955. };
  4956. } else {
  4957. for(let i = 0; i < data.data.list.length; i++) {
  4958. let thisdata = data.data.list[i];
  4959. theArr.push({
  4960. followId: thisdata.followId,
  4961. followTime: thisdata.followTime,
  4962. identifyName: thisdata.identifyName,
  4963. contacts: thisdata.contacts,
  4964. contactMobile: thisdata.contactMobile,
  4965. result: thisdata.result,
  4966. ufbId: thisdata.ufbId,
  4967. adminName: thisdata.adminName,
  4968. followSituation: thisdata.followSituation,
  4969. customerStatus: thisdata.customerStatus,
  4970. contactType: thisdata.contactType
  4971. });
  4972. };
  4973. this.state.paginations.current = data.data.pageNo;
  4974. this.state.paginations.total = data.data.totalCount;
  4975. };
  4976. this.setState({
  4977. visitArrList: theArr,
  4978. paginations: this.state.paginations
  4979. });
  4980. }.bind(this),
  4981. }).always(function() {
  4982. this.setState({
  4983. loading: false
  4984. });
  4985. }.bind(this));
  4986. },
  4987. //tab3拜访记录
  4988. loadBfVisit(pageNo, uids) {
  4989. this.setState({
  4990. loading: true
  4991. });
  4992. $.ajax({
  4993. method: "get",
  4994. dataType: "json",
  4995. crossDomain: false,
  4996. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  4997. data: {
  4998. pageNo: pageNo || 1,
  4999. pageSize: this.state.paginationsy.pageSize,
  5000. uid: uids ? uids : this.state.rowId, //名称1
  5001. },
  5002. success: function(data) {
  5003. let theArr = [];
  5004. if(data.error.length || data.data.list == "") {
  5005. if(data.error && data.error.length) {
  5006. message.warning(data.error[0].message);
  5007. };
  5008. } else {
  5009. for(let i = 0; i < data.data.list.length; i++) {
  5010. let thisdata = data.data.list[i];
  5011. theArr.push({
  5012. followId: thisdata.followId,
  5013. followTime: thisdata.followTime,
  5014. identifyName: thisdata.identifyName,
  5015. contacts: thisdata.contacts,
  5016. contactMobile: thisdata.contactMobile,
  5017. result: thisdata.result,
  5018. ufbId: thisdata.ufbId,
  5019. adminName: thisdata.adminName,
  5020. followSituation: thisdata.followSituation,
  5021. customerStatus: thisdata.customerStatus,
  5022. contactType: thisdata.contactType
  5023. });
  5024. };
  5025. this.state.paginationsy.current = data.data.pageNo;
  5026. this.state.paginationsy.total = data.data.totalCount;
  5027. };
  5028. this.setState({
  5029. visitArrList: theArr,
  5030. paginationsy: this.state.paginationsy
  5031. });
  5032. }.bind(this),
  5033. }).always(function() {
  5034. this.setState({
  5035. loading: false
  5036. });
  5037. }.bind(this));
  5038. },
  5039. businessIntentionOk() {
  5040. this.setState({
  5041. businessGlossoryId: '',
  5042. businessModul: false
  5043. })
  5044. },
  5045. businessIntentionCancel() {
  5046. this.setState({
  5047. businessGlossoryId: '',
  5048. businessModul: false
  5049. })
  5050. },
  5051. //业务跟进查看跟多
  5052. businessFollowDetails(e) {
  5053. this.listFollowUp(e.ufbId)
  5054. this.setState({
  5055. businessFollowModul: true
  5056. })
  5057. },
  5058. businessFollowOk(e) {
  5059. this.setState({
  5060. businessFollowModul: false
  5061. })
  5062. },
  5063. businessFollowCancel(e) {
  5064. this.setState({
  5065. businessFollowModul: false
  5066. })
  5067. },
  5068. //tab2联系人保存
  5069. contactSave(e) {
  5070. e.preventDefault();
  5071. this.setState({
  5072. loading: true
  5073. });
  5074. $.ajax({
  5075. url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
  5076. method: 'post',
  5077. data: {
  5078. uid: this.state.rowId,
  5079. contactList: JSON.stringify(this.state.contactList)
  5080. }
  5081. }).done(function(data) {
  5082. this.setState({
  5083. loading: false
  5084. });
  5085. if(!data.error.length) {
  5086. message.success('保存成功!');
  5087. this.detailsModal()
  5088. this.loadData();
  5089. } else {
  5090. message.warning(data.error[0].message);
  5091. }
  5092. }.bind(this));
  5093. },
  5094. //详情tab切换数据处理
  5095. callback(e) {
  5096. if(e == '1') {
  5097. this.loadInformation(this.state.rowId)
  5098. }
  5099. if(e == '2') {
  5100. this.contactLists(this.state.rowId)
  5101. }
  5102. if(e == '3') {
  5103. this.httpAccount(this.state.rowId)
  5104. }
  5105. if(e == '4') {
  5106. this.loadBfVisit(1, this.state.rowId);
  5107. }
  5108. if(e == '5') {
  5109. this.BusinessList(1, this.state.rowId);
  5110. }
  5111. if(e == '6') {
  5112. }
  5113. if(e == '7') {
  5114. }
  5115. if(e == '8') {
  5116. }
  5117. if(e == '9') {
  5118. }
  5119. this.setState({
  5120. callnub: e,
  5121. })
  5122. },
  5123. //账户信息保存
  5124. accountSave(e) {
  5125. e.preventDefault();
  5126. if(!this.state.mobile) {
  5127. message.warning('手机号码不能为空!')
  5128. return false;
  5129. }
  5130. this.state.data = [];
  5131. this.setState({
  5132. selectedRowKeys: [],
  5133. });
  5134. this.setState({
  5135. loading: true
  5136. });
  5137. $.ajax({
  5138. method: "post",
  5139. dataType: "json",
  5140. url: globalConfig.context + '/api/admin/customer/updateUserAccount',
  5141. data: {
  5142. id: this.state.Accountuid,
  5143. mobile: this.state.mobile,
  5144. nickname: this.state.nickname,
  5145. email: this.state.email,
  5146. isMember: this.state.isMember,
  5147. currentMemberStatus: this.state.currentMemberStatus,
  5148. lvl: this.state.lvl,
  5149. status: this.state.status,
  5150. }
  5151. }).done(function(data) {
  5152. this.setState({
  5153. loading: false
  5154. });
  5155. if(!data.error.length) {
  5156. message.success('保存成功!');
  5157. this.detailsModal();
  5158. this.loadData();
  5159. } else {
  5160. message.warning(data.error[0].message);
  5161. }
  5162. }.bind(this));
  5163. },
  5164. //tab2删除
  5165. confirmDelet(e) {
  5166. this.setState({
  5167. loading: true
  5168. });
  5169. if(e.id) {
  5170. $.ajax({
  5171. method: "get",
  5172. dataType: "json",
  5173. crossDomain: false,
  5174. url: globalConfig.context + "/api/admin/customer/deleteOneContact",
  5175. data: {
  5176. ocbId: e.id, //删除的ID
  5177. }
  5178. }).done(function(data) {
  5179. if(!data.error.length) {
  5180. message.success('删除成功!');
  5181. this.setState({
  5182. loading: false,
  5183. });
  5184. } else {
  5185. message.warning(data.error[0].message);
  5186. };
  5187. this.contactLists(this.state.rowId);
  5188. }.bind(this));
  5189. } else {
  5190. this.contactLists(this.state.rowId);
  5191. }
  5192. },
  5193. //tab5业务意向
  5194. BusinessList(pageNo, uids) {
  5195. this.setState({
  5196. loading: true
  5197. });
  5198. $.ajax({
  5199. method: "post",
  5200. dataType: "json",
  5201. crossDomain: false,
  5202. url: globalConfig.context + '/api/admin/customer/listBusiness',
  5203. data: {
  5204. pageNo: pageNo || 1,
  5205. pageSize: this.state.paginationt.pageSize,
  5206. uid: uids ? uids : this.state.rowId
  5207. },
  5208. success: function(data) {
  5209. let theArr = [];
  5210. if(data.error.length || data.data.list == "") {
  5211. if(data.error && data.error.length) {
  5212. message.warning(data.error[0].message);
  5213. };
  5214. } else {
  5215. for(let i = 0; i < data.data.list.length; i++) {
  5216. let thisdata = data.data.list[i];
  5217. theArr.push({
  5218. key: i,
  5219. businessId: thisdata.businessId,
  5220. businessName: thisdata.businessName,
  5221. identifyName: thisdata.identifyName,
  5222. followSituation: thisdata.followSituation,
  5223. customerStatus: thisdata.customerStatus,
  5224. adminName: thisdata.adminName,
  5225. createTime: thisdata.createTime
  5226. });
  5227. };
  5228. this.state.paginationt.current = data.data.pageNo;
  5229. this.state.paginationt.total = data.data.totalCount;
  5230. };
  5231. this.setState({
  5232. dataBusiness: theArr,
  5233. paginationt: this.state.paginationt
  5234. });
  5235. }.bind(this),
  5236. }).always(function() {
  5237. this.setState({
  5238. loading: false
  5239. });
  5240. }.bind(this));
  5241. },
  5242. componentWillReceiveProps(nextProps) {
  5243. if(!this.props.visible && nextProps.visible) {
  5244. if(nextProps.data && nextProps.data.id) {
  5245. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  5246. };
  5247. this.state.data = {};
  5248. this.state.companyLogoUrl = [];
  5249. this.state.orgCodeUrl = [];
  5250. this.loadData(null);
  5251. };
  5252. },
  5253. render() {
  5254. const FormItem = Form.Item
  5255. const rowSelection = {
  5256. selectedRowKeys: this.state.selectedRowKeys,
  5257. onChange: (selectedRowKeys, selectedRows) => {
  5258. this.setState({
  5259. selectedRows: selectedRows.slice(-1),
  5260. selectedRowKeys: selectedRowKeys.slice(-1)
  5261. });
  5262. },
  5263. onSelect: (recordt, selected, selectedRows) => {
  5264. this.setState({
  5265. recordt: recordt.id
  5266. })
  5267. },
  5268. };
  5269. const rowSelections = {
  5270. selectedRowKeys: this.state.selectedRowKey,
  5271. onChange: (selectedRowKey, selectedRow) => {
  5272. this.setState({
  5273. selectedRow: selectedRow.slice(-1),
  5274. selectedRowKey: selectedRowKey.slice(-1)
  5275. });
  5276. },
  5277. onSelect: (records, selected, selectedRow) => {
  5278. this.setState({
  5279. selectedRow: selectedRow.slice(-1),
  5280. records: records.id,
  5281. })
  5282. },
  5283. };
  5284. const hasSelected = this.state.selectedRowKeys.length > 0;
  5285. const { RangePicker } = DatePicker;
  5286. const { getFieldDecorator } = this.props.form;
  5287. const formItemLayout = {
  5288. labelCol: { span: 8 },
  5289. wrapperCol: { span: 14 },
  5290. };
  5291. //const theDatak = this.state.datak || {};
  5292. const theInformation = this.state.dataInformation || {}
  5293. const contactsOption = "";
  5294. const formItemLayput = {
  5295. labelCol: { span: 10 },
  5296. wrapperCol: { span: 14 },
  5297. };
  5298. const contacts = this.state.contacts || '';
  5299. return(
  5300. <div className="user-content" >
  5301. <div className="content-title">
  5302. <span>公共单位客户管理</span>
  5303. </div>
  5304. <div className="user-search">
  5305. <Input placeholder="客户名称"
  5306. value={this.state.nameSearch}
  5307. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  5308. <Select placeholder="省"
  5309. style={{ width: 80 }}
  5310. value={this.state.provinceSearch}
  5311. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  5312. {this.state.Provinces}
  5313. </Select>
  5314. <span style={{marginRight:'10px'}}>
  5315. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  5316. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  5317. </span>
  5318. <span style={{marginRight:'10px'}}>客户类型:</span>
  5319. <Select placeholder="选择客户类型"
  5320. style={{ width: 100 }}
  5321. value={this.state.shareTypeSearch}
  5322. onChange={(e) => { this.setState({ shareTypeSearch: e }) }}>
  5323. <Select.Option value="" >所有客户</Select.Option>
  5324. <Select.Option value="1" >公共客户</Select.Option>
  5325. </Select>
  5326. <Button type="primary" onClick={this.search}>搜索</Button>
  5327. <Button onClick={this.reset}>重置</Button>
  5328. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  5329. <div className='clearfix' style={{marginTop:'5px'}}>
  5330. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  5331. <RangePicker
  5332. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  5333. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  5334. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  5335. <Select placeholder="账户状态"
  5336. style={{ width: 100 }}
  5337. value={this.state.statusSearch}
  5338. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  5339. <Select.Option value="0" >正常</Select.Option>
  5340. <Select.Option value="2" >锁定</Select.Option>
  5341. </Select>
  5342. <Select placeholder="行业"
  5343. style={{ width: 100 }}
  5344. value={this.state.industrySearch}
  5345. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  5346. {this.state.intentionalOption}
  5347. </Select>
  5348. <span>认证:</span>
  5349. <Select placeholder="业务认证"
  5350. style={{ width: 100 }}
  5351. value={this.state.serviceCertificationSearch}
  5352. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  5353. <Select.Option value="0" >未认证</Select.Option>
  5354. <Select.Option value="1" >已认证</Select.Option>
  5355. </Select>
  5356. <Select placeholder="实名认证"
  5357. style={{ width: 100 }}
  5358. value={this.state.userCertificationSearch}
  5359. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  5360. {
  5361. auditStatusL.map(function (item) {
  5362. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5363. })
  5364. }
  5365. </Select>
  5366. <span>国际:</span>
  5367. <Select placeholder="国际"
  5368. style={{ width: 100 }}
  5369. value={this.state.internationalSearch}
  5370. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  5371. <Select.Option value="0" >否</Select.Option>
  5372. <Select.Option value="1" >是</Select.Option>
  5373. </Select>
  5374. <span>高新:</span>
  5375. <Select placeholder="高新"
  5376. style={{ width: 100 }}
  5377. value={this.state.highTechZoneSearch}
  5378. onChange={(e) => { this.setState({ highTechZoneSearch: e }) }}>
  5379. <Select.Option value="0" >否</Select.Option>
  5380. <Select.Option value="1" >是</Select.Option>
  5381. </Select>
  5382. <span>上市:</span>
  5383. <Select placeholder="上市"
  5384. style={{ width: 100 }}
  5385. value={this.state.listedSearch}
  5386. onChange={(e) => { this.setState({ listedSearch: e }) }}>
  5387. <Select.Option value="0" >否</Select.Option>
  5388. <Select.Option value="1" >是</Select.Option>
  5389. </Select>
  5390. <span>会员:</span>
  5391. <Select placeholder="会员等级"
  5392. style={{ width: 100 }}
  5393. value={this.state.lvlSearch}
  5394. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  5395. {this.state.lvlArrOption}
  5396. </Select>
  5397. <Select placeholder="会员状态"
  5398. style={{ width: 100 }}
  5399. value={this.state.currentMemberStatusSearch}
  5400. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  5401. {this.state.currentMemberArrOption}
  5402. </Select>
  5403. <Select placeholder="社会性质"
  5404. style={{ width: 100 }}
  5405. value={this.state.societyTagSearch}
  5406. onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
  5407. {
  5408. socialAttribute.map(function (item) {
  5409. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5410. })
  5411. }
  5412. </Select>
  5413. </div>
  5414. </div>
  5415. </div>
  5416. <div className="patent-table">
  5417. <Spin spinning={this.state.loading}>
  5418. <Table columns={this.state.columns}
  5419. dataSource={this.state.dataSource}
  5420. rowSelection={rowSelection}
  5421. pagination={this.state.pagination}
  5422. onRowClick={this.tableRowClick}
  5423. />
  5424. </Spin>
  5425. </div>
  5426. <Modal
  5427. className="customeDetails"
  5428. title="单位客户详情"
  5429. width='1200px'
  5430. visible={this.state.modal5Visible}
  5431. onOk={this.detailsModal}
  5432. onCancel={this.detailsModal}
  5433. footer=''
  5434. >
  5435. <Tabs defaultActiveKey="1" onChange={this.callback} activeKey={this.state.callnub}>
  5436. <TabPane tab="基本信息" key="1">
  5437. {adminData.isSuperAdmin?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
  5438. <Spin spinning={this.state.loading}>
  5439. <div className="clearfix" style={{paddingLeft:'60px'}}>
  5440. <FormItem className="half-item"
  5441. labelCol={{ span: 4 }}
  5442. wrapperCol={{ span: 18 }}
  5443. label="客户名称"
  5444. >
  5445. <span>{theInformation.identifyName}</span>
  5446. </FormItem>
  5447. </div>
  5448. <div className="clearfix" style={{paddingLeft:'60px'}}>
  5449. <FormItem className="half-item"
  5450. labelCol={{ span: 4 }}
  5451. wrapperCol={{ span: 18 }}
  5452. label="行业">
  5453. <Select placeholder="选择行业" value={this.state.industry} style={{width:'300px'}}
  5454. onChange={(e)=>{this.setState({industry:e})}}>
  5455. {
  5456. industry.map(function (item) {
  5457. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5458. })
  5459. }
  5460. </Select>
  5461. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  5462. </FormItem>
  5463. <FormItem className="half-item"
  5464. labelCol={{ span: 4 }}
  5465. wrapperCol={{ span: 18 }}
  5466. label="社会属性"
  5467. >
  5468. <Select placeholder="客户社会属性(必填项)" value={this.state.societyTag} style={{width:'300px'}}
  5469. onChange={(e)=>{this.setState({societyTag:e})}}>
  5470. {
  5471. socialAttribute.map(function (item) {
  5472. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5473. })
  5474. }
  5475. </Select>
  5476. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  5477. </FormItem>
  5478. <FormItem className="half-item"
  5479. labelCol={{ span: 4 }}
  5480. wrapperCol={{ span: 18 }}
  5481. label="省-市-区"
  5482. >
  5483. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
  5484. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  5485. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  5486. </FormItem>
  5487. <FormItem className="half-item"
  5488. labelCol={{ span: 4 }}
  5489. wrapperCol={{ span: 18 }}
  5490. label="通信地址"
  5491. >
  5492. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  5493. onChange={(e)=>{this.setState({postalAddress:e.target.value})}}/>
  5494. </FormItem>
  5495. <FormItem className="half-item"
  5496. labelCol={{ span: 4 }}
  5497. wrapperCol={{ span: 18 }}
  5498. label="固定电话"
  5499. >
  5500. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  5501. onChange={(e)=>{this.setState({contactsFixedTel:e.target.value})}}/>
  5502. </FormItem>
  5503. <FormItem className="half-item"
  5504. labelCol={{ span: 4 }}
  5505. wrapperCol={{ span: 18 }}
  5506. label="客户传真"
  5507. >
  5508. <Input placeholder="客户传真" value={this.state.contactsFax}
  5509. onChange={(e)=>{this.setState({contactsFax:e.target.value})}}/>
  5510. </FormItem>
  5511. <FormItem className="half-item"
  5512. labelCol={{ span: 4 }}
  5513. wrapperCol={{ span: 18 }}
  5514. label="注册资本"
  5515. >
  5516. <Input placeholder="注册资本" value={this.state.registeredCapital}
  5517. onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
  5518. </FormItem>
  5519. <FormItem className="half-item"
  5520. labelCol={{ span: 4 }}
  5521. wrapperCol={{ span: 18 }}
  5522. label="单位规模"
  5523. >
  5524. <Input placeholder="单位规模" value={this.state.enterpriseScale}
  5525. onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
  5526. </FormItem>
  5527. <FormItem className="half-item"
  5528. labelCol={{ span: 4 }}
  5529. wrapperCol={{ span: 18 }}
  5530. label="法人名称"
  5531. >
  5532. <Input placeholder="法人名称" value={this.state.legalPerson}
  5533. onChange={(e)=>{this.setState({legalPerson:e.target.value})}}/>
  5534. </FormItem>
  5535. <FormItem className="half-item"
  5536. labelCol={{ span: 4 }}
  5537. wrapperCol={{ span: 18 }}
  5538. label="身份证号码"
  5539. >
  5540. <Input placeholder="法人身份证号码" value={this.state.legalPersonIdCard}
  5541. onChange={(e)=>{this.setState({legalPersonIdCard:e.target.value})}}/>
  5542. </FormItem>
  5543. <FormItem className="half-item"
  5544. labelCol={{ span: 4 }}
  5545. wrapperCol={{ span: 18 }}
  5546. label="法人电话"
  5547. >
  5548. <Input placeholder="法人电话" value={this.state.legalPersonTel}
  5549. onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}}/>
  5550. </FormItem>
  5551. <FormItem className="half-item"
  5552. labelCol={{ span: 4 }}
  5553. wrapperCol={{ span: 18 }}
  5554. label="电子邮箱"
  5555. >
  5556. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  5557. onChange={(e)=>{this.setState({legalPersonEmail:e.target.value})}}/>
  5558. </FormItem>
  5559. <FormItem className="half-item"
  5560. labelCol={{ span: 4 }}
  5561. wrapperCol={{ span: 18 }}
  5562. label="机构代码"
  5563. >
  5564. <Input placeholder="社会同意机构代码" value={this.state.orgCode}
  5565. onChange={(e)=>{this.setState({orgCode:e.target.value})}}/>
  5566. </FormItem>
  5567. <FormItem className="half-item"
  5568. labelCol={{ span: 4 }}
  5569. wrapperCol={{ span: 18 }}
  5570. label="分配指定人"
  5571. >
  5572. <Select placeholder="请选择指定人" value={this.state.editSuperId} onChange={(e)=>{this.setState({editSuperId:e})}}
  5573. notFoundContent="未获取到部门员工">
  5574. {this.state.contactsOption}
  5575. </Select>
  5576. </FormItem>
  5577. <div className="clearfix">
  5578. <FormItem className="half-item"
  5579. labelCol={{ span: 4 }}
  5580. wrapperCol={{ span: 18 }}
  5581. label="业务认证"
  5582. >
  5583. {adminData.isSuperAdmin?<Radio.Group value={this.state.businessAudit} onChange={(e) => {
  5584. this.setState({ businessAudit: e.target.value })
  5585. }}>
  5586. <Radio value={0}>未认证</Radio>
  5587. <Radio value={1}>已认证</Radio>
  5588. </Radio.Group>:<span>{this.state.businessAudit?'是':'否'}</span>}
  5589. </FormItem>
  5590. <FormItem className="half-item"
  5591. labelCol={{ span: 4 }}
  5592. wrapperCol={{ span: 18 }}
  5593. label="高新"
  5594. >
  5595. <Radio.Group value={this.state.highTechZone} onChange={(e) => {
  5596. this.setState({highTechZone:e.target.value})
  5597. }}>
  5598. <Radio value={0}>否</Radio>
  5599. <Radio value={1}>是</Radio>
  5600. </Radio.Group>
  5601. </FormItem>
  5602. <FormItem className="half-item"
  5603. labelCol={{ span: 4 }}
  5604. wrapperCol={{ span: 18 }}
  5605. label="上市"
  5606. >
  5607. <Radio.Group value={this.state.listed} onChange={(e) => {
  5608. this.setState({listed:e.target.value })
  5609. }}>
  5610. <Radio value={0}>否</Radio>
  5611. <Radio value={1}>是</Radio>
  5612. </Radio.Group>
  5613. </FormItem>
  5614. <FormItem className="half-item"
  5615. labelCol={{ span: 4 }}
  5616. wrapperCol={{ span: 18 }}
  5617. label="国际化"
  5618. >
  5619. <Radio.Group value={this.state.international} onChange={(e) => {
  5620. this.setState({international:e.target.value })
  5621. }}>
  5622. <Radio value={0}>否</Radio>
  5623. <Radio value={1}>是</Radio>
  5624. </Radio.Group>
  5625. </FormItem>
  5626. </div>
  5627. <div className="clearfix pictures">
  5628. <FormItem
  5629. labelCol={{ span: 4 }}
  5630. wrapperCol={{ span: 18 }}
  5631. label="机构证(PIC)" >
  5632. <PicturesWalls
  5633. pictureSign="PIC"
  5634. fileList={this.getOrgCodeUrl}
  5635. pictureUrl={this.state.orgCodeUrl} />
  5636. <p>图片建议:图片要清晰。</p>
  5637. </FormItem>
  5638. <FormItem
  5639. labelCol={{ span: 4 }}
  5640. wrapperCol={{ span: 18 }}
  5641. label="单位logo" >
  5642. <PicturesWalls
  5643. pictureSign="logo"
  5644. fileList={this.getCompanyLogoUrl}
  5645. pictureUrl={this.state.companyLogoUrl} />
  5646. <p>图片建议:图片要清晰。</p>
  5647. </FormItem>
  5648. </div>
  5649. <div className="clearfix">
  5650. <FormItem
  5651. labelCol={{ span: 2 }}
  5652. wrapperCol={{ span: 18 }}
  5653. label="业务范围" >
  5654. <Input type="textarea" rows={4} value={this.state.businessScope}
  5655. onChange={(e)=>{this.setState({businessScope:e.target.value})}}/>
  5656. </FormItem>
  5657. <FormItem
  5658. labelCol={{ span: 2 }}
  5659. wrapperCol={{ span: 18 }}
  5660. label="单位简介" >
  5661. <Input type="textarea" rows={4} value={this.state.introduction}
  5662. onChange={(e)=>{this.setState({introduction:e.target.value})}}/>
  5663. </FormItem>
  5664. </div>
  5665. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'90px',marginBottom:'30px'}}>保存</Button>
  5666. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  5667. </div>
  5668. </Spin>
  5669. </Form> :<Form horizontal id="demand-form">
  5670. <Spin spinning={this.state.loading}>
  5671. <div className="clearfix" style={{paddingLeft:'60px'}}>
  5672. <FormItem className="half-item"
  5673. labelCol={{ span: 4 }}
  5674. wrapperCol={{ span: 18 }}
  5675. label="客户名称"
  5676. >
  5677. <span>{theInformation.identifyName}</span>
  5678. </FormItem>
  5679. </div>
  5680. <div className="clearfix" style={{paddingLeft:'60px'}}>
  5681. <FormItem className="half-item"
  5682. labelCol={{ span: 4 }}
  5683. wrapperCol={{ span: 18 }}
  5684. label="行业"
  5685. >
  5686. <span>{getIndustry(String(theInformation.industry))}</span>
  5687. </FormItem>
  5688. <FormItem className="half-item"
  5689. labelCol={{ span: 4 }}
  5690. wrapperCol={{ span: 18 }}
  5691. label="社会属性"
  5692. >
  5693. <span>{getSocialAttribute(theInformation.societyTag)}</span>
  5694. </FormItem>
  5695. <FormItem className="half-item"
  5696. labelCol={{ span: 4 }}
  5697. wrapperCol={{ span: 18 }}
  5698. label="省-市-区"
  5699. >
  5700. <span>{this.state.proviceCityArea}</span>
  5701. </FormItem>
  5702. <FormItem className="half-item"
  5703. labelCol={{ span: 4 }}
  5704. wrapperCol={{ span: 18 }}
  5705. label="通信地址"
  5706. >
  5707. <span>{theInformation.postalAddress}</span>
  5708. </FormItem>
  5709. <FormItem className="half-item"
  5710. labelCol={{ span: 4 }}
  5711. wrapperCol={{ span: 18 }}
  5712. label="固定电话"
  5713. >
  5714. <span>{theInformation.contactsFixedTel}</span>
  5715. </FormItem>
  5716. <FormItem className="half-item"
  5717. labelCol={{ span: 4 }}
  5718. wrapperCol={{ span: 18 }}
  5719. label="客户传真"
  5720. >
  5721. <span>{theInformation.contactsFax}</span>
  5722. </FormItem>
  5723. <FormItem className="half-item"
  5724. labelCol={{ span: 4 }}
  5725. wrapperCol={{ span: 18 }}
  5726. label="注册资本"
  5727. >
  5728. <span>{theInformation.registeredCapital}</span>
  5729. </FormItem>
  5730. <FormItem className="half-item"
  5731. labelCol={{ span: 4 }}
  5732. wrapperCol={{ span: 18 }}
  5733. label="单位规模"
  5734. >
  5735. <span>{theInformation.enterpriseScale}</span>
  5736. </FormItem>
  5737. <FormItem className="half-item"
  5738. labelCol={{ span: 4 }}
  5739. wrapperCol={{ span: 18 }}
  5740. label="法人名称"
  5741. >
  5742. <span>{theInformation.legalPerson}</span>
  5743. </FormItem>
  5744. <FormItem className="half-item"
  5745. labelCol={{ span: 4 }}
  5746. wrapperCol={{ span: 18 }}
  5747. label="身份证号码"
  5748. >
  5749. <span>{theInformation.legalPersonIdCard}</span>
  5750. </FormItem>
  5751. <FormItem className="half-item"
  5752. labelCol={{ span: 4 }}
  5753. wrapperCol={{ span: 18 }}
  5754. label="法人电话"
  5755. >
  5756. <span>{theInformation.legalPersonTel}</span>
  5757. </FormItem>
  5758. <FormItem className="half-item"
  5759. labelCol={{ span: 4 }}
  5760. wrapperCol={{ span: 18 }}
  5761. label="电子邮箱"
  5762. >
  5763. <span>{theInformation.legalPersonEmail}</span>
  5764. </FormItem>
  5765. <FormItem className="half-item"
  5766. labelCol={{ span: 4 }}
  5767. wrapperCol={{ span: 18 }}
  5768. label="投资机构"
  5769. >
  5770. <span>{this.state.investment?'是':'否'}</span>
  5771. </FormItem>
  5772. <FormItem className="half-item"
  5773. labelCol={{ span: 4 }}
  5774. wrapperCol={{ span: 18 }}
  5775. label="高新"
  5776. >
  5777. <span>{this.state.highTechZone?'是':'否'}</span>
  5778. </FormItem>
  5779. <FormItem className="half-item"
  5780. labelCol={{ span: 4 }}
  5781. wrapperCol={{ span: 18 }}
  5782. label="上市"
  5783. >
  5784. <span>{this.state.listed?'是':'否'}</span>
  5785. </FormItem>
  5786. <FormItem className="half-item"
  5787. labelCol={{ span: 4 }}
  5788. wrapperCol={{ span: 18 }}
  5789. label="国际化"
  5790. >
  5791. <span>{this.state.international?'是':'否'}</span>
  5792. </FormItem>
  5793. <FormItem className="half-item"
  5794. labelCol={{ span: 4 }}
  5795. wrapperCol={{ span: 18 }}
  5796. label="机构代码"
  5797. >
  5798. <span>{theInformation.orgCode}</span>
  5799. </FormItem>
  5800. <div className="clearfix pictures">
  5801. <FormItem
  5802. labelCol={{ span: 4 }}
  5803. wrapperCol={{ span: 18 }}
  5804. label="机构证(PIC)" >
  5805. <div className="clearfix">
  5806. <Upload className="demandDetailShow-upload"
  5807. listType="picture-card"
  5808. fileList={this.state.orgCodeUrl}
  5809. onPreview={(file) => {
  5810. this.setState({
  5811. previewImage: file.url || file.thumbUrl,
  5812. previewVisible: true,
  5813. });
  5814. }} >
  5815. </Upload>
  5816. <Modal maskClosable={false} footer={null}
  5817. visible={this.state.previewVisible}
  5818. onCancel={() => { this.setState({ previewVisible: false }) }}>
  5819. <img alt="" style={{ width: '100%' }} src={this.state.orgCodeUrl || ''} />
  5820. </Modal>
  5821. </div>
  5822. </FormItem>
  5823. <FormItem
  5824. labelCol={{ span: 4 }}
  5825. wrapperCol={{ span: 18 }}
  5826. label="单位logo" >
  5827. <div className="clearfix">
  5828. <Upload className="demandDetailShow-upload"
  5829. listType="picture-card"
  5830. fileList={this.state.companyLogoUrl}
  5831. onPreview={(file) => {
  5832. this.setState({
  5833. previewImage: file.url || file.thumbUrl,
  5834. previewVisible: true,
  5835. });
  5836. }} >
  5837. </Upload>
  5838. <Modal maskClosable={false} footer={null}
  5839. visible={this.state.previewVisible}
  5840. onCancel={() => { this.setState({ previewVisible: false }) }}>
  5841. <img alt="" style={{ width: '100%' }} src={this.state.companyLogoUrl || ''} />
  5842. </Modal>
  5843. </div>
  5844. </FormItem>
  5845. </div>
  5846. <div className="clearfix">
  5847. <FormItem
  5848. labelCol={{ span: 2 }}
  5849. wrapperCol={{ span: 18 }}
  5850. label="业务范围" >
  5851. <span>{theInformation.businessScope}</span>
  5852. </FormItem>
  5853. <FormItem
  5854. labelCol={{ span: 2 }}
  5855. wrapperCol={{ span: 18 }}
  5856. label="单位简介" >
  5857. <span>{theInformation.introduction}</span>
  5858. </FormItem>
  5859. </div>
  5860. </div>
  5861. </Spin>
  5862. </Form>}
  5863. </TabPane>
  5864. <TabPane tab="联系人信息" key="2">
  5865. <div className="clearfix" >
  5866. <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>新增</Button>
  5867. </div>
  5868. <div className="clearfix">
  5869. <Spin spinning={this.state.loading}>
  5870. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  5871. <Table
  5872. pagination={false}
  5873. columns={this.state.ContactsLists}
  5874. dataSource={this.state.contactList}
  5875. />
  5876. <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
  5877. <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
  5878. <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
  5879. </div>
  5880. </Form>
  5881. </Spin>
  5882. </div>
  5883. </TabPane>
  5884. <TabPane tab="账户信息" key="3">
  5885. <div className="clearfix">
  5886. <Form horizontal id="demand-form" onSubmit={this.accountSave} >
  5887. <Spin spinning={this.state.loading} >
  5888. <div className="clearfix">
  5889. <FormItem className="half-item"
  5890. {...formItemLayout}
  5891. label="注册手机号" >
  5892. {adminData.isSuperAdmin?<div><Input value={this.state.mobile} disabled onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  5893. <Button onClick={this.modifyPassworld}>修改密码</Button></div>:<span>{this.state.mobile}</span>}
  5894. </FormItem>
  5895. <FormItem className="half-item"
  5896. {...formItemLayout}
  5897. label="注册用户名" >
  5898. {adminData.isSuperAdmin?<Input value={this.state.nickname}
  5899. onChange={(e) => { this.setState({ nickname: e.target.value }); }} />:<span>{this.state.nickname}</span>}
  5900. </FormItem>
  5901. <FormItem className="half-item"
  5902. {...formItemLayout}
  5903. label="注册邮箱" >
  5904. {adminData.isSuperAdmin?<Input value={this.state.email}
  5905. onChange={(e) => { this.setState({ email: e.target.value }); }} />:<span>{this.state.nickname}</span>}
  5906. </FormItem>
  5907. </div>
  5908. <FormItem className="half-item"
  5909. {...formItemLayout}
  5910. label="客户来源" >
  5911. <span>{this.state.source}</span>
  5912. </FormItem>
  5913. <FormItem className="half-item"
  5914. {...formItemLayout}
  5915. label="客户类型" >
  5916. <span>{this.state.type}</span>
  5917. </FormItem>
  5918. <FormItem className="half-item"
  5919. {...formItemLayout}
  5920. label="创建时间" >
  5921. <span>{this.state.createTimes}</span>
  5922. </FormItem>
  5923. <FormItem className="half-item"
  5924. {...formItemLayout}
  5925. label="账户状态"
  5926. >
  5927. {adminData.isSuperAdmin?<Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  5928. {
  5929. statuslist.map(function (item) {
  5930. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5931. })
  5932. }
  5933. </Select>:<span>{getStatuslist(this.state.status)}</span>}
  5934. </FormItem>
  5935. <div className="clearfix">
  5936. <FormItem className="half-item"
  5937. {...formItemLayout}
  5938. label="会员"
  5939. >
  5940. {adminData.isSuperAdmin?<Radio.Group value={this.state.isMember} onChange={(e) => {
  5941. this.setState({ isMember: e.target.value })
  5942. }}>
  5943. <Radio value={0}>否</Radio>
  5944. <Radio value={1}>是</Radio>
  5945. </Radio.Group>:<span>{this.state.isMember?'是':'否'}</span>}
  5946. </FormItem>
  5947. <FormItem className="half-item"
  5948. {...formItemLayout}
  5949. label="会员等级"
  5950. >
  5951. {adminData.isSuperAdmin?<Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  5952. {
  5953. lvl.map(function (item) {
  5954. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5955. })
  5956. }
  5957. </Select>:<span>{getLvl(this.state.lvl)}</span>}
  5958. </FormItem>
  5959. <FormItem className="half-item"
  5960. {...formItemLayout}
  5961. label="会员状态"
  5962. >
  5963. {adminData.isSuperAdmin?<Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  5964. {
  5965. currentMember.map(function (item) {
  5966. return <Select.Option key={item.value} >{item.key}</Select.Option>
  5967. })
  5968. }
  5969. </Select>:<span>{getCurrentMember(this.state.currentMemberStatus)}</span>}
  5970. </FormItem>
  5971. </div>
  5972. <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
  5973. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  5974. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  5975. </div>
  5976. </Spin>
  5977. </Form>
  5978. </div>
  5979. </TabPane>
  5980. <TabPane tab="客户拜访" key="4">
  5981. <div className="clearfix">
  5982. <Spin spinning={this.state.loading}>
  5983. <Table
  5984. pagination={false}
  5985. columns={this.state.visitsList}
  5986. dataSource={this.state.visitArrList}
  5987. onRowClick={this.VisitRowClick}
  5988. />
  5989. </Spin>
  5990. </div>
  5991. </TabPane>
  5992. <TabPane tab="业务意向" key="5">
  5993. <div className="clearfix">
  5994. <Spin spinning={this.state.loading}>
  5995. <Table
  5996. pagination={this.state.paginationt}
  5997. columns={this.state.businessIntentionList}
  5998. dataSource={this.state.dataBusiness}
  5999. />
  6000. </Spin>
  6001. </div>
  6002. </TabPane>
  6003. <TabPane tab="业务订单" key="6">
  6004. </TabPane>
  6005. <TabPane tab="技术需求" key="7">
  6006. </TabPane>
  6007. <TabPane tab="技术成果" key="8">
  6008. </TabPane>
  6009. <TabPane tab="技术专家" key="9">
  6010. </TabPane>
  6011. </Tabs>
  6012. </Modal>
  6013. <Modal
  6014. className="customeDetails"
  6015. footer=''
  6016. title="拜访详情"
  6017. width='1000px'
  6018. visible={this.state.visitModul}
  6019. onOk={this.visitOk}
  6020. onCancel={this.visitCancel}
  6021. >
  6022. <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
  6023. {adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
  6024. <div className="clearfix">
  6025. <FormItem className="half-item"
  6026. {...formItemLayout}
  6027. label="拜访方式" >
  6028. <Radio.Group value={this.state.contactType} onChange={(e) => {
  6029. this.setState({ contactType: e.target.value })
  6030. }}>
  6031. <Radio value={0}>外出</Radio>
  6032. <Radio value={1}>电话</Radio>
  6033. <Radio value={2}>QQ</Radio>
  6034. <Radio value={3}>微信</Radio>
  6035. <Radio value={4}>邮箱</Radio>
  6036. </Radio.Group>
  6037. </FormItem>
  6038. <FormItem className="half-item"
  6039. {...formItemLayout}
  6040. >
  6041. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
  6042. </FormItem>
  6043. <div className="clearfix">
  6044. <FormItem className="half-item"
  6045. {...formItemLayout}
  6046. label="客户名称"
  6047. >
  6048. <span>{this.state.identifyName}</span>
  6049. </FormItem>
  6050. <FormItem className="half-item"
  6051. {...formItemLayout}
  6052. label="拜访人"
  6053. >
  6054. <span>{this.state.adminName}</span>
  6055. </FormItem>
  6056. <FormItem className="half-item"
  6057. {...formItemLayout}
  6058. label="当前联系人"
  6059. >
  6060. <span>{this.state.contacts}</span>
  6061. </FormItem>
  6062. {this.state.contacts?<span></span>:
  6063. <FormItem className="half-item"
  6064. {...formItemLayout}
  6065. label="联系人"
  6066. >
  6067. <Select placeholder="选择联系人" style={{ width: 140 }}
  6068. value={this.state.lastName}
  6069. onChange={this.hundleName}>
  6070. {this.state.orderStatusOption}
  6071. </Select>
  6072. </FormItem>
  6073. }
  6074. <FormItem className="half-item"
  6075. {...formItemLayout}
  6076. label="拜访时间"
  6077. >
  6078. <span>{this.state.followTime}</span>
  6079. </FormItem>
  6080. <FormItem className="half-item"
  6081. {...formItemLayout}
  6082. label="联系电话"
  6083. >
  6084. <span>{this.state.nub}</span>
  6085. </FormItem>
  6086. </div>
  6087. <div className="clearfix">
  6088. <FormItem
  6089. labelCol={{ span: 4 }}
  6090. wrapperCol={{ span: 16 }}
  6091. label="拜访备注" >
  6092. <Input type="textarea" rows={4} value={this.state.result}
  6093. onChange={(e)=>{this.setState({result:e.target.value})}}/>
  6094. </FormItem>
  6095. </div>
  6096. <div className="clearfix">
  6097. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  6098. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  6099. <Spin spinning={this.state.loading}>
  6100. <Table
  6101. rowKey={record => record.id}
  6102. pagination={false}
  6103. columns={this.state.intentionList}
  6104. dataSource={this.state.data}
  6105. />
  6106. </Spin>
  6107. </div>
  6108. </div>
  6109. </div>
  6110. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
  6111. <Button size="large" onClick={this.visitCancel}>取消</Button>
  6112. </Spin>:<Spin spinning={this.state.loading}>
  6113. <div className="clearfix">
  6114. <FormItem className="half-item"
  6115. {...formItemLayout}
  6116. label="拜访方式" >
  6117. <span>{getContactType(String(this.state.contactType))}</span>
  6118. </FormItem>
  6119. <div className="clearfix">
  6120. <FormItem className="half-item"
  6121. {...formItemLayout}
  6122. label="客户名称"
  6123. >
  6124. <span>{this.state.identifyName}</span>
  6125. </FormItem>
  6126. <FormItem className="half-item"
  6127. {...formItemLayout}
  6128. label="拜访人"
  6129. >
  6130. <span>{this.state.adminName}</span>
  6131. </FormItem>
  6132. <FormItem className="half-item"
  6133. {...formItemLayout}
  6134. label="当前联系人"
  6135. >
  6136. <span>{this.state.contacts}</span>
  6137. </FormItem>
  6138. <FormItem className="half-item"
  6139. {...formItemLayout}
  6140. label="拜访时间"
  6141. >
  6142. <span>{this.state.followTime}</span>
  6143. </FormItem>
  6144. <FormItem className="half-item"
  6145. {...formItemLayout}
  6146. label="联系电话"
  6147. >
  6148. <span>{this.state.nub}</span>
  6149. </FormItem>
  6150. </div>
  6151. <div className="clearfix">
  6152. <FormItem
  6153. labelCol={{ span: 4 }}
  6154. wrapperCol={{ span: 16 }}
  6155. label="拜访备注" >
  6156. <span>{this.state.result}</span>
  6157. </FormItem>
  6158. </div>
  6159. <div className="clearfix">
  6160. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  6161. <Spin spinning={this.state.loading}>
  6162. <Table
  6163. rowKey={record => record.id}
  6164. pagination={false}
  6165. columns={this.state.intentionList}
  6166. dataSource={this.state.data}
  6167. />
  6168. </Spin>
  6169. </div>
  6170. </div>
  6171. </div>
  6172. </Spin>}
  6173. </Form>
  6174. </Modal>
  6175. <Modal
  6176. footer=''
  6177. title="修改密码"
  6178. width='600px'
  6179. visible={this.state.passworldModul}
  6180. onOk={this.passworldOk}
  6181. onCancel={this.passworldCancel}
  6182. >
  6183. <div className="clearfix">
  6184. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  6185. <Spin spinning={this.state.loading}>
  6186. <div className="clearfix">
  6187. <FormItem className="half-item"
  6188. {...formItemLayout}
  6189. label="原密码" >
  6190. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  6191. </FormItem>
  6192. </div>
  6193. <div className="clearfix">
  6194. <FormItem className="half-item"
  6195. {...formItemLayout}
  6196. label="新密码" >
  6197. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
  6198. </FormItem>
  6199. </div>
  6200. <div className="clearfix">
  6201. <FormItem className="half-item"
  6202. {...formItemLayout}
  6203. label="确认密码" >
  6204. <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  6205. </FormItem>
  6206. </div>
  6207. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  6208. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  6209. </Spin>
  6210. </Form>
  6211. </div>
  6212. </Modal>
  6213. <Modal
  6214. footer=''
  6215. width='800px'
  6216. title="新增联系人"
  6217. visible={this.state.addcontactModul}
  6218. onOk={this.addcontactModulOK}
  6219. onCancel={this.addcontactModulcancel}
  6220. >
  6221. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  6222. <Spin spinning={this.state.loading}>
  6223. <Row>
  6224. <FormItem
  6225. labelCol={{ span: 3 }}
  6226. wrapperCol={{ span: 14 }}
  6227. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  6228. <Radio.Group value={this.state.newsex} onChange={(e) => {
  6229. this.setState({ newsex: e.target.value })
  6230. }}>
  6231. <Radio value='男'>男</Radio>
  6232. <Radio value='女'>女</Radio>
  6233. </Radio.Group>
  6234. </FormItem>
  6235. </Row>
  6236. <Row style={{ paddingLeft:'50px' }}>
  6237. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  6238. <Col span={8}>
  6239. <Input value={this.state.newname} required="required"
  6240. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  6241. </Col>
  6242. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  6243. <Col span={8}>
  6244. <Input value={this.state.newmobile} required="required"
  6245. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  6246. </Col>
  6247. </Row>
  6248. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  6249. <Col span={2}>微信:</Col>
  6250. <Col span={8}>
  6251. <Input value={this.state.newwechat}
  6252. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  6253. </Col>
  6254. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  6255. <Col span={8}>
  6256. <Input value={this.state.newqq}
  6257. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  6258. </Col>
  6259. </Row>
  6260. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  6261. <Col span={2}>部门:</Col>
  6262. <Col span={8}>
  6263. <Input value={this.state.newdepatrment}
  6264. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  6265. </Col>
  6266. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  6267. <Col span={8}>
  6268. <Input value={this.state.newposition}
  6269. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  6270. </Col>
  6271. </Row>
  6272. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  6273. <Col span={2}>邮箱:</Col>
  6274. <Col span={8}>
  6275. <Input value={this.state.newemail}
  6276. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  6277. </Col>
  6278. </Row>
  6279. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  6280. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  6281. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  6282. </Row>
  6283. </Spin>
  6284. </Form>
  6285. </Modal>
  6286. <Modal
  6287. footer=''
  6288. title="业务意向详情"
  6289. width='1000px'
  6290. visible={this.state.businessModul}
  6291. onOk={this.businessIntentionOk}
  6292. onCancel={this.businessIntentionCancel}
  6293. >
  6294. <div className="clearfix">
  6295. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  6296. <Spin spinning={this.state.loading}>
  6297. <div className="clearfix">
  6298. <FormItem className="half-item"
  6299. {...formItemLayout}
  6300. label="意向业务名称" >
  6301. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  6302. </FormItem>
  6303. <FormItem className="half-item"
  6304. {...formItemLayout}
  6305. label="意向时间" >
  6306. <span>{this.state.createTime}</span>
  6307. </FormItem>
  6308. <FormItem className="half-item"
  6309. {...formItemLayout}
  6310. label="客户名称" >
  6311. <span>{this.state.identifyName}</span>
  6312. </FormItem>
  6313. <FormItem className="half-item"
  6314. {...formItemLayout}
  6315. label="营销员" >
  6316. <span>{this.state.adminName}</span>
  6317. </FormItem>
  6318. <FormItem className="half-item"
  6319. {...formItemLayout}
  6320. label="意向业务进度" >
  6321. <span>{getfllowSituation(this.state.followSituation)}</span>
  6322. </FormItem>
  6323. <FormItem className="half-item"
  6324. {...formItemLayout}
  6325. label="业务客户状态" >
  6326. <span>{getcustomerStatue(this.state.customerStatus)}</span>
  6327. </FormItem>
  6328. </div>
  6329. <div className="clearfix">
  6330. <FormItem className="half-item"
  6331. {...formItemLayout}
  6332. label="业务意向说明" >
  6333. <span>{this.state.remarks}</span>
  6334. </FormItem>
  6335. </div>
  6336. <div className="clearfix">
  6337. <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
  6338. <div className="clearfix">
  6339. <Spin spinning={this.state.loading}>
  6340. <Table
  6341. pagination={this.state.paginations}
  6342. columns={this.state.businessFollowList}
  6343. dataSource={this.state.visitArrList}
  6344. />
  6345. </Spin>
  6346. </div>
  6347. </div>
  6348. </Spin>
  6349. </Form>
  6350. </div>
  6351. </Modal>
  6352. <Modal
  6353. footer=''
  6354. title="业务跟进详情"
  6355. width='600px'
  6356. visible={this.state.businessFollowModul}
  6357. onOk={this.businessFollowOk}
  6358. onCancel={this.businessFollowCancel}
  6359. >
  6360. <div className="clearfix">
  6361. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  6362. <Spin spinning={this.state.loading}>
  6363. <div className="clearfix">
  6364. <FormItem className="half-item"
  6365. {...formItemLayout}
  6366. label="意向业务名称" >
  6367. <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
  6368. </FormItem>
  6369. <FormItem className="half-item"
  6370. {...formItemLayout}
  6371. label="意向时间" >
  6372. <span>{this.state.createTimes}</span>
  6373. </FormItem>
  6374. <FormItem className="half-item"
  6375. {...formItemLayout}
  6376. label="客户名称" >
  6377. <span>{this.state.identifyNames}</span>
  6378. </FormItem>
  6379. <FormItem className="half-item"
  6380. {...formItemLayout}
  6381. label="营销员" >
  6382. <span>{this.state.adminNames}</span>
  6383. </FormItem>
  6384. <FormItem className="half-item"
  6385. {...formItemLayout}
  6386. label="意向业务进度" >
  6387. <span>{getfllowSituation(this.state.followSituations)}</span>
  6388. </FormItem>
  6389. <FormItem className="half-item"
  6390. {...formItemLayout}
  6391. label="业务客户状态" >
  6392. <span>{getcustomerStatue(this.state.customerStatuss)}</span>
  6393. </FormItem>
  6394. </div>
  6395. <div className="clearfix">
  6396. <FormItem className="half-item"
  6397. {...formItemLayout}
  6398. label="业务意向说明" >
  6399. <span>{this.state.remarkss}</span>
  6400. </FormItem>
  6401. </div>
  6402. <div className="clearfix">
  6403. <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
  6404. <FormItem className="half-item"
  6405. {...formItemLayout}
  6406. label="拜访方式" >
  6407. <span>{getContactType(this.state.contactTypes)}</span>
  6408. </FormItem>
  6409. <FormItem className="half-item"
  6410. {...formItemLayout}
  6411. label="联系人" >
  6412. <span>{this.state.contactss}</span>
  6413. </FormItem>
  6414. <FormItem className="half-item"
  6415. {...formItemLayout}
  6416. label="联系电话" >
  6417. <span>{this.state.contactMobiles}</span>
  6418. </FormItem>
  6419. <FormItem className="half-item"
  6420. {...formItemLayout}
  6421. label="拜访时间" >
  6422. <span>{this.state.followTimes}</span>
  6423. </FormItem>
  6424. <FormItem className="half-item"
  6425. {...formItemLayout}
  6426. label="拜访人" >
  6427. <span>{this.state.adminNames}</span>
  6428. </FormItem>
  6429. <div className="clearfix">
  6430. <FormItem className="half-item"
  6431. {...formItemLayout}
  6432. label="拜访备注" >
  6433. <span>{this.state.results}</span>
  6434. </FormItem>
  6435. </div>
  6436. </div>
  6437. </Spin>
  6438. </Form>
  6439. </div>
  6440. </Modal>
  6441. </div >
  6442. );
  6443. }
  6444. }));
  6445. const Tablees=Form.create()(React.createClass({
  6446. //详情tab切换数据处理
  6447. callbacks(e) {
  6448. this.setState({
  6449. callnubs: e,
  6450. })
  6451. if(e == '1') {
  6452. }
  6453. if(e == '2') {
  6454. }
  6455. },
  6456. getInitialState() {
  6457. return {
  6458. callnubs: "1",
  6459. }
  6460. },
  6461. render() {
  6462. return(
  6463. <div className="clearfix" style={{marginTop:'0px',marginLeft:'20px'}}>
  6464. <Tabs onChange={this.callbacks} type="card" activeKey={this.state.callnubs} style={{paddingLeft:'15px',paddingRight:'15px',marginRight:'20px'}}>
  6465. <TabPane tab="个人客户" key="1" >
  6466. <QueryCustomer />
  6467. </TabPane>
  6468. <TabPane tab="单位客户" key="2">
  6469. <PublicCustomer />
  6470. </TabPane>
  6471. </Tabs>
  6472. </div>
  6473. );
  6474. }
  6475. }));
  6476. export default Tablees;