personnelAll.jsx 194 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "@/manageCenter/financialManage/distribute/public.less";
  5. import { ChooseList } from "../../order/orderNew/chooseList";
  6. import { citySelect, provinceList, areaSelect, Birthplace } from "@/areaList";
  7. import ReactToPrint from "react-to-print";
  8. import "./personnelList.less"
  9. import {
  10. Button,
  11. Form,
  12. Input,
  13. Select,
  14. Spin,
  15. Table,
  16. message,
  17. Modal,
  18. Tabs,
  19. Tag,
  20. RangePicker,
  21. DatePicker,
  22. Radio,
  23. Cascader,
  24. Upload,
  25. Tooltip,
  26. } from "antd";
  27. import { splitUrl } from "@/tools";
  28. import { getProvinceList } from "@/addressList";
  29. import PicModal from "./picModal"
  30. import AddPicModal from "./addPicModal";
  31. const FormItem = Form.Item;
  32. const { TabPane } = Tabs;
  33. const { TextArea } = Input;
  34. const PersonnelAll = React.createClass({
  35. loadData(pageNo) {
  36. this.state.data = [];
  37. this.setState({
  38. loading: true,
  39. });
  40. $.ajax({
  41. method: "get",
  42. dataType: "json",
  43. crossDomain: false,
  44. url: globalConfig.context + "/api/admin/personnel/selectList",
  45. data: {
  46. pageNo: pageNo || 1,
  47. pageSize: this.state.pagination.pageSize,
  48. name: this.state.nameSearch,
  49. status: this.state.statusSearch,
  50. company: this.state.departmenttList,
  51. sex: this.state.sexSearch,
  52. marriage: this.state.marriageSearch,
  53. politicalOutlook: this.state.politicalOutlookSearch,
  54. birthdayMonth: this.state.birthdayMonthSearch,
  55. promotionStart: this.state.promotionTime[0],
  56. promotionEnd: this.state.promotionTime[1],
  57. entryStart: this.state.entryTime[0],
  58. entryStart: this.state.entryTime[1],
  59. quitStart: this.state.quitTime[0],
  60. quitEnd: this.state.quitTime[1],
  61. system: this.state.systemSearch,
  62. workingYears: this.state.workingYearsSearch,
  63. education: this.state.educationSearch,
  64. contractStart: this.state.contractTime[0],
  65. contractEnd: this.state.contractTime[1],
  66. },
  67. success: function (data) {
  68. let theArr = [];
  69. if (!data.data || !data.data.list) {
  70. if (data.error && data.error.length) {
  71. message.warning(data.error[0].message);
  72. }
  73. } else {
  74. for (let i = 0; i < data.data.list.length; i++) {
  75. let thisdata = data.data.list[i];
  76. thisdata.key = thisdata.id;
  77. theArr.push(thisdata);
  78. }
  79. }
  80. this.state.pagination.current = data.data.pageNo;
  81. this.state.pagination.total = data.data.totalCount;
  82. if (data.data && data.data.list && !data.data.list.length) {
  83. this.state.pagination.current = 0;
  84. this.state.pagination.total = 0;
  85. }
  86. this.setState({
  87. dataSource: theArr,
  88. pagination: this.state.pagination,
  89. });
  90. }.bind(this),
  91. }).always(
  92. function () {
  93. this.setState({
  94. loading: false,
  95. });
  96. }.bind(this)
  97. );
  98. },
  99. getInitialState() {
  100. return {
  101. active: "1",
  102. detailFlag: false,
  103. editWelfareData: {},
  104. contractList: [],
  105. quitList: [],
  106. chooseList: [],
  107. starArr: [],
  108. starArrs: [],
  109. annexName: "",
  110. annexUrl: "",
  111. voucherUrl: [],
  112. ModalData: [],
  113. contractTime: [],
  114. contactList: [],
  115. quitTime: [],
  116. promotionList: [],
  117. promotionTime: [],
  118. entryTime: [],
  119. pic: [],
  120. previewImage: "",
  121. peoVisible: false,
  122. phoneVisible: false,
  123. isAddPeo: false,
  124. searchMore: true,
  125. stayVisible: false,
  126. assignVisible: false,
  127. releaseDate: [],
  128. residence: [],
  129. nativePlace: [],
  130. now: [],
  131. roleName: "",
  132. shouKuanDate: [],
  133. boHuivisible: false,
  134. departmentArr: [],
  135. selectedRowKeys: [],
  136. selectedRows: [],
  137. paginations: false,
  138. loading: false,
  139. pagination: {
  140. defaultCurrent: 1,
  141. defaultPageSize: 10,
  142. showQuickJumper: true,
  143. pageSize: 10,
  144. onChange: function (page) {
  145. this.loadData(page);
  146. }.bind(this),
  147. showTotal: function (total) {
  148. return "共" + total + "条数据";
  149. },
  150. },
  151. columns: [
  152. {
  153. title: "员工编号",
  154. dataIndex: "employeeId",
  155. key: "employeeId",
  156. },
  157. {
  158. title: "门禁编号",
  159. dataIndex: "doorId",
  160. key: "doorId",
  161. },
  162. {
  163. title: "名称",
  164. dataIndex: "name",
  165. key: "name",
  166. },
  167. {
  168. title: "员工状态",
  169. dataIndex: "statusName",
  170. key: "statusName",
  171. },
  172. {
  173. title: "所属系统",
  174. dataIndex: "systemName",
  175. key: "systemName",
  176. },
  177. {
  178. title: "公司名称",
  179. dataIndex: "depName",
  180. key: "depName",
  181. },
  182. {
  183. title: "职位名称",
  184. dataIndex: "jobsName",
  185. key: "jobsName",
  186. },
  187. {
  188. title: "等级名称",
  189. dataIndex: "starName",
  190. key: "starName",
  191. },
  192. {
  193. title: "级别",
  194. dataIndex: "lvlName",
  195. key: "lvlName",
  196. },
  197. {
  198. title: "入职时间",
  199. dataIndex: "entryTimes",
  200. key: "entryTimes",
  201. },
  202. {
  203. title: "转正时间",
  204. dataIndex: "promotionTimes",
  205. key: "promotionTimes",
  206. render: (text) => {
  207. let time = moment(text).valueOf();
  208. let today = Date.parse(new Date());
  209. let sevenDay = 604800000;
  210. if (time - today < sevenDay) {
  211. return (
  212. <span style={{ color: "red", fontWeight: 900 }}>{text}</span>
  213. );
  214. }
  215. return text;
  216. },
  217. },
  218. {
  219. title: "生日日期",
  220. dataIndex: "birthdays",
  221. key: "birthdays",
  222. },
  223. {
  224. title: "性别",
  225. dataIndex: "sex",
  226. key: "sex",
  227. render: (text) => {
  228. if (text == 0) {
  229. return "男";
  230. } else if (text == 1) {
  231. return "女";
  232. }
  233. },
  234. },
  235. {
  236. title: "婚姻状态",
  237. dataIndex: "marriageName",
  238. key: "marriageName",
  239. },
  240. {
  241. title: "子/女",
  242. dataIndex: "son",
  243. key: "son",
  244. render: (text, record) => {
  245. return <span>{text + "/" + record.girl}</span>;
  246. },
  247. },
  248. {
  249. title: "政治面貌",
  250. dataIndex: "politicalOutlookName",
  251. key: "politicalOutlookName",
  252. },
  253. {
  254. title: "教育经历",
  255. dataIndex: "educationName",
  256. key: "educationName",
  257. },
  258. {
  259. title: "毕业学校",
  260. dataIndex: "school",
  261. key: "school",
  262. },
  263. {
  264. title: "专业",
  265. dataIndex: "major",
  266. key: "major",
  267. },
  268. {
  269. title: "职称",
  270. dataIndex: "title",
  271. key: "title",
  272. },
  273. {
  274. title: "晋升备注",
  275. dataIndex: "promotionRemarks",
  276. key: "promotionRemarks",
  277. },
  278. {
  279. title: "晋升时间",
  280. dataIndex: "promotionTime",
  281. key: "promotionTime",
  282. },
  283. {
  284. title: "合同时间",
  285. dataIndex: "contractStart",
  286. key: "contractStart",
  287. render: (text, record) => {
  288. let end = moment(record.contractEnd).valueOf();
  289. let today = Date.parse(new Date());
  290. let sevenDay = 604800000;
  291. if (text) {
  292. if (end - today < sevenDay) {
  293. return (
  294. <span style={{ color: "red", fontWeight: 900 }}>
  295. {text + "~" + record.contractEnd}
  296. </span>
  297. );
  298. }
  299. return text + "~" + record.contractEnd;
  300. }
  301. },
  302. },
  303. {
  304. title: "手机号码",
  305. dataIndex: "mobile",
  306. key: "mobile",
  307. },
  308. {
  309. title: "电话",
  310. dataIndex: "fixedTel",
  311. key: "fixedTel",
  312. },
  313. {
  314. title: "身份证",
  315. dataIndex: "idCard",
  316. key: "idCard",
  317. },
  318. {
  319. title: "发证机构",
  320. dataIndex: "certificationAuthority",
  321. key: "certificationAuthority",
  322. },
  323. {
  324. title: "户籍地址",
  325. dataIndex: "residenceName",
  326. key: "residenceName",
  327. },
  328. {
  329. title: "籍贯",
  330. dataIndex: "nativePlaceName",
  331. key: "nativePlaceName",
  332. },
  333. {
  334. title: "现住地址",
  335. dataIndex: "nowName",
  336. key: "nowName",
  337. },
  338. {
  339. title: "紧急联系人",
  340. dataIndex: "emergencyContact",
  341. key: "emergencyContact",
  342. },
  343. {
  344. title: "紧急联系人电话",
  345. dataIndex: "emergencyMobile",
  346. key: "emergencyMobile",
  347. },
  348. {
  349. title: "离职时间",
  350. dataIndex: "quitTime",
  351. key: "quitTime",
  352. },
  353. {
  354. title: "工作年限",
  355. dataIndex: "workingYear",
  356. key: "workingYear",
  357. },
  358. {
  359. title: "年龄",
  360. dataIndex: "age",
  361. key: "age",
  362. },
  363. {
  364. title: "出生月份",
  365. dataIndex: "month",
  366. key: "month",
  367. },
  368. {
  369. title: "参保时间",
  370. dataIndex: "insuranceStartTimes",
  371. key: "insuranceStartTimes",
  372. },
  373. {
  374. title: "停保时间",
  375. dataIndex: "insuranceEndTimes",
  376. key: "insuranceEndTimes",
  377. },
  378. {
  379. title: "公积金时间",
  380. dataIndex: "fundStartTimes",
  381. key: "fundStartTimes",
  382. },
  383. {
  384. title: "停办公积金时间",
  385. dataIndex: "fundEndTimes",
  386. key: "fundEndTimes",
  387. },
  388. ],
  389. dataSource: [],
  390. resVisible: false,
  391. welfareColumns: [
  392. {
  393. title: "福利类型",
  394. dataIndex: "type",
  395. key: "type",
  396. render: (text) => {
  397. if (text == 0) {
  398. return "社保";
  399. } else if (text == 1) {
  400. return "公积金";
  401. } else if (text == 2) {
  402. return "雇主险";
  403. }
  404. },
  405. },
  406. {
  407. title: "购买状态",
  408. dataIndex: "status",
  409. key: "status",
  410. render: (text) => {
  411. if (text == 0) {
  412. return "未购买";
  413. } else if (text == 1) {
  414. return "已购买";
  415. } else if (text == 2) {
  416. return "已停止";
  417. }
  418. },
  419. },
  420. {
  421. title: "购买时间",
  422. dataIndex: "startTimes",
  423. key: "startTimes",
  424. },
  425. {
  426. title: "停缴时间",
  427. dataIndex: "endTimes",
  428. key: "endTimes",
  429. },
  430. {
  431. title: "公司名称",
  432. dataIndex: "depName",
  433. key: "depName",
  434. },
  435. {
  436. title: "备注信息",
  437. dataIndex: "welfareRemarks",
  438. key: "welfareRemarks",
  439. },
  440. ],
  441. welfareColumnsEdit: [
  442. {
  443. title: "福利类型",
  444. dataIndex: "type",
  445. key: "type",
  446. render: (text) => {
  447. if (text == 0) {
  448. return "社保";
  449. } else if (text == 1) {
  450. return "公积金";
  451. } else if (text == 2) {
  452. return "雇主险";
  453. }
  454. },
  455. },
  456. {
  457. title: "购买状态",
  458. dataIndex: "status",
  459. key: "status",
  460. render: (text) => {
  461. if (text == 0) {
  462. return "未购买";
  463. } else if (text == 1) {
  464. return "已购买";
  465. } else if (text == 2) {
  466. return "已停止";
  467. }
  468. },
  469. },
  470. {
  471. title: "购买时间",
  472. dataIndex: "startTimes",
  473. key: "startTimes",
  474. },
  475. {
  476. title: "停缴时间",
  477. dataIndex: "endTimes",
  478. key: "endTimes",
  479. },
  480. {
  481. title: "公司名称",
  482. dataIndex: "depName",
  483. key: "depName",
  484. },
  485. {
  486. title: "备注信息",
  487. dataIndex: "welfareRemarks",
  488. key: "welfareRemarks",
  489. },
  490. {
  491. title: "操作",
  492. dataIndex: "caozuo",
  493. key: "caozuo",
  494. render: (text, record) => {
  495. return (
  496. <Button
  497. type="primary"
  498. onClick={(e) => {
  499. this.welfareTable(record);
  500. }}
  501. >
  502. 修改
  503. </Button>
  504. );
  505. },
  506. },
  507. ],
  508. table: [
  509. {
  510. key: "员工编号",
  511. value: "employeeId",
  512. },
  513. {
  514. key: "姓名",
  515. value: "name",
  516. },
  517. {
  518. key: "出生日期",
  519. value: "birthdays",
  520. },
  521. {
  522. key: "出生月份",
  523. value: "month",
  524. },
  525. {
  526. key: "门禁编号",
  527. value: "doorId",
  528. },
  529. {
  530. key: "性别",
  531. value: "sex",
  532. render: (e) => {
  533. if (e == 0) {
  534. return "男";
  535. } else if (e == 1) {
  536. return "女";
  537. }
  538. },
  539. },
  540. {
  541. key: "年龄",
  542. value: "age",
  543. },
  544. {
  545. key: "民族",
  546. value: "nation",
  547. },
  548. {
  549. key: "户籍地址",
  550. value: "residenceName",
  551. },
  552. {
  553. key: "籍贯",
  554. value: "nativePlaceName",
  555. },
  556. {
  557. key: "身份证",
  558. value: "idCard",
  559. },
  560. {
  561. key: "领证机关",
  562. value: "certificationAuthority",
  563. },
  564. {
  565. key: "现住地址",
  566. value: "nowName",
  567. },
  568. {
  569. key: "婚姻状态",
  570. value: "marriageName",
  571. },
  572. {
  573. key: "子/女",
  574. value: "son",
  575. render: (e, i) => {
  576. return e + "/" + i;
  577. },
  578. },
  579. {
  580. key: "政治面貌",
  581. value: "politicalOutlookName",
  582. },
  583. ],
  584. };
  585. },
  586. componentWillMount() {
  587. let areaArr = getProvinceList();
  588. let Area = areaSelect(areaArr);
  589. let Birthplaces = Birthplace(areaArr);
  590. this.setState({
  591. Area,
  592. Birthplaces: Birthplaces,
  593. });
  594. //城市
  595. let Province = [];
  596. areaArr.map(function (item) {
  597. var id = String(item.id);
  598. Province.push(
  599. <Select.Option value={id} key={item.name}>
  600. {item.name}
  601. </Select.Option>
  602. );
  603. });
  604. this.state.Provinces = Province;
  605. this.loadData();
  606. this.departmentList();
  607. },
  608. export() {
  609. const data = {
  610. pageSize: 9999,
  611. name: this.state.nameSearch ? this.state.nameSearch : undefined,
  612. status: this.state.statusSearch ? this.state.statusSearch : undefined,
  613. company: this.state.departmenttList
  614. ? this.state.departmenttList
  615. : undefined,
  616. sex: this.state.sexSearch ? this.state.sexSearch : undefined,
  617. marriage: this.state.marriageSearch
  618. ? this.state.marriageSearch
  619. : undefined,
  620. politicalOutlook: this.state.politicalOutlookSearch
  621. ? this.state.politicalOutlookSearch
  622. : undefined,
  623. birthdayMonth: this.state.birthdayMonthSearch
  624. ? this.state.birthdayMonthSearch
  625. : undefined,
  626. promotionStart: this.state.promotionTime[0]
  627. ? this.state.promotionTime[0]
  628. : undefined,
  629. promotionEnd: this.state.promotionTime[1]
  630. ? this.state.promotionTime[1]
  631. : undefined,
  632. entryStart: this.state.entryTime[0] ? this.state.entryTime[0] : undefined,
  633. entryStart: this.state.entryTime[1] ? this.state.entryTime[1] : undefined,
  634. quitStart: this.state.quitTime[0] ? this.state.quitTime[0] : undefined,
  635. quitEnd: this.state.quitTime[1] ? this.state.quitTime[1] : undefined,
  636. system: this.state.systemSearch ? this.state.systemSearch : undefined,
  637. workingYears: this.state.workingYearsSearch
  638. ? this.state.workingYearsSearch
  639. : undefined,
  640. education: this.state.educationSearch
  641. ? this.state.educationSearch
  642. : undefined,
  643. contractStart: this.state.contractTime[0]
  644. ? this.state.contractTime[0]
  645. : undefined,
  646. contractEnd: this.state.contractTime[1]
  647. ? this.state.contractTime[1]
  648. : undefined,
  649. };
  650. for(let key in data) {
  651. if(!data[key]) {
  652. delete data[key]
  653. }
  654. }
  655. window.location.href =
  656. globalConfig.context +
  657. "/api/admin/personnel/exportPersonnelList?" +
  658. $.param(data);
  659. },
  660. departmentList() {
  661. $.ajax({
  662. method: "get",
  663. dataType: "json",
  664. crossDomain: false,
  665. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  666. data: {},
  667. success: function (data) {
  668. let thedata = data.data;
  669. let theArr = [];
  670. if (!thedata) {
  671. if (data.error && data.error.length) {
  672. message.warning(data.error[0].message);
  673. }
  674. } else {
  675. thedata.map(function (item, index) {
  676. theArr.push({
  677. key: index,
  678. name: item.name,
  679. id: item.id,
  680. });
  681. });
  682. }
  683. this.setState({
  684. departmentArr: theArr,
  685. });
  686. }.bind(this),
  687. });
  688. },
  689. welfareTable(record) {
  690. this.setState({
  691. editWelfareVisible: true,
  692. });
  693. if (record) {
  694. this.setState({
  695. editWelfareData: record,
  696. });
  697. } else {
  698. let editWelfareData = {
  699. status: undefined,
  700. id: undefined,
  701. depId: [],
  702. pdId: this.state.ModalData.id,
  703. type: undefined,
  704. welfareRemarks: undefined,
  705. endTimes: undefined,
  706. startTimes: undefined,
  707. };
  708. this.setState({
  709. editWelfareData
  710. });
  711. }
  712. },
  713. editWelfareDataOk() {
  714. this.setState({
  715. loading: true,
  716. });
  717. $.ajax({
  718. method: "post",
  719. dataType: "json",
  720. crossDomain: false,
  721. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  722. data: {
  723. startTimes:
  724. this.state.editWelfareData.status == 1 ||
  725. this.state.editWelfareData.status == 2
  726. ? this.state.editWelfareData.startTimes
  727. : "",
  728. endTimes:
  729. this.state.editWelfareData.status == 2
  730. ? this.state.editWelfareData.endTimes
  731. : "",
  732. pdId: this.state.editWelfareData.pdId,
  733. welfareRemarks:
  734. this.state.editWelfareData.status == 0
  735. ? this.state.editWelfareData.welfareRemarks
  736. : "",
  737. type: this.state.editWelfareData.type,
  738. id: this.state.editWelfareData.id,
  739. status: this.state.editWelfareData.status,
  740. depId: this.state.editWelfareData.status == 0 ? "" : this.state.editWelfareData.depId,
  741. },
  742. success: function (data) {
  743. let theArr = [];
  744. if (data.error && data.error.length) {
  745. message.warning(data.error[0].message);
  746. } else {
  747. message.success("修改成功!");
  748. this.loadData();
  749. this.tableRowClick(this.state.ModalData);
  750. this.setState({
  751. editWelfareVisible: false,
  752. });
  753. }
  754. }.bind(this),
  755. }).always(
  756. function () {
  757. this.setState({
  758. loading: false,
  759. });
  760. }.bind(this)
  761. );
  762. },
  763. getWelfareData() {
  764. this.setState({
  765. loading: true,
  766. });
  767. $.ajax({
  768. method: "post",
  769. dataType: "json",
  770. crossDomain: false,
  771. url: globalConfig.context + "/api/admin/personnel/add",
  772. data: {
  773. name: this.state.name,
  774. doorId: this.state.doorId,
  775. sex: this.state.sex,
  776. nation: this.state.nation,
  777. residenceProvince: this.state.residence[0],
  778. residenceCity: this.state.residence[1],
  779. residenceArea: this.state.residence[2],
  780. residenceAddress: this.state.residenceAddress,
  781. nativePlaceProvince: this.state.nativePlace[0],
  782. nativePlaceCity: this.state.nativePlace[1],
  783. nowProvince: this.state.now[0],
  784. nowCity: this.state.now[1],
  785. nowArea: this.state.now[2],
  786. nowAddress: this.state.nowAddress,
  787. idCard: this.state.idCard,
  788. certificationAuthority: this.state.certificationAuthority,
  789. marriage: this.state.marriage,
  790. politicalOutlook: this.state.politicalOutlook,
  791. son: this.state.son,
  792. girl: this.state.girl,
  793. birthdays: this.state.birthdays,
  794. marriage: this.state.marriage,
  795. },
  796. success: function (data) {
  797. let theArr = [];
  798. if (data.error && data.error.length) {
  799. message.warning(data.error[0].message);
  800. } else {
  801. message.success("添加成功!");
  802. this.loadData();
  803. this.addPeoCancel();
  804. }
  805. }.bind(this),
  806. }).always(
  807. function () {
  808. this.setState({
  809. loading: false,
  810. });
  811. }.bind(this)
  812. );
  813. },
  814. changeList(arr) {
  815. const newArr = [];
  816. this.state.columns.forEach((item) => {
  817. arr.forEach((val) => {
  818. if (val === item.title) {
  819. newArr.push(item);
  820. }
  821. });
  822. });
  823. this.setState({
  824. changeList: newArr,
  825. });
  826. },
  827. addPeo() {
  828. this.setState({
  829. peoVisible: true,
  830. isAddPeo: true,
  831. });
  832. },
  833. addPeoCancel() {
  834. this.setState({
  835. id: undefined,
  836. peoVisible: false,
  837. isAddPeo: false,
  838. name: undefined,
  839. doorId: undefined,
  840. sex: undefined,
  841. nation: undefined,
  842. residence: [],
  843. residenceAddress: undefined,
  844. nativePlace: [],
  845. now: [],
  846. nowAddress: undefined,
  847. idCard: undefined,
  848. certificationAuthority: undefined,
  849. marriage: undefined,
  850. politicalOutlook: undefined,
  851. employeeId: undefined,
  852. son: undefined,
  853. girl: undefined,
  854. birthdays: undefined,
  855. marriage: undefined,
  856. });
  857. },
  858. verifyDoor() {
  859. this.setState({
  860. loading: true,
  861. });
  862. $.ajax({
  863. method: "get",
  864. dataType: "json",
  865. crossDomain: false,
  866. url: globalConfig.context + "/api/admin/personnel/checkDoorId",
  867. data: {
  868. doorId: this.state.doorId,
  869. id: this.state.id,
  870. },
  871. success: function (data) {
  872. if (data.error && data.error.length) {
  873. message.warning(data.error[0].message);
  874. } else {
  875. message.success("此编号未被占用");
  876. }
  877. }.bind(this),
  878. }).always(
  879. function () {
  880. this.setState({
  881. loading: false,
  882. });
  883. }.bind(this)
  884. );
  885. },
  886. verifyId() {
  887. this.setState({
  888. loading: true,
  889. });
  890. $.ajax({
  891. method: "get",
  892. dataType: "json",
  893. crossDomain: false,
  894. url: globalConfig.context + "/api/admin/personnel/checkEmployeeId",
  895. data: {
  896. employeeId: this.state.employeeId,
  897. id: this.state.id
  898. },
  899. success: function (data) {
  900. if (data.error && data.error.length) {
  901. message.warning(data.error[0].message);
  902. } else {
  903. message.success("此编号未被占用");
  904. }
  905. }.bind(this),
  906. }).always(
  907. function () {
  908. this.setState({
  909. loading: false,
  910. });
  911. }.bind(this)
  912. );
  913. },
  914. addOk() {
  915. this.setState({
  916. loading: true,
  917. });
  918. $.ajax({
  919. method: "post",
  920. dataType: "json",
  921. crossDomain: false,
  922. url: globalConfig.context + "/api/admin/personnel/add",
  923. data: {
  924. name: this.state.name,
  925. doorId: this.state.doorId,
  926. sex: this.state.sex,
  927. nation: this.state.nation,
  928. residenceProvince: this.state.residence[0],
  929. residenceCity: this.state.residence[1],
  930. residenceArea: this.state.residence[2],
  931. residenceAddress: this.state.residenceAddress,
  932. nativePlaceProvince: this.state.nativePlace[0],
  933. nativePlaceCity: this.state.nativePlace[1],
  934. nowProvince: this.state.now[0],
  935. nowCity: this.state.now[1],
  936. nowArea: this.state.now[2],
  937. nowAddress: this.state.nowAddress,
  938. idCard: this.state.idCard,
  939. certificationAuthority: this.state.certificationAuthority,
  940. marriage: this.state.marriage,
  941. politicalOutlook: this.state.politicalOutlook,
  942. son: this.state.son,
  943. girl: this.state.girl,
  944. birthdays: this.state.birthdays,
  945. marriage: this.state.marriage,
  946. employeeId: this.state.employeeId,
  947. },
  948. success: function (data) {
  949. let theArr = [];
  950. if (data.error && data.error.length) {
  951. message.warning(data.error[0].message);
  952. } else {
  953. message.success("添加成功!");
  954. this.loadData();
  955. this.addPeoCancel();
  956. }
  957. }.bind(this),
  958. }).always(
  959. function () {
  960. this.setState({
  961. loading: false,
  962. });
  963. }.bind(this)
  964. );
  965. },
  966. editOk() {
  967. this.setState({
  968. loading: true,
  969. });
  970. $.ajax({
  971. method: "post",
  972. dataType: "json",
  973. crossDomain: false,
  974. url: globalConfig.context + "/api/admin/personnel/update",
  975. data: {
  976. id: this.state.id,
  977. name: this.state.name,
  978. doorId: this.state.doorId,
  979. sex: this.state.sex,
  980. nation: this.state.nation,
  981. residenceProvince: this.state.residence[0],
  982. residenceCity: this.state.residence[1],
  983. residenceArea: this.state.residence[2],
  984. residenceAddress: this.state.residenceAddress,
  985. nativePlaceProvince: this.state.nativePlace[0],
  986. nativePlaceCity: this.state.nativePlace[1],
  987. nowProvince: this.state.now[0],
  988. nowCity: this.state.now[1],
  989. nowArea: this.state.now[2],
  990. nowAddress: this.state.nowAddress,
  991. idCard: this.state.idCard,
  992. certificationAuthority: this.state.certificationAuthority,
  993. marriage: this.state.marriage,
  994. politicalOutlook: this.state.politicalOutlook,
  995. son: this.state.son,
  996. girl: this.state.girl,
  997. birthdays: this.state.birthdays,
  998. marriage: this.state.marriage,
  999. employeeId: this.state.employeeId,
  1000. },
  1001. success: function (data) {
  1002. let theArr = [];
  1003. if (data.error && data.error.length) {
  1004. message.warning(data.error[0].message);
  1005. } else {
  1006. message.success("修改成功!");
  1007. this.loadData();
  1008. this.tableRowClick(this.state.ModalData);
  1009. this.addPeoCancel();
  1010. }
  1011. }.bind(this),
  1012. }).always(
  1013. function () {
  1014. this.setState({
  1015. loading: false,
  1016. });
  1017. }.bind(this)
  1018. );
  1019. },
  1020. editPeo() {
  1021. this.state.residence[0] = this.state.ModalData.residenceProvince;
  1022. this.state.residence[1] = this.state.ModalData.residenceCity;
  1023. this.state.residence[2] = this.state.ModalData.residenceArea;
  1024. this.state.nativePlace[0] = this.state.ModalData.nativePlaceProvince;
  1025. this.state.nativePlace[1] = this.state.ModalData.nativePlaceCity;
  1026. this.state.now[0] = this.state.ModalData.nowProvince;
  1027. this.state.now[1] = this.state.ModalData.nowCity;
  1028. this.state.now[2] = this.state.ModalData.nowArea;
  1029. this.setState({
  1030. peoVisible: true,
  1031. isAddPeo: false,
  1032. id: this.state.ModalData.id,
  1033. doorId: this.state.ModalData.doorId,
  1034. name: this.state.ModalData.name,
  1035. birthdays: this.state.ModalData.birthdays,
  1036. sex: this.state.ModalData.sex,
  1037. nation: this.state.ModalData.nation,
  1038. residence: this.state.residence ? this.state.residence : [],
  1039. residenceAddress: this.state.ModalData.residenceAddress,
  1040. now: this.state.now ? this.state.now : [],
  1041. nowAddress: this.state.ModalData.nowAddress,
  1042. nativePlace: this.state.nativePlace ? this.state.nativePlace : [],
  1043. idCard: this.state.ModalData.idCard,
  1044. certificationAuthority: this.state.ModalData.certificationAuthority,
  1045. marriage: this.state.ModalData.marriage,
  1046. son: this.state.ModalData.son,
  1047. girl: this.state.ModalData.girl,
  1048. politicalOutlook: this.state.ModalData.politicalOutlook || this.state.ModalData.politicalOutlook == 0
  1049. ? this.state.ModalData.politicalOutlook
  1050. : undefined,
  1051. marriage: this.state.ModalData.marriage,
  1052. employeeId: this.state.ModalData.employeeId,
  1053. });
  1054. },
  1055. stayModal(id) {
  1056. this.setState({
  1057. stayVisible: true,
  1058. });
  1059. this.setState({
  1060. loading: true,
  1061. });
  1062. $.ajax({
  1063. method: "get",
  1064. dataType: "json",
  1065. crossDomain: false,
  1066. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1067. data: {
  1068. id: id,
  1069. },
  1070. success: function (data) {
  1071. let res = data.data;
  1072. let theArr = [];
  1073. if (data.error && data.error.length) {
  1074. message.warning(data.error[0].message);
  1075. } else {
  1076. this.setState({
  1077. id: res.id,
  1078. status: res.status + "",
  1079. system: res.system + "",
  1080. jobNature: res.jobNature,
  1081. jobNatureRemarks: res.jobNatureRemarks,
  1082. age: res.age,
  1083. entryTimes: res.entryTimes,
  1084. promotionTimes: res.promotionTimes,
  1085. company: res.company,
  1086. lvl: res.lvl ? res.lvl + "" : [],
  1087. jobs: res.jobs ? res.jobs + "" : [],
  1088. star: res.star ? res.star + "" : [],
  1089. allowance: res.allowance,
  1090. });
  1091. this.getList();
  1092. }
  1093. }.bind(this),
  1094. }).always(
  1095. function () {
  1096. this.setState({
  1097. loading: false,
  1098. });
  1099. }.bind(this)
  1100. );
  1101. },
  1102. stayCancel() {
  1103. this.setState({
  1104. stayVisible: false,
  1105. });
  1106. },
  1107. editStay() {
  1108. if (this.state.star == "" || this.state.star == undefined) {
  1109. message.warning("请选择星级");
  1110. return;
  1111. }
  1112. this.setState({
  1113. loading: true,
  1114. });
  1115. $.ajax({
  1116. method: "post",
  1117. dataType: "json",
  1118. crossDomain: false,
  1119. url: globalConfig.context + "/api/admin/personnel/update",
  1120. data: {
  1121. id: this.state.id,
  1122. status: this.state.status,
  1123. system: this.state.system,
  1124. jobNature: this.state.jobNature,
  1125. jobNatureRemarks: this.state.jobNatureRemarks,
  1126. entryTimes: this.state.entryTimes,
  1127. promotionTimes: this.state.promotionTimes,
  1128. company: this.state.company,
  1129. lvl: this.state.lvl,
  1130. jobs: this.state.jobs,
  1131. star: this.state.star,
  1132. allowance: this.state.allowance,
  1133. },
  1134. success: function (data) {
  1135. let res = data.data;
  1136. let theArr = [];
  1137. if (data.error && data.error.length) {
  1138. message.warning(data.error[0].message);
  1139. } else {
  1140. this.setState({
  1141. stayVisible: false,
  1142. });
  1143. this.tableRowClick(this.state.ModalData);
  1144. message.success("提交成功");
  1145. }
  1146. }.bind(this),
  1147. }).always(
  1148. function () {
  1149. this.setState({
  1150. loading: false,
  1151. });
  1152. }.bind(this)
  1153. );
  1154. },
  1155. phoneModal() {
  1156. let obj = [
  1157. {
  1158. id: undefined,
  1159. pdid: this.state.ModalData.id,
  1160. emergencyContact: "",
  1161. emergencyMobile: "",
  1162. },
  1163. {
  1164. id: undefined,
  1165. pdid: this.state.ModalData.id,
  1166. emergencyContact: "",
  1167. emergencyMobile: "",
  1168. },
  1169. {
  1170. id: undefined,
  1171. pdid: this.state.ModalData.id,
  1172. emergencyContact: "",
  1173. emergencyMobile: "",
  1174. },
  1175. ];
  1176. this.setState({
  1177. phoneVisible: true,
  1178. id: this.state.ModalData.id,
  1179. mobile: this.state.ModalData.mobile,
  1180. fixedTel: this.state.ModalData.fixedTel,
  1181. contactList: this.state.ModalData.contactList.length
  1182. ? JSON.parse(JSON.stringify(this.state.ModalData.contactList))
  1183. : obj,
  1184. });
  1185. },
  1186. phoneCancel() {
  1187. this.setState({
  1188. phoneVisible: false,
  1189. });
  1190. },
  1191. editPhone() {
  1192. this.setState({
  1193. loading: true,
  1194. });
  1195. $.ajax({
  1196. method: "post",
  1197. dataType: "json",
  1198. crossDomain: false,
  1199. url: globalConfig.context + "/api/admin/personnel/updateContact",
  1200. data: {
  1201. id: this.state.id,
  1202. mobile: this.state.mobile,
  1203. fixedTel: this.state.fixedTel,
  1204. contactList: JSON.stringify(this.state.contactList),
  1205. },
  1206. success: function (data) {
  1207. let theArr = [];
  1208. if (data.error && data.error.length) {
  1209. message.warning(data.error[0].message);
  1210. } else {
  1211. this.loadData();
  1212. this.phoneCancel();
  1213. this.tableRowClick(this.state.ModalData);
  1214. message.success("修改成功");
  1215. }
  1216. }.bind(this),
  1217. }).always(
  1218. function () {
  1219. this.setState({
  1220. loading: false,
  1221. });
  1222. }.bind(this)
  1223. );
  1224. },
  1225. entryModal() {
  1226. this.setState({
  1227. entryVisible: true,
  1228. });
  1229. this.setState({
  1230. loading: true,
  1231. });
  1232. $.ajax({
  1233. method: "get",
  1234. dataType: "json",
  1235. crossDomain: false,
  1236. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1237. data: {
  1238. id: this.state.ModalData.id,
  1239. },
  1240. success: function (data) {
  1241. let theArr = [];
  1242. if (data.error && data.error.length) {
  1243. message.warning(data.error[0].message);
  1244. } else {
  1245. this.setState({
  1246. id: data.data.personnelEntry ? data.data.personnelEntry.id : "",
  1247. school: data.data.personnelEntry
  1248. ? data.data.personnelEntry.school
  1249. : "",
  1250. education: data.data.personnelEntry
  1251. ? data.data.personnelEntry.education
  1252. : "",
  1253. major: data.data.personnelEntry
  1254. ? data.data.personnelEntry.major
  1255. : "",
  1256. title: data.data.personnelEntry
  1257. ? data.data.personnelEntry.title
  1258. : "",
  1259. entryRemarks: data.data.personnelEntry
  1260. ? data.data.personnelEntry.entryRemarks
  1261. : "",
  1262. annexUrl: data.data.personnelEntry
  1263. ? data.data.personnelEntry.annexUrl
  1264. ? data.data.personnelEntry.annexUrl
  1265. : ""
  1266. : "",
  1267. annexName: data.data.personnelEntry
  1268. ? data.data.personnelEntry.annexName
  1269. ? data.data.personnelEntry.annexName
  1270. : ""
  1271. : "",
  1272. });
  1273. // }
  1274. }
  1275. }.bind(this),
  1276. }).always(
  1277. function () {
  1278. this.setState({
  1279. loading: false,
  1280. });
  1281. }.bind(this)
  1282. );
  1283. },
  1284. entryCancel() {
  1285. this.tableRowClick(this.state.ModalData);
  1286. this.setState({
  1287. entryVisible: false,
  1288. });
  1289. },
  1290. cancel() {
  1291. this.setState({
  1292. visible: false,
  1293. detailFlag: false,
  1294. active: "1",
  1295. });
  1296. },
  1297. tableRowClick(record) {
  1298. this.setState({
  1299. visible: true,
  1300. id: record.id,
  1301. });
  1302. this.setState({
  1303. loading: true,
  1304. });
  1305. $.ajax({
  1306. method: "get",
  1307. dataType: "json",
  1308. crossDomain: false,
  1309. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1310. data: {
  1311. id: record.id,
  1312. },
  1313. success: function (data) {
  1314. let theArr = [];
  1315. if (data.error && data.error.length) {
  1316. message.warning(data.error[0].message);
  1317. } else {
  1318. this.setState({
  1319. ModalData: data.data,
  1320. });
  1321. }
  1322. }.bind(this),
  1323. }).always(
  1324. function () {
  1325. this.setState({
  1326. loading: false,
  1327. });
  1328. }.bind(this)
  1329. );
  1330. },
  1331. search() {
  1332. this.loadData();
  1333. },
  1334. addPic() {
  1335. this.setState({
  1336. addPicModal: true,
  1337. });
  1338. },
  1339. addPicModalCancel() {
  1340. this.setState({
  1341. addPicModal: false,
  1342. });
  1343. },
  1344. getVoucherUrl(e) {
  1345. this.setState({
  1346. voucherUrl: e,
  1347. });
  1348. },
  1349. add() {
  1350. if (this.state.entryVisible) {
  1351. return this.addRuzhi;
  1352. } else if (this.state.upgradeVisible) {
  1353. return this.addJinsheng;
  1354. } else if (this.state.contractVisible) {
  1355. return this.addContract;
  1356. } else if (this.state.chooseVisible) {
  1357. return this.addChoose;
  1358. } else if (this.state.quitVisible) {
  1359. return this.addQuit;
  1360. } else if (this.state.welfareVisible) {
  1361. return this.addWelfare;
  1362. }
  1363. },
  1364. addRuzhi(e, i) {
  1365. this.setState({
  1366. addPicModal: false,
  1367. });
  1368. if (this.state.annexUrl.length > 0) {
  1369. this.state.annexUrl += "," + e;
  1370. this.state.annexName += "," + i;
  1371. } else {
  1372. this.state.annexUrl += e;
  1373. this.state.annexName += i;
  1374. }
  1375. this.setState({
  1376. annexUrl: this.state.annexUrl,
  1377. annexName: this.state.annexName,
  1378. });
  1379. },
  1380. addJinsheng(e, i) {
  1381. this.setState({
  1382. addPicModal: false,
  1383. });
  1384. if (
  1385. this.state.promotionList.annexUrl &&
  1386. this.state.promotionList.annexUrl.length > 0
  1387. ) {
  1388. this.state.promotionList.annexUrl += "," + e;
  1389. this.state.promotionList.annexName += "," + i;
  1390. } else {
  1391. this.state.promotionList.annexUrl = e;
  1392. this.state.promotionList.annexName = i;
  1393. }
  1394. this.setState({
  1395. promotionList: this.state.promotionList,
  1396. });
  1397. },
  1398. addContract(e, i) {
  1399. this.setState({
  1400. addPicModal: false,
  1401. });
  1402. if (
  1403. this.state.contractList.annexUrl &&
  1404. this.state.contractList.annexUrl.length > 0
  1405. ) {
  1406. this.state.contractList.annexUrl += "," + e;
  1407. this.state.contractList.annexName += "," + i;
  1408. } else {
  1409. this.state.contractList.annexUrl = e;
  1410. this.state.contractList.annexName = i;
  1411. }
  1412. this.setState({
  1413. contractList: this.state.contractList,
  1414. });
  1415. },
  1416. addChoose(e, i) {
  1417. this.setState({
  1418. addPicModal: false,
  1419. });
  1420. if (
  1421. this.state.chooseList.annexUrl &&
  1422. this.state.chooseList.annexUrl.length > 0
  1423. ) {
  1424. this.state.chooseList.annexUrl += "," + e;
  1425. this.state.chooseList.annexName += "," + i;
  1426. } else {
  1427. this.state.chooseList.annexUrl = e;
  1428. this.state.chooseList.annexName = i;
  1429. }
  1430. this.setState({
  1431. chooseList: this.state.chooseList,
  1432. });
  1433. },
  1434. addQuit(e, i) {
  1435. this.setState({
  1436. addPicModal: false,
  1437. });
  1438. if (
  1439. this.state.quitList.annexUrl &&
  1440. this.state.quitList.annexUrl.length > 0
  1441. ) {
  1442. this.state.quitList.annexUrl += "," + e;
  1443. this.state.quitList.annexName += "," + i;
  1444. } else {
  1445. this.state.quitList.annexUrl = e;
  1446. this.state.quitList.annexName = i;
  1447. }
  1448. this.setState({
  1449. quitList: this.state.quitList,
  1450. });
  1451. },
  1452. addWelfare(e, i) {
  1453. this.setState({
  1454. addPicModal: false,
  1455. });
  1456. if (
  1457. this.state.ModalData.welfareAnnexUrl &&
  1458. this.state.ModalData.welfareAnnexUrl.length > 0
  1459. ) {
  1460. this.state.ModalData.welfareAnnexUrl += "," + e;
  1461. this.state.ModalData.welfareAnnexName += "," + i;
  1462. } else {
  1463. this.state.ModalData.welfareAnnexUrl = e;
  1464. this.state.ModalData.welfareAnnexName = i;
  1465. }
  1466. this.setState({
  1467. ModalData: this.state.ModalData,
  1468. });
  1469. },
  1470. reset() {
  1471. this.state.nameSearch = undefined;
  1472. this.state.statusSearch = undefined;
  1473. this.state.departmenttList = undefined;
  1474. this.state.sexSearch = undefined;
  1475. this.state.marriageSearch = undefined;
  1476. this.state.politicalOutlookSearch = undefined;
  1477. this.state.birthdayMonthSearch = undefined;
  1478. this.state.systemSearch = undefined;
  1479. this.state.workingYearsSearch = undefined;
  1480. this.state.educationSearch = undefined;
  1481. this.state.promotionTime = [];
  1482. this.state.entryTime = [];
  1483. this.state.quitTime = [];
  1484. this.state.contractTime = [];
  1485. this.loadData();
  1486. },
  1487. peoStatus(e) {
  1488. if (e == 0) {
  1489. return "在职(试用期)";
  1490. } else if (e == 1) {
  1491. return "在职(正式工)";
  1492. } else if (e == 2) {
  1493. return "离职";
  1494. }
  1495. },
  1496. jobStatus(e, i) {
  1497. if (e == 0) {
  1498. return "全职";
  1499. } else if (e == 1) {
  1500. return "兼职";
  1501. } else if (e == 2) {
  1502. return i;
  1503. }
  1504. },
  1505. educationStatus(e) {
  1506. if (e == 0) {
  1507. return "高中/中专";
  1508. } else if (e == 1) {
  1509. return "专科/高职";
  1510. } else if (e == 2) {
  1511. return "本科";
  1512. } else if (e == 3) {
  1513. return "研究生";
  1514. } else if (e == 5) {
  1515. return "博士";
  1516. }
  1517. },
  1518. picToArr(e) {
  1519. if (!e) return [];
  1520. let arr = e.split(",");
  1521. return arr;
  1522. },
  1523. ruzhiRemove(e) {
  1524. let url = e.file.response.data;
  1525. let arr = this.state.annexUrl.split(",");
  1526. let arrName = this.state.annexName.split(",");
  1527. let num = "";
  1528. arr.forEach((item, index) => {
  1529. if (item == url) {
  1530. arr.splice(index, 1);
  1531. num = index;
  1532. }
  1533. });
  1534. arrName.splice(num, 1);
  1535. this.setState({
  1536. annexUrl: arr.join(","),
  1537. annexName: arrName.join(","),
  1538. });
  1539. },
  1540. jinshengRemove(e) {
  1541. let url = e.file.response.data;
  1542. let arr = this.state.promotionList.annexUrl.split(",");
  1543. let arrName = this.state.promotionList.annexName.split(",");
  1544. let num = "";
  1545. arr.forEach((item, index) => {
  1546. if (item == url) {
  1547. arr.splice(index, 1);
  1548. num = index;
  1549. }
  1550. });
  1551. arrName.splice(num, 1);
  1552. this.state.promotionList.annexUrl = arr.join(",");
  1553. this.state.promotionList.annexName = arrName.join(",");
  1554. this.setState({
  1555. promotionList: this.state.promotionList,
  1556. });
  1557. },
  1558. contractRemove(e) {
  1559. let url = e.file.response.data;
  1560. let arr = this.state.contractList.annexUrl.split(",");
  1561. let arrName = this.state.contractList.annexName.split(",");
  1562. let num = "";
  1563. arr.forEach((item, index) => {
  1564. if (item == url) {
  1565. arr.splice(index, 1);
  1566. num = index;
  1567. }
  1568. });
  1569. arrName.splice(num, 1);
  1570. this.state.contractList.annexUrl = arr.join(",");
  1571. this.state.contractList.annexName = arrName.join(",");
  1572. this.setState({
  1573. contractList: this.state.contractList,
  1574. });
  1575. },
  1576. chooseRemove(e) {
  1577. let url = e.file.response.data;
  1578. let arr = this.state.chooseList.annexUrl.split(",");
  1579. let arrName = this.state.chooseList.annexName.split(",");
  1580. let num = "";
  1581. arr.forEach((item, index) => {
  1582. if (item == url) {
  1583. arr.splice(index, 1);
  1584. num = index;
  1585. }
  1586. });
  1587. arrName.splice(num, 1);
  1588. this.state.chooseList.annexUrl = arr.join(",");
  1589. this.state.chooseList.annexName = arrName.join(",");
  1590. this.setState({
  1591. chooseList: this.state.chooseList,
  1592. });
  1593. },
  1594. quitRemove(e) {
  1595. let url = e.file.response.data;
  1596. let arr = this.state.quitList.annexUrl.split(",");
  1597. let arrName = this.state.quitList.annexName.split(",");
  1598. let num = "";
  1599. arr.forEach((item, index) => {
  1600. if (item == url) {
  1601. arr.splice(index, 1);
  1602. num = index;
  1603. }
  1604. });
  1605. arrName.splice(num, 1);
  1606. this.state.quitList.annexUrl = arr.join(",");
  1607. this.state.quitList.annexName = arrName.join(",");
  1608. this.setState({
  1609. quitList: this.state.quitList,
  1610. });
  1611. },
  1612. welfareRemove(e) {
  1613. let url = e.file.response.data;
  1614. let arr = this.state.ModalData.welfareAnnexUrl.split(",");
  1615. let arrName = this.state.ModalData.welfareAnnexName.split(",");
  1616. let num = "";
  1617. arr.forEach((item, index) => {
  1618. if (item == url) {
  1619. arr.splice(index, 1);
  1620. num = index;
  1621. }
  1622. });
  1623. arrName.splice(num, 1);
  1624. this.state.ModalData.welfareAnnexUrl = arr.join(",");
  1625. this.state.ModalData.welfareAnnexName = arrName.join(",");
  1626. this.setState({
  1627. ModalData: this.state.ModalData,
  1628. });
  1629. },
  1630. getList(jobs) {
  1631. this.setState({
  1632. loading: true,
  1633. });
  1634. $.ajax({
  1635. method: "get",
  1636. dataType: "json",
  1637. crossDomain: false,
  1638. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1639. data: {},
  1640. success: function (data) {
  1641. let theArr = [];
  1642. if (data.error && data.error.length) {
  1643. message.warning(data.error[0].message);
  1644. } else {
  1645. let arr = data.data;
  1646. let starArr = [];
  1647. arr.forEach((item, index) => {
  1648. if(jobs && item.jobs == jobs) {
  1649. let obj = {
  1650. star: item.lvl + "",
  1651. starName: item.lvlName,
  1652. };
  1653. starArr.push(obj);
  1654. return
  1655. }else if (!jobs && item.jobs == this.state.jobs) {
  1656. let obj = {
  1657. star: item.lvl + "",
  1658. starName: item.lvlName,
  1659. };
  1660. starArr.push(obj);
  1661. }
  1662. });
  1663. this.setState({
  1664. starArr,
  1665. });
  1666. }
  1667. }.bind(this),
  1668. }).always(
  1669. function () {
  1670. this.setState({
  1671. loading: false,
  1672. });
  1673. }.bind(this)
  1674. );
  1675. },
  1676. getLists(jobs) {
  1677. this.setState({
  1678. loading: true,
  1679. });
  1680. $.ajax({
  1681. method: "get",
  1682. dataType: "json",
  1683. crossDomain: false,
  1684. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1685. data: {},
  1686. success: function (data) {
  1687. let theArr = [];
  1688. if (data.error && data.error.length) {
  1689. message.warning(data.error[0].message);
  1690. } else {
  1691. let arr = data.data;
  1692. let starArrs = [];
  1693. arr.forEach((item, index) => {
  1694. if (jobs && item.jobs == jobs) {
  1695. let obj = {
  1696. star: item.lvl + "",
  1697. starName: item.lvlName,
  1698. };
  1699. starArrs.push(obj);
  1700. return;
  1701. }
  1702. if (item.jobs == this.state.jobss) {
  1703. let obj = {
  1704. star: item.lvl + "",
  1705. starName: item.lvlName,
  1706. };
  1707. starArrs.push(obj);
  1708. }
  1709. });
  1710. this.setState({
  1711. starArrs,
  1712. });
  1713. }
  1714. }.bind(this),
  1715. }).always(
  1716. function () {
  1717. this.setState({
  1718. loading: false,
  1719. });
  1720. }.bind(this)
  1721. );
  1722. },
  1723. editRuzi() {
  1724. this.setState({
  1725. loading: true,
  1726. });
  1727. $.ajax({
  1728. method: "post",
  1729. dataType: "json",
  1730. crossDomain: false,
  1731. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  1732. data: {
  1733. id: this.state.ModalData.id,
  1734. school: this.state.school,
  1735. education: this.state.education,
  1736. major: this.state.major,
  1737. title: this.state.title,
  1738. entryRemarks: this.state.entryRemarks,
  1739. annexUrl: this.state.annexUrl,
  1740. annexName: this.state.annexName,
  1741. },
  1742. success: function (data) {
  1743. let theArr = [];
  1744. if (data.error && data.error.length) {
  1745. message.warning(data.error[0].message);
  1746. } else {
  1747. this.loadData();
  1748. this.entryCancel();
  1749. this.tableRowClick(this.state.ModalData);
  1750. message.success("修改成功");
  1751. }
  1752. }.bind(this),
  1753. }).always(
  1754. function () {
  1755. this.setState({
  1756. loading: false,
  1757. });
  1758. }.bind(this)
  1759. );
  1760. },
  1761. upgradeCancel() {
  1762. this.tableRowClick(this.state.ModalData);
  1763. this.setState({
  1764. upgradeVisible: false,
  1765. });
  1766. },
  1767. contractCancel() {
  1768. this.tableRowClick(this.state.ModalData);
  1769. this.setState({
  1770. contractVisible: false,
  1771. });
  1772. },
  1773. chooseCancel() {
  1774. this.tableRowClick(this.state.ModalData);
  1775. this.setState({
  1776. chooseVisible: false,
  1777. });
  1778. },
  1779. quitCancel() {
  1780. this.tableRowClick(this.state.ModalData);
  1781. this.setState({
  1782. quitVisible: false,
  1783. });
  1784. },
  1785. welfareCancel() {
  1786. this.tableRowClick(this.state.ModalData);
  1787. this.setState({
  1788. welfareVisible: false,
  1789. });
  1790. },
  1791. upgradeModal(flag, index) {
  1792. this.setState({
  1793. upgradeVisible: true,
  1794. });
  1795. let obj = {
  1796. id: undefined,
  1797. pdId: this.state.ModalData.id,
  1798. oldJobs: [],
  1799. oldLvl: [],
  1800. newJobs: [],
  1801. newLvl: [],
  1802. promotionTimes: undefined,
  1803. promotionRemarks: undefined,
  1804. annexUrl: "",
  1805. annexName: "",
  1806. };
  1807. this.setState({
  1808. promotionList: flag ? obj : this.state.ModalData.promotionList[index],
  1809. });
  1810. this.getList(flag ? undefined : this.state.ModalData.promotionList[index].oldJobs);
  1811. this.getLists(flag ? undefined : this.state.ModalData.promotionList[index].newJobs);
  1812. },
  1813. contractModal(flag, index) {
  1814. this.setState({
  1815. contractVisible: true,
  1816. });
  1817. let obj = {
  1818. id: undefined,
  1819. pdId: this.state.ModalData.id,
  1820. startTimes: undefined,
  1821. endTimes: undefined,
  1822. contractRemarks: undefined,
  1823. annexUrl: "",
  1824. annexName: "",
  1825. };
  1826. this.setState({
  1827. contractList: flag ? obj : this.state.ModalData.contractList[index],
  1828. });
  1829. },
  1830. chooseModal(flag, index) {
  1831. this.setState({
  1832. chooseVisible: true,
  1833. });
  1834. let obj = {
  1835. id: undefined,
  1836. pdId: this.state.ModalData.id,
  1837. chooseStatus: undefined,
  1838. effectTimes: undefined,
  1839. chooseRemarks: undefined,
  1840. annexUrl: "",
  1841. annexName: "",
  1842. };
  1843. this.setState({
  1844. chooseList: flag ? obj : this.state.ModalData.chooseList[index],
  1845. });
  1846. },
  1847. quitModal(flag, index) {
  1848. this.setState({
  1849. quitVisible: true,
  1850. });
  1851. let obj = {
  1852. id: undefined,
  1853. pdId: this.state.ModalData.id,
  1854. effectTimes: undefined,
  1855. quitRemarks: undefined,
  1856. annexUrl: "",
  1857. annexName: "",
  1858. };
  1859. this.setState({
  1860. quitList: flag ? obj : this.state.ModalData.quitList[index],
  1861. });
  1862. },
  1863. welfareModal() {
  1864. this.setState({
  1865. welfareVisible: true,
  1866. });
  1867. },
  1868. editUpgrade() {
  1869. if(!this.state.promotionList.oldLvl.length || !this.state.promotionList.newLvl.length) {
  1870. message.warning("请选择星级")
  1871. return
  1872. }
  1873. this.setState({
  1874. loading: true,
  1875. });
  1876. $.ajax({
  1877. method: "post",
  1878. dataType: "json",
  1879. crossDomain: false,
  1880. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1881. data: {
  1882. id: this.state.promotionList.id,
  1883. pdId: this.state.promotionList.pdId,
  1884. oldJobs: this.state.promotionList.oldJobs,
  1885. oldLvl: this.state.promotionList.oldLvl,
  1886. newJobs: this.state.promotionList.newJobs,
  1887. newLvl: this.state.promotionList.newLvl,
  1888. promotionTimes: this.state.promotionList.promotionTimes,
  1889. promotionRemarks: this.state.promotionList.promotionRemarks,
  1890. annexUrl: this.state.promotionList.annexUrl,
  1891. annexName: this.state.promotionList.annexName,
  1892. },
  1893. success: function (data) {
  1894. let theArr = [];
  1895. if (data.error && data.error.length) {
  1896. message.warning(data.error[0].message);
  1897. } else {
  1898. this.loadData();
  1899. this.upgradeCancel();
  1900. message.success("修改成功");
  1901. }
  1902. }.bind(this),
  1903. }).always(
  1904. function () {
  1905. this.setState({
  1906. loading: false,
  1907. });
  1908. }.bind(this)
  1909. );
  1910. },
  1911. editContract() {
  1912. this.setState({
  1913. loading: true,
  1914. });
  1915. $.ajax({
  1916. method: "post",
  1917. dataType: "json",
  1918. crossDomain: false,
  1919. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1920. data: {
  1921. id: this.state.contractList.id,
  1922. pdId: this.state.contractList.pdId,
  1923. startTimes: this.state.contractList.startTimes,
  1924. endTimes: this.state.contractList.endTimes,
  1925. contractRemarks: this.state.contractList.contractRemarks,
  1926. annexUrl: this.state.contractList.annexUrl,
  1927. annexName: this.state.contractList.annexName,
  1928. },
  1929. success: function (data) {
  1930. let theArr = [];
  1931. if (data.error && data.error.length) {
  1932. message.warning(data.error[0].message);
  1933. } else {
  1934. this.loadData();
  1935. this.contractCancel();
  1936. message.success("修改成功");
  1937. }
  1938. }.bind(this),
  1939. }).always(
  1940. function () {
  1941. this.setState({
  1942. loading: false,
  1943. });
  1944. }.bind(this)
  1945. );
  1946. },
  1947. editChoose() {
  1948. this.setState({
  1949. loading: true,
  1950. });
  1951. $.ajax({
  1952. method: "post",
  1953. dataType: "json",
  1954. crossDomain: false,
  1955. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1956. data: {
  1957. id: this.state.chooseList.id,
  1958. pdId: this.state.chooseList.pdId,
  1959. chooseStatus: this.state.chooseList.chooseStatus,
  1960. effectTimes: this.state.chooseList.effectTimes,
  1961. chooseRemarks: this.state.chooseList.chooseRemarks,
  1962. annexUrl: this.state.chooseList.annexUrl,
  1963. annexName: this.state.chooseList.annexName,
  1964. },
  1965. success: function (data) {
  1966. let theArr = [];
  1967. if (data.error && data.error.length) {
  1968. message.warning(data.error[0].message);
  1969. } else {
  1970. this.loadData();
  1971. this.chooseCancel();
  1972. message.success("修改成功");
  1973. }
  1974. }.bind(this),
  1975. }).always(
  1976. function () {
  1977. this.setState({
  1978. loading: false,
  1979. });
  1980. }.bind(this)
  1981. );
  1982. },
  1983. editQuit() {
  1984. this.setState({
  1985. loading: true,
  1986. });
  1987. $.ajax({
  1988. method: "post",
  1989. dataType: "json",
  1990. crossDomain: false,
  1991. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1992. data: {
  1993. id: this.state.quitList.id,
  1994. pdId: this.state.quitList.pdId,
  1995. effectTimes: this.state.quitList.effectTimes,
  1996. quitRemarks: this.state.quitList.quitRemarks,
  1997. annexUrl: this.state.quitList.annexUrl,
  1998. annexName: this.state.quitList.annexName,
  1999. },
  2000. success: function (data) {
  2001. let theArr = [];
  2002. if (data.error && data.error.length) {
  2003. message.warning(data.error[0].message);
  2004. } else {
  2005. this.loadData();
  2006. this.quitCancel();
  2007. message.success("修改成功");
  2008. }
  2009. }.bind(this),
  2010. }).always(
  2011. function () {
  2012. this.setState({
  2013. loading: false,
  2014. });
  2015. }.bind(this)
  2016. );
  2017. },
  2018. editWelfare() {
  2019. this.setState({
  2020. loading: true,
  2021. });
  2022. $.ajax({
  2023. method: "post",
  2024. dataType: "json",
  2025. crossDomain: false,
  2026. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  2027. data: {
  2028. pdId: this.state.ModalData.id,
  2029. annexUrl: this.state.ModalData.welfareAnnexUrl,
  2030. annexName: this.state.ModalData.welfareAnnexName,
  2031. remarks: this.state.ModalData.welfareRemarks,
  2032. },
  2033. success: function (data) {
  2034. let theArr = [];
  2035. if (data.error && data.error.length) {
  2036. message.warning(data.error[0].message);
  2037. } else {
  2038. this.loadData();
  2039. this.welfareCancel();
  2040. message.success("修改成功");
  2041. }
  2042. }.bind(this),
  2043. }).always(
  2044. function () {
  2045. this.setState({
  2046. loading: false,
  2047. });
  2048. }.bind(this)
  2049. );
  2050. },
  2051. render() {
  2052. const rowSelection = {
  2053. selectedRowKeys: this.state.selectedRowKeys,
  2054. onChange: (selectedRowKeys, selectedRows) => {
  2055. this.setState({
  2056. selectedRows: selectedRows.slice(-1),
  2057. selectedRowKeys: selectedRowKeys.slice(-1),
  2058. });
  2059. },
  2060. };
  2061. const { RangePicker } = DatePicker;
  2062. const formItemLayout = {
  2063. labelCol: { span: 6 },
  2064. wrapperCol: { span: 16 },
  2065. };
  2066. let departmentArr = this.state.departmentArr || [];
  2067. return (
  2068. <div className="user-content">
  2069. <div className="content-title" style={{ marginBottom: 10 }}>
  2070. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  2071. </div>
  2072. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2073. <TabPane tab="更改表格显示数据" key="1">
  2074. <div style={{ marginLeft: 10 }}>
  2075. <ChooseList
  2076. columns={this.state.columns}
  2077. changeFn={this.changeList}
  2078. changeList={this.state.changeList}
  2079. top={55}
  2080. margin={11}
  2081. />
  2082. </div>
  2083. </TabPane>
  2084. <TabPane tab="搜索" key="2">
  2085. <div className="user-search" style={{ marginLeft: 10 }}>
  2086. <Input
  2087. placeholder="姓名"
  2088. style={{ width: 120 }}
  2089. value={this.state.nameSearch}
  2090. onChange={(e) => {
  2091. this.setState({ nameSearch: e.target.value });
  2092. }}
  2093. />
  2094. <Select
  2095. placeholder="员工状态"
  2096. onChange={(e) => {
  2097. this.setState({ statusSearch: e });
  2098. }}
  2099. style={{ width: 120, marginRight: 10 }}
  2100. value={this.state.statusSearch}
  2101. >
  2102. <Option value="0">实习生</Option>
  2103. <Option value="1">在职(试用期)</Option>
  2104. <Option value="2">在职(合同期)</Option>
  2105. <Option value="3">兼职</Option>
  2106. <Option value="4">离职</Option>
  2107. </Select>
  2108. <Select
  2109. placeholder="所属公司"
  2110. style={{ width: 120, marginRight: 10 }}
  2111. value={this.state.departmenttList}
  2112. onChange={(e) => {
  2113. this.setState({ departmenttList: e });
  2114. }}
  2115. >
  2116. {departmentArr.map(function (item) {
  2117. return (
  2118. <Select.Option key={item.id}>{item.name}</Select.Option>
  2119. );
  2120. })}
  2121. </Select>
  2122. <Select
  2123. placeholder="性别"
  2124. onChange={(e) => {
  2125. this.setState({ sexSearch: e });
  2126. }}
  2127. style={{ width: 120, marginRight: 10 }}
  2128. value={this.state.sexSearch}
  2129. >
  2130. <Option value="0">男</Option>
  2131. <Option value="1">女</Option>
  2132. </Select>
  2133. <Select
  2134. placeholder="婚姻状态"
  2135. onChange={(e) => {
  2136. this.setState({ marriageSearch: e });
  2137. }}
  2138. style={{ width: 120, marginRight: 10 }}
  2139. value={this.state.marriageSearch}
  2140. >
  2141. <Option value="0">未婚</Option>
  2142. <Option value="1">已婚</Option>
  2143. <Option value="2">离异</Option>
  2144. </Select>
  2145. <Select
  2146. placeholder="政治面貌"
  2147. onChange={(e) => {
  2148. this.setState({ politicalOutlookSearch: e });
  2149. }}
  2150. style={{ width: 120, marginRight: 10 }}
  2151. value={this.state.politicalOutlookSearch}
  2152. >
  2153. <Option value="0">群众</Option>
  2154. <Option value="1">中共预备党员</Option>
  2155. <Option value="2">中共党员</Option>
  2156. <Option value="3">致公党员</Option>
  2157. </Select>
  2158. <Select
  2159. placeholder="生日月份"
  2160. onChange={(e) => {
  2161. this.setState({ birthdayMonthSearch: e });
  2162. }}
  2163. style={{ width: 120, marginRight: 10 }}
  2164. value={this.state.birthdayMonthSearch}
  2165. >
  2166. <Option value="">全部</Option>
  2167. <Option value="1">一月</Option>
  2168. <Option value="2">二月</Option>
  2169. <Option value="3">三月</Option>
  2170. <Option value="4">四月</Option>
  2171. <Option value="5">五月</Option>
  2172. <Option value="6">六月</Option>
  2173. <Option value="7">七月</Option>
  2174. <Option value="8">八月</Option>
  2175. <Option value="9">九月</Option>
  2176. <Option value="10">十月</Option>
  2177. <Option value="11">十一月</Option>
  2178. <Option value="12">十二月</Option>
  2179. </Select>
  2180. <Select
  2181. placeholder="所属系统"
  2182. onChange={(e) => {
  2183. this.setState({ systemSearch: e });
  2184. }}
  2185. style={{ width: 120, marginRight: 10 }}
  2186. value={this.state.systemSearch}
  2187. >
  2188. <Option value="0">管理系统</Option>
  2189. <Option value="1">营销系统</Option>
  2190. <Option value="2">技术系统</Option>
  2191. </Select>
  2192. <Select
  2193. placeholder="工作年限"
  2194. onChange={(e) => {
  2195. this.setState({ workingYearsSearch: e });
  2196. }}
  2197. style={{ width: 120, marginRight: 10 }}
  2198. value={this.state.workingYearsSearch}
  2199. >
  2200. <Option value="0">0-1年</Option>
  2201. <Option value="1">1-3年</Option>
  2202. <Option value="2">3-10年</Option>
  2203. <Option value="3">10年以上</Option>
  2204. </Select>
  2205. <Select
  2206. placeholder="学历"
  2207. onChange={(e) => {
  2208. this.setState({ educationSearch: e });
  2209. }}
  2210. style={{ width: 120 }}
  2211. value={this.state.educationSearch}
  2212. >
  2213. <Option value="0">高中/中专</Option>
  2214. <Option value="1">专科/高职</Option>
  2215. <Option value="2">本科</Option>
  2216. <Option value="3">研究生</Option>
  2217. <Option value="5">博士</Option>
  2218. </Select>
  2219. <br />
  2220. <span style={{}}>转正日期:</span>
  2221. <RangePicker
  2222. style={{ marginRight: 10, width: 170 }}
  2223. value={[
  2224. this.state.promotionTime[0]
  2225. ? moment(this.state.promotionTime[0])
  2226. : null,
  2227. this.state.promotionTime[1]
  2228. ? moment(this.state.promotionTime[1])
  2229. : null,
  2230. ]}
  2231. onChange={(data, dataString) => {
  2232. this.setState({ promotionTime: dataString });
  2233. }}
  2234. />
  2235. <span style={{}}>入职时间:</span>
  2236. <RangePicker
  2237. style={{ marginRight: 10, width: 170 }}
  2238. value={[
  2239. this.state.entryTime[0]
  2240. ? moment(this.state.entryTime[0])
  2241. : null,
  2242. this.state.entryTime[1]
  2243. ? moment(this.state.entryTime[1])
  2244. : null,
  2245. ]}
  2246. onChange={(data, dataString) => {
  2247. this.setState({ entryTime: dataString });
  2248. }}
  2249. />
  2250. <span style={{}}>离职时间:</span>
  2251. <RangePicker
  2252. style={{ marginRight: 10, width: 170 }}
  2253. value={[
  2254. this.state.quitTime[0]
  2255. ? moment(this.state.quitTime[0])
  2256. : null,
  2257. this.state.quitTime[1]
  2258. ? moment(this.state.quitTime[1])
  2259. : null,
  2260. ]}
  2261. onChange={(data, dataString) => {
  2262. this.setState({ quitTime: dataString });
  2263. }}
  2264. />
  2265. <span style={{}}>合同时间:</span>
  2266. <RangePicker
  2267. style={{ marginRight: 10, width: 170 }}
  2268. value={[
  2269. this.state.contractTime[0]
  2270. ? moment(this.state.contractTime[0])
  2271. : null,
  2272. this.state.contractTime[1]
  2273. ? moment(this.state.contractTime[1])
  2274. : null,
  2275. ]}
  2276. onChange={(data, dataString) => {
  2277. this.setState({ contractTime: dataString });
  2278. }}
  2279. />
  2280. <Button
  2281. type="primary"
  2282. onClick={this.search}
  2283. style={{ marginLeft: 10 }}
  2284. >
  2285. 搜索
  2286. </Button>
  2287. <Button onClick={this.reset}>重置</Button>
  2288. </div>
  2289. </TabPane>
  2290. <TabPane tab="新增员工档案" key="3">
  2291. <Button
  2292. type="primary"
  2293. onClick={this.addPeo}
  2294. style={{ margin: "11px 0px 10px 10px" }}
  2295. >
  2296. 新增员工档案
  2297. </Button>
  2298. </TabPane>
  2299. <TabPane tab="导出Excel" key="4">
  2300. <Button
  2301. type="primary"
  2302. onClick={this.export}
  2303. style={{ margin: "11px 0px 10px 10px" }}
  2304. >
  2305. 导出当前列表
  2306. </Button>
  2307. </TabPane>
  2308. </Tabs>
  2309. <div className="patent-table" style={{ marginTop: 10 }}>
  2310. <Spin spinning={this.state.loading}>
  2311. <Table
  2312. bordered
  2313. columns={
  2314. this.state.changeList == undefined
  2315. ? this.state.columns
  2316. : this.state.changeList
  2317. }
  2318. onRowClick={this.tableRowClick}
  2319. dataSource={this.state.dataSource}
  2320. scroll={{ x: "max-content", y: 0 }}
  2321. pagination={this.state.pagination}
  2322. size="small"
  2323. />
  2324. </Spin>
  2325. </div>
  2326. <Modal
  2327. visible={this.state.visible}
  2328. footer={null}
  2329. width={1000}
  2330. onCancel={() => {
  2331. this.loadData();
  2332. this.cancel();
  2333. }}
  2334. >
  2335. <ReactToPrint
  2336. trigger={() => (
  2337. <Button
  2338. type="primary"
  2339. style={{
  2340. float: "right",
  2341. marginTop: 10,
  2342. position: "absolute",
  2343. top: 30,
  2344. right: 15,
  2345. zIndex: 1,
  2346. display: this.state.detailFlag ? "block" : "none"
  2347. }}
  2348. >
  2349. 打印
  2350. </Button>
  2351. )}
  2352. content={() => this.refs}
  2353. />
  2354. <Spin
  2355. spinning={this.state.loading}
  2356. ref={(e) => {
  2357. this.refs = e;
  2358. }}
  2359. >
  2360. <h2
  2361. style={{
  2362. textAlign: "center",
  2363. paddingBottom: 10,
  2364. marginBottom: 10,
  2365. }}
  2366. >
  2367. {this.state.ModalData.name + "人事档案"}
  2368. </h2>
  2369. <Button
  2370. type="primary"
  2371. style={{ position: "absolute", top: 25 }}
  2372. onClick={(e) => {
  2373. this.setState({ detailFlag: !this.state.detailFlag });
  2374. }}
  2375. >
  2376. {this.state.detailFlag ? "切换编辑模式" : "切换查看模式"}
  2377. </Button>
  2378. <ul onClick={this.editPeo} className="peo-table">
  2379. {this.state.table.map((item) => {
  2380. let value = item.value;
  2381. if (item.render) {
  2382. let fn = item.render;
  2383. return (
  2384. <li>
  2385. <div className="peo-left">{item.key}</div>
  2386. <Tooltip
  2387. placement="top"
  2388. title={fn(
  2389. this.state.ModalData[value],
  2390. value == "son" ? this.state.ModalData.girl : 0
  2391. )}
  2392. >
  2393. <div className="peo-right">
  2394. {fn(
  2395. this.state.ModalData[value],
  2396. value == "son" ? this.state.ModalData.girl : 0
  2397. )}
  2398. </div>
  2399. </Tooltip>
  2400. </li>
  2401. );
  2402. }
  2403. return (
  2404. <li>
  2405. <div className="peo-left">{item.key}</div>
  2406. <Tooltip
  2407. placement="top"
  2408. title={this.state.ModalData[item.value]}
  2409. >
  2410. <div className="peo-right">
  2411. {this.state.ModalData[value] &&
  2412. this.state.ModalData[value].length > 10
  2413. ? this.state.ModalData[value].substring(0, 10) + "..."
  2414. : this.state.ModalData[value]}
  2415. </div>
  2416. </Tooltip>
  2417. </li>
  2418. );
  2419. })}
  2420. </ul>
  2421. {this.state.detailFlag ? (
  2422. <div>
  2423. <div className="title-peo">
  2424. <span>任职信息</span>
  2425. {/* <Button
  2426. type="primary"
  2427. onClick={(e) => {
  2428. this.stayModal(this.state.ModalData.id);
  2429. }}
  2430. style={{ position: "absolute", right: 0, height: 30 }}
  2431. >
  2432. 修改任职信息
  2433. </Button> */}
  2434. </div>
  2435. <div className="clearfix">
  2436. <FormItem
  2437. className="half-item"
  2438. labelCol={{ span: 6 }}
  2439. wrapperCol={{ span: 30 }}
  2440. label="员工状态"
  2441. >
  2442. {this.state.ModalData.statusName}
  2443. </FormItem>
  2444. <FormItem
  2445. className="half-item"
  2446. labelCol={{ span: 6 }}
  2447. wrapperCol={{ span: 30 }}
  2448. label="所属系统"
  2449. >
  2450. {this.state.ModalData.systemName}
  2451. </FormItem>
  2452. </div>
  2453. <div className="clearfix">
  2454. <FormItem
  2455. className="half-item"
  2456. labelCol={{ span: 6 }}
  2457. wrapperCol={{ span: 30 }}
  2458. label="工作性质"
  2459. >
  2460. {this.jobStatus(
  2461. this.state.ModalData.jobNature,
  2462. this.state.ModalData.jobNatureRemarks
  2463. )}
  2464. </FormItem>
  2465. <FormItem
  2466. className="half-item"
  2467. labelCol={{ span: 6 }}
  2468. wrapperCol={{ span: 30 }}
  2469. label="工龄"
  2470. >
  2471. {this.state.ModalData.workingYear}
  2472. </FormItem>
  2473. </div>
  2474. <div className="clearfix">
  2475. <FormItem
  2476. className="half-item"
  2477. labelCol={{ span: 6 }}
  2478. wrapperCol={{ span: 30 }}
  2479. label="入职时间"
  2480. >
  2481. {this.state.ModalData.entryTimes}
  2482. </FormItem>
  2483. <FormItem
  2484. className="half-item"
  2485. labelCol={{ span: 6 }}
  2486. wrapperCol={{ span: 30 }}
  2487. label="转正时间"
  2488. >
  2489. {this.state.ModalData.promotionTimes}
  2490. </FormItem>
  2491. </div>
  2492. <div className="clearfix">
  2493. <FormItem
  2494. className="half-item"
  2495. labelCol={{ span: 6 }}
  2496. wrapperCol={{ span: 30 }}
  2497. label="所属公司"
  2498. >
  2499. {this.state.ModalData.depName}
  2500. </FormItem>
  2501. <FormItem
  2502. className="half-item"
  2503. labelCol={{ span: 6 }}
  2504. wrapperCol={{ span: 30 }}
  2505. label="级别"
  2506. >
  2507. {this.state.ModalData.lvlName}
  2508. </FormItem>
  2509. </div>
  2510. <div className="clearfix">
  2511. <FormItem
  2512. className="half-item"
  2513. labelCol={{ span: 6 }}
  2514. wrapperCol={{ span: 30 }}
  2515. label="职位"
  2516. >
  2517. {this.state.ModalData.jobsName}
  2518. </FormItem>
  2519. <FormItem
  2520. className="half-item"
  2521. labelCol={{ span: 6 }}
  2522. wrapperCol={{ span: 30 }}
  2523. label="岗位津贴"
  2524. >
  2525. {this.state.ModalData.allowance}
  2526. </FormItem>
  2527. </div>
  2528. <div className="clearfix">
  2529. <FormItem
  2530. className="half-item"
  2531. labelCol={{ span: 6 }}
  2532. wrapperCol={{ span: 30 }}
  2533. label="星级"
  2534. >
  2535. {this.state.ModalData.starName}
  2536. </FormItem>
  2537. </div>
  2538. <div className="title-peo">
  2539. <span>联系信息</span>
  2540. {/* <Button
  2541. type="primary"
  2542. onClick={this.phoneModal}
  2543. style={{ position: "absolute", right: 0, height: 30 }}
  2544. >
  2545. 修改联系信息
  2546. </Button> */}
  2547. </div>
  2548. <div className="clearfix">
  2549. <FormItem
  2550. className="half-item"
  2551. labelCol={{ span: 6 }}
  2552. wrapperCol={{ span: 30 }}
  2553. label="手机号码"
  2554. >
  2555. {this.state.ModalData.mobile}
  2556. </FormItem>
  2557. <FormItem
  2558. className="half-item"
  2559. labelCol={{ span: 6 }}
  2560. wrapperCol={{ span: 30 }}
  2561. label="电话"
  2562. >
  2563. {this.state.ModalData.fixedTel}
  2564. </FormItem>
  2565. </div>
  2566. {this.state.ModalData.contactList &&
  2567. this.state.ModalData.contactList.length > 0 ? (
  2568. this.state.ModalData.contactList.map((item, index) => {
  2569. return (
  2570. <div className="clearfix">
  2571. <FormItem
  2572. className="half-item"
  2573. labelCol={{ span: 6 }}
  2574. wrapperCol={{ span: 30 }}
  2575. label={"紧急联系人" + (index + 1)}
  2576. >
  2577. {item.emergencyContact}
  2578. </FormItem>
  2579. <FormItem
  2580. className="half-item"
  2581. labelCol={{ span: 6 }}
  2582. wrapperCol={{ span: 30 }}
  2583. label={"紧急联系人" + (index + 1) + "电话"}
  2584. >
  2585. {item.emergencyMobile}
  2586. </FormItem>
  2587. </div>
  2588. );
  2589. })
  2590. ) : (
  2591. <div
  2592. style={{
  2593. textAlign: "center",
  2594. height: 60,
  2595. lineHeight: "60px",
  2596. }}
  2597. >
  2598. 暂无紧急联系人信息
  2599. </div>
  2600. )}
  2601. <div className="title-peo">
  2602. <span>入职资料</span>
  2603. {/* <Button
  2604. type="primary"
  2605. onClick={this.entryModal}
  2606. style={{ position: "absolute", right: 0, height: 30 }}
  2607. >
  2608. 修改入职信息
  2609. </Button> */}
  2610. </div>
  2611. <div className="clearfix">
  2612. <FormItem
  2613. className="half-item"
  2614. labelCol={{ span: 6 }}
  2615. wrapperCol={{ span: 30 }}
  2616. label="毕业学校"
  2617. >
  2618. {this.state.ModalData.personnelEntry
  2619. ? this.state.ModalData.personnelEntry.school
  2620. : ""}
  2621. </FormItem>
  2622. <FormItem
  2623. className="half-item"
  2624. labelCol={{ span: 6 }}
  2625. wrapperCol={{ span: 30 }}
  2626. label="学历"
  2627. >
  2628. {this.state.ModalData.personnelEntry
  2629. ? this.educationStatus(
  2630. this.state.ModalData.personnelEntry.education
  2631. )
  2632. : ""}
  2633. </FormItem>
  2634. </div>
  2635. <div className="clearfix">
  2636. <FormItem
  2637. className="half-item"
  2638. labelCol={{ span: 6 }}
  2639. wrapperCol={{ span: 30 }}
  2640. label="所学专业"
  2641. >
  2642. {this.state.ModalData.personnelEntry
  2643. ? this.state.ModalData.personnelEntry.major
  2644. : ""}
  2645. </FormItem>
  2646. <FormItem
  2647. className="half-item"
  2648. labelCol={{ span: 6 }}
  2649. wrapperCol={{ span: 30 }}
  2650. label="职称"
  2651. >
  2652. {this.state.ModalData.personnelEntry
  2653. ? this.state.ModalData.personnelEntry.title
  2654. : ""}
  2655. </FormItem>
  2656. </div>
  2657. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2658. <div style={{ marginBottom: 10 }}>附件:</div>
  2659. <PicModal
  2660. remarks={
  2661. this.state.ModalData.personnelEntry
  2662. ? this.picToArr(
  2663. this.state.ModalData.personnelEntry.annexName
  2664. )
  2665. : []
  2666. }
  2667. picUrl={
  2668. this.state.ModalData.personnelEntry
  2669. ? this.picToArr(
  2670. this.state.ModalData.personnelEntry.annexUrl
  2671. )
  2672. : []
  2673. }
  2674. />
  2675. </div>
  2676. <div className="title-peo">
  2677. <span>晋升情况</span>
  2678. {/* <Button
  2679. type="primary"
  2680. onClick={(e) => {
  2681. this.upgradeModal(true);
  2682. }}
  2683. style={{ position: "absolute", right: 0, height: 30 }}
  2684. >
  2685. 新增晋升信息
  2686. </Button> */}
  2687. </div>
  2688. {this.state.ModalData.promotionList &&
  2689. this.state.ModalData.promotionList.length > 0 ? (
  2690. this.state.ModalData.promotionList.map((item, index) => {
  2691. return (
  2692. <div
  2693. style={{
  2694. width: "100%",
  2695. borderBottom: "1px dashed #ccc",
  2696. position: "relative",
  2697. }}
  2698. >
  2699. {/* <Button
  2700. style={{
  2701. position: "absolute",
  2702. right: "50%",
  2703. bottom: 10,
  2704. transform: "translateX(50%)",
  2705. }}
  2706. type="primary"
  2707. onClick={(e) => {
  2708. this.upgradeModal(false, index);
  2709. }}
  2710. >
  2711. 修改信息
  2712. </Button> */}
  2713. <div className="clearfix">
  2714. <FormItem
  2715. className="half-item"
  2716. labelCol={{ span: 6 }}
  2717. wrapperCol={{ span: 30 }}
  2718. label="晋升职位"
  2719. >
  2720. {item.oldJobsName + "--->" + item.newJobsName}
  2721. </FormItem>
  2722. <FormItem
  2723. className="half-item"
  2724. labelCol={{ span: 6 }}
  2725. wrapperCol={{ span: 30 }}
  2726. label="晋升等级"
  2727. >
  2728. {item.oldLvlName + "--->" + item.newLvlName}
  2729. </FormItem>
  2730. </div>
  2731. <div className="clearfix">
  2732. <FormItem
  2733. className="half-item"
  2734. labelCol={{ span: 6 }}
  2735. wrapperCol={{ span: 30 }}
  2736. label="晋升时间"
  2737. >
  2738. {item.promotionTimes}
  2739. </FormItem>
  2740. </div>
  2741. <div className="clearfix">
  2742. <FormItem
  2743. className="half-item"
  2744. labelCol={{ span: 6 }}
  2745. wrapperCol={{ span: 30 }}
  2746. label="晋升备注"
  2747. >
  2748. {item.promotionRemarks}
  2749. </FormItem>
  2750. </div>
  2751. <div
  2752. className="clearfix"
  2753. style={{ paddingLeft: 70, marginBottom: 40 }}
  2754. >
  2755. <div style={{ marginBottom: 10 }}>附件:</div>
  2756. <PicModal
  2757. remarks={this.picToArr(item.annexName)}
  2758. picUrl={this.picToArr(item.annexUrl)}
  2759. />
  2760. </div>
  2761. </div>
  2762. );
  2763. })
  2764. ) : (
  2765. <div
  2766. style={{
  2767. textAlign: "center",
  2768. height: 60,
  2769. lineHeight: "60px",
  2770. }}
  2771. >
  2772. 暂无晋升情况
  2773. </div>
  2774. )}
  2775. <div className="title-peo">
  2776. <span>合同情况</span>
  2777. {/* <Button
  2778. type="primary"
  2779. onClick={(e) => {
  2780. this.contractModal(true);
  2781. }}
  2782. style={{ position: "absolute", right: 0, height: 30 }}
  2783. >
  2784. 新增合同信息
  2785. </Button> */}
  2786. </div>
  2787. {this.state.ModalData.contractList &&
  2788. this.state.ModalData.contractList.length > 0 ? (
  2789. this.state.ModalData.contractList.map((item, index) => {
  2790. return (
  2791. <div
  2792. style={{
  2793. width: "100%",
  2794. borderBottom: "1px dashed #ccc",
  2795. position: "relative",
  2796. }}
  2797. >
  2798. {/* <Button
  2799. style={{
  2800. position: "absolute",
  2801. right: "50%",
  2802. bottom: 10,
  2803. transform: "translateX(50%)",
  2804. }}
  2805. type="primary"
  2806. onClick={(e) => {
  2807. this.contractModal(false, index);
  2808. }}
  2809. >
  2810. 修改信息
  2811. </Button> */}
  2812. <div className="clearfix">
  2813. <FormItem
  2814. className="half-item"
  2815. labelCol={{ span: 6 }}
  2816. wrapperCol={{ span: 30 }}
  2817. label="签订时间"
  2818. >
  2819. {item.startTimes}
  2820. </FormItem>
  2821. <FormItem
  2822. className="half-item"
  2823. labelCol={{ span: 6 }}
  2824. wrapperCol={{ span: 30 }}
  2825. label="到期时间"
  2826. >
  2827. {item.endTimes}
  2828. </FormItem>
  2829. </div>
  2830. <div className="clearfix">
  2831. <FormItem
  2832. style={{ width: "100%", wordBreak: "break-all" }}
  2833. className="half-item"
  2834. labelCol={{ span: 3 }}
  2835. wrapperCol={{ span: 30 }}
  2836. label="备注"
  2837. >
  2838. {item.contractRemarks}
  2839. </FormItem>
  2840. </div>
  2841. <div
  2842. className="clearfix"
  2843. style={{ paddingLeft: 70, marginBottom: 40 }}
  2844. >
  2845. <div style={{ marginBottom: 10 }}>附件:</div>
  2846. <PicModal
  2847. remarks={this.picToArr(item.annexName)}
  2848. picUrl={this.picToArr(item.annexUrl)}
  2849. />
  2850. </div>
  2851. </div>
  2852. );
  2853. })
  2854. ) : (
  2855. <div
  2856. style={{
  2857. textAlign: "center",
  2858. height: 60,
  2859. lineHeight: "60px",
  2860. }}
  2861. >
  2862. 暂无合同情况
  2863. </div>
  2864. )}
  2865. <div className="title-peo">
  2866. <span>奖惩情况</span>
  2867. {/* <Button
  2868. type="primary"
  2869. onClick={(e) => {
  2870. this.chooseModal(true);
  2871. }}
  2872. style={{ position: "absolute", right: 0, height: 30 }}
  2873. >
  2874. 新增奖惩信息
  2875. </Button> */}
  2876. </div>
  2877. {this.state.ModalData.chooseList &&
  2878. this.state.ModalData.chooseList.length > 0 ? (
  2879. this.state.ModalData.chooseList.map((item, index) => {
  2880. return (
  2881. <div
  2882. style={{
  2883. width: "100%",
  2884. borderBottom: "1px dashed #ccc",
  2885. position: "relative",
  2886. }}
  2887. >
  2888. {/* <Button
  2889. style={{
  2890. position: "absolute",
  2891. right: "50%",
  2892. bottom: 10,
  2893. transform: "translateX(50%)",
  2894. }}
  2895. type="primary"
  2896. onClick={(e) => {
  2897. this.chooseModal(false, index);
  2898. }}
  2899. >
  2900. 修改信息
  2901. </Button> */}
  2902. <div className="clearfix">
  2903. <FormItem
  2904. className="half-item"
  2905. labelCol={{ span: 6 }}
  2906. wrapperCol={{ span: 30 }}
  2907. label={"状态"}
  2908. >
  2909. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2910. </FormItem>
  2911. <FormItem
  2912. className="half-item"
  2913. labelCol={{ span: 6 }}
  2914. wrapperCol={{ span: 30 }}
  2915. label="时间"
  2916. >
  2917. {item.effectTimes}
  2918. </FormItem>
  2919. </div>
  2920. <div className="clearfix">
  2921. <FormItem
  2922. className="half-item"
  2923. labelCol={{ span: 6 }}
  2924. wrapperCol={{ span: 30 }}
  2925. label={"内容"}
  2926. >
  2927. {item.chooseRemarks}
  2928. </FormItem>
  2929. </div>
  2930. <div
  2931. className="clearfix"
  2932. style={{ paddingLeft: 70, marginBottom: 40 }}
  2933. >
  2934. <div style={{ marginBottom: 10 }}>附件:</div>
  2935. <PicModal
  2936. remarks={this.picToArr(item.annexName)}
  2937. picUrl={this.picToArr(item.annexUrl)}
  2938. />
  2939. </div>
  2940. </div>
  2941. );
  2942. })
  2943. ) : (
  2944. <div
  2945. style={{
  2946. textAlign: "center",
  2947. height: 60,
  2948. lineHeight: "60px",
  2949. }}
  2950. >
  2951. 暂无奖惩情况
  2952. </div>
  2953. )}
  2954. <div className="title-peo">
  2955. <span>离职情况</span>
  2956. {/* <Button
  2957. type="primary"
  2958. onClick={(e) => {
  2959. this.quitModal(true);
  2960. }}
  2961. style={{ position: "absolute", right: 0, height: 30 }}
  2962. >
  2963. 新增离职信息
  2964. </Button> */}
  2965. </div>
  2966. {this.state.ModalData.quitList &&
  2967. this.state.ModalData.quitList.length > 0 ? (
  2968. this.state.ModalData.quitList.map((item, index) => {
  2969. return (
  2970. <div
  2971. style={{
  2972. width: "100%",
  2973. borderBottom: "1px dashed #ccc",
  2974. position: "relative",
  2975. }}
  2976. >
  2977. {/* <Button
  2978. style={{
  2979. position: "absolute",
  2980. right: "50%",
  2981. bottom: 10,
  2982. transform: "translateX(50%)",
  2983. }}
  2984. type="primary"
  2985. onClick={(e) => {
  2986. this.quitModal(false, index);
  2987. }}
  2988. >
  2989. 修改信息
  2990. </Button> */}
  2991. <div className="clearfix">
  2992. <FormItem
  2993. className="half-item"
  2994. labelCol={{ span: 6 }}
  2995. wrapperCol={{ span: 30 }}
  2996. label="离职时间"
  2997. >
  2998. {item.effectTimes}
  2999. </FormItem>
  3000. <FormItem
  3001. className="half-item"
  3002. labelCol={{ span: 6 }}
  3003. wrapperCol={{ span: 30 }}
  3004. label="离职备注"
  3005. >
  3006. {item.quitRemarks}
  3007. </FormItem>
  3008. </div>
  3009. <div
  3010. className="clearfix"
  3011. style={{ paddingLeft: 70, marginBottom: 40 }}
  3012. >
  3013. <div style={{ marginBottom: 10 }}>附件:</div>
  3014. <PicModal
  3015. remarks={this.picToArr(item.annexName)}
  3016. picUrl={this.picToArr(item.annexUrl)}
  3017. />
  3018. </div>
  3019. </div>
  3020. );
  3021. })
  3022. ) : (
  3023. <div
  3024. style={{
  3025. textAlign: "center",
  3026. height: 60,
  3027. lineHeight: "60px",
  3028. }}
  3029. >
  3030. 暂无离职信息
  3031. </div>
  3032. )}
  3033. <div className="title-peo" style={{ marginBottom: 10 }}>
  3034. <span>福利情况</span>
  3035. {/* <Button
  3036. type="primary"
  3037. onClick={(e) => {
  3038. this.welfareModal();
  3039. }}
  3040. style={{ position: "absolute", right: 0, height: 30 }}
  3041. >
  3042. 修改福利信息
  3043. </Button> */}
  3044. </div>
  3045. <Table
  3046. columns={this.state.welfareColumns}
  3047. dataSource={this.state.ModalData.welfareList}
  3048. pagination={false}
  3049. bordered
  3050. size="small"
  3051. scroll={{ x: "max-content", y: 0 }}
  3052. />
  3053. <div className="clearfix" style={{ marginTop: 10 }}>
  3054. <FormItem
  3055. className="half-item"
  3056. style={{ width: "100%", wordBreak: "break-all" }}
  3057. labelCol={{ span: 3 }}
  3058. wrapperCol={{ span: 30 }}
  3059. label="备注"
  3060. >
  3061. {this.state.ModalData.welfareRemarks}
  3062. </FormItem>
  3063. </div>
  3064. <div
  3065. className="clearfix"
  3066. style={{ paddingLeft: 70, marginBottom: 0 }}
  3067. >
  3068. <div style={{ marginBottom: 10 }}>附件:</div>
  3069. <PicModal
  3070. remarks={this.picToArr(
  3071. this.state.ModalData.welfareAnnexName
  3072. )}
  3073. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  3074. />
  3075. </div>
  3076. </div>
  3077. ) : (
  3078. <Tabs
  3079. activeKey={this.state.active}
  3080. onChange={(e) => {
  3081. this.setState({ active: e });
  3082. }}
  3083. >
  3084. <TabPane tab="任职信息" key={1}>
  3085. <div className="title-peo">
  3086. <span>任职信息</span>
  3087. <Button
  3088. type="primary"
  3089. onClick={(e) => {
  3090. this.stayModal(this.state.ModalData.id);
  3091. }}
  3092. style={{ position: "absolute", right: 0, height: 30 }}
  3093. >
  3094. 修改任职信息
  3095. </Button>
  3096. </div>
  3097. <div className="clearfix">
  3098. <FormItem
  3099. className="half-item"
  3100. labelCol={{ span: 6 }}
  3101. wrapperCol={{ span: 30 }}
  3102. label="员工状态"
  3103. >
  3104. {this.state.ModalData.statusName}
  3105. </FormItem>
  3106. <FormItem
  3107. className="half-item"
  3108. labelCol={{ span: 6 }}
  3109. wrapperCol={{ span: 30 }}
  3110. label="所属系统"
  3111. >
  3112. {this.state.ModalData.systemName}
  3113. </FormItem>
  3114. </div>
  3115. <div className="clearfix">
  3116. <FormItem
  3117. className="half-item"
  3118. labelCol={{ span: 6 }}
  3119. wrapperCol={{ span: 30 }}
  3120. label="工作性质"
  3121. >
  3122. {this.jobStatus(
  3123. this.state.ModalData.jobNature,
  3124. this.state.ModalData.jobNatureRemarks
  3125. )}
  3126. </FormItem>
  3127. <FormItem
  3128. className="half-item"
  3129. labelCol={{ span: 6 }}
  3130. wrapperCol={{ span: 30 }}
  3131. label="工龄"
  3132. >
  3133. {this.state.ModalData.workingYear}
  3134. </FormItem>
  3135. </div>
  3136. <div className="clearfix">
  3137. <FormItem
  3138. className="half-item"
  3139. labelCol={{ span: 6 }}
  3140. wrapperCol={{ span: 30 }}
  3141. label="入职时间"
  3142. >
  3143. {this.state.ModalData.entryTimes}
  3144. </FormItem>
  3145. <FormItem
  3146. className="half-item"
  3147. labelCol={{ span: 6 }}
  3148. wrapperCol={{ span: 30 }}
  3149. label="转正时间"
  3150. >
  3151. {this.state.ModalData.promotionTimes}
  3152. </FormItem>
  3153. </div>
  3154. <div className="clearfix">
  3155. <FormItem
  3156. className="half-item"
  3157. labelCol={{ span: 6 }}
  3158. wrapperCol={{ span: 30 }}
  3159. label="所属公司"
  3160. >
  3161. {this.state.ModalData.depName}
  3162. </FormItem>
  3163. <FormItem
  3164. className="half-item"
  3165. labelCol={{ span: 6 }}
  3166. wrapperCol={{ span: 30 }}
  3167. label="级别"
  3168. >
  3169. {this.state.ModalData.lvlName}
  3170. </FormItem>
  3171. </div>
  3172. <div className="clearfix">
  3173. <FormItem
  3174. className="half-item"
  3175. labelCol={{ span: 6 }}
  3176. wrapperCol={{ span: 30 }}
  3177. label="职位"
  3178. >
  3179. {this.state.ModalData.jobsName}
  3180. </FormItem>
  3181. <FormItem
  3182. className="half-item"
  3183. labelCol={{ span: 6 }}
  3184. wrapperCol={{ span: 30 }}
  3185. label="岗位津贴"
  3186. >
  3187. {this.state.ModalData.allowance}
  3188. </FormItem>
  3189. </div>
  3190. <div className="clearfix">
  3191. <FormItem
  3192. className="half-item"
  3193. labelCol={{ span: 6 }}
  3194. wrapperCol={{ span: 30 }}
  3195. label="星级"
  3196. >
  3197. {this.state.ModalData.starName}
  3198. </FormItem>
  3199. </div>
  3200. </TabPane>
  3201. <TabPane tab="联系信息" key={2}>
  3202. <div className="title-peo">
  3203. <span>联系信息</span>
  3204. <Button
  3205. type="primary"
  3206. onClick={this.phoneModal}
  3207. style={{ position: "absolute", right: 0, height: 30 }}
  3208. >
  3209. 修改联系信息
  3210. </Button>
  3211. </div>
  3212. <div className="clearfix">
  3213. <FormItem
  3214. className="half-item"
  3215. labelCol={{ span: 6 }}
  3216. wrapperCol={{ span: 30 }}
  3217. label="手机号码"
  3218. >
  3219. {this.state.ModalData.mobile}
  3220. </FormItem>
  3221. <FormItem
  3222. className="half-item"
  3223. labelCol={{ span: 6 }}
  3224. wrapperCol={{ span: 30 }}
  3225. label="电话"
  3226. >
  3227. {this.state.ModalData.fixedTel}
  3228. </FormItem>
  3229. </div>
  3230. {this.state.ModalData.contactList &&
  3231. this.state.ModalData.contactList.length > 0 ? (
  3232. this.state.ModalData.contactList.map((item, index) => {
  3233. return (
  3234. <div className="clearfix">
  3235. <FormItem
  3236. className="half-item"
  3237. labelCol={{ span: 6 }}
  3238. wrapperCol={{ span: 30 }}
  3239. label={"紧急联系人" + (index + 1)}
  3240. >
  3241. {item.emergencyContact}
  3242. </FormItem>
  3243. <FormItem
  3244. className="half-item"
  3245. labelCol={{ span: 6 }}
  3246. wrapperCol={{ span: 30 }}
  3247. label={"紧急联系人" + (index + 1) + "电话"}
  3248. >
  3249. {item.emergencyMobile}
  3250. </FormItem>
  3251. </div>
  3252. );
  3253. })
  3254. ) : (
  3255. <div
  3256. style={{
  3257. textAlign: "center",
  3258. height: 60,
  3259. lineHeight: "60px",
  3260. }}
  3261. >
  3262. 暂无紧急联系人信息
  3263. </div>
  3264. )}
  3265. </TabPane>
  3266. <TabPane tab="入职资料" key={3}>
  3267. <div className="title-peo">
  3268. <span>入职资料</span>
  3269. <Button
  3270. type="primary"
  3271. onClick={this.entryModal}
  3272. style={{ position: "absolute", right: 0, height: 30 }}
  3273. >
  3274. 修改入职信息
  3275. </Button>
  3276. </div>
  3277. <div className="clearfix">
  3278. <FormItem
  3279. className="half-item"
  3280. labelCol={{ span: 6 }}
  3281. wrapperCol={{ span: 30 }}
  3282. label="毕业学校"
  3283. >
  3284. {this.state.ModalData.personnelEntry
  3285. ? this.state.ModalData.personnelEntry.school
  3286. : ""}
  3287. </FormItem>
  3288. <FormItem
  3289. className="half-item"
  3290. labelCol={{ span: 6 }}
  3291. wrapperCol={{ span: 30 }}
  3292. label="学历"
  3293. >
  3294. {this.state.ModalData.personnelEntry
  3295. ? this.educationStatus(
  3296. this.state.ModalData.personnelEntry.education
  3297. )
  3298. : ""}
  3299. </FormItem>
  3300. </div>
  3301. <div className="clearfix">
  3302. <FormItem
  3303. className="half-item"
  3304. labelCol={{ span: 6 }}
  3305. wrapperCol={{ span: 30 }}
  3306. label="所学专业"
  3307. >
  3308. {this.state.ModalData.personnelEntry
  3309. ? this.state.ModalData.personnelEntry.major
  3310. : ""}
  3311. </FormItem>
  3312. <FormItem
  3313. className="half-item"
  3314. labelCol={{ span: 6 }}
  3315. wrapperCol={{ span: 30 }}
  3316. label="职称"
  3317. >
  3318. {this.state.ModalData.personnelEntry
  3319. ? this.state.ModalData.personnelEntry.title
  3320. : ""}
  3321. </FormItem>
  3322. </div>
  3323. <div className="clearfix" style={{ paddingLeft: 70 }}>
  3324. <div style={{ marginBottom: 10 }}>附件:</div>
  3325. <PicModal
  3326. remarks={
  3327. this.state.ModalData.personnelEntry
  3328. ? this.picToArr(
  3329. this.state.ModalData.personnelEntry.annexName
  3330. )
  3331. : []
  3332. }
  3333. picUrl={
  3334. this.state.ModalData.personnelEntry
  3335. ? this.picToArr(
  3336. this.state.ModalData.personnelEntry.annexUrl
  3337. )
  3338. : []
  3339. }
  3340. />
  3341. </div>
  3342. </TabPane>
  3343. <TabPane tab="晋升情况" key={4}>
  3344. <div className="title-peo">
  3345. <span>晋升情况</span>
  3346. <Button
  3347. type="primary"
  3348. onClick={(e) => {
  3349. this.upgradeModal(true);
  3350. }}
  3351. style={{ position: "absolute", right: 0, height: 30 }}
  3352. >
  3353. 新增晋升信息
  3354. </Button>
  3355. </div>
  3356. {this.state.ModalData.promotionList &&
  3357. this.state.ModalData.promotionList.length > 0 ? (
  3358. this.state.ModalData.promotionList.map((item, index) => {
  3359. return (
  3360. <div
  3361. style={{
  3362. width: "100%",
  3363. borderBottom: "1px dashed #ccc",
  3364. position: "relative",
  3365. }}
  3366. >
  3367. <Button
  3368. style={{
  3369. position: "absolute",
  3370. right: "50%",
  3371. bottom: 10,
  3372. transform: "translateX(50%)",
  3373. }}
  3374. type="primary"
  3375. onClick={(e) => {
  3376. this.upgradeModal(false, index);
  3377. }}
  3378. >
  3379. 修改信息
  3380. </Button>
  3381. <div className="clearfix">
  3382. <FormItem
  3383. className="half-item"
  3384. labelCol={{ span: 6 }}
  3385. wrapperCol={{ span: 30 }}
  3386. label="晋升职位"
  3387. >
  3388. {item.oldJobsName + "--->" + item.newJobsName}
  3389. </FormItem>
  3390. <FormItem
  3391. className="half-item"
  3392. labelCol={{ span: 6 }}
  3393. wrapperCol={{ span: 30 }}
  3394. label="晋升等级"
  3395. >
  3396. {item.oldLvlName + "--->" + item.newLvlName}
  3397. </FormItem>
  3398. </div>
  3399. <div className="clearfix">
  3400. <FormItem
  3401. className="half-item"
  3402. labelCol={{ span: 6 }}
  3403. wrapperCol={{ span: 30 }}
  3404. label="晋升时间"
  3405. >
  3406. {item.promotionTimes}
  3407. </FormItem>
  3408. </div>
  3409. <div className="clearfix">
  3410. <FormItem
  3411. className="half-item"
  3412. labelCol={{ span: 6 }}
  3413. wrapperCol={{ span: 30 }}
  3414. label="晋升备注"
  3415. >
  3416. {item.promotionRemarks}
  3417. </FormItem>
  3418. </div>
  3419. <div
  3420. className="clearfix"
  3421. style={{ paddingLeft: 70, marginBottom: 40 }}
  3422. >
  3423. <div style={{ marginBottom: 10 }}>附件:</div>
  3424. <PicModal
  3425. remarks={this.picToArr(item.annexName)}
  3426. picUrl={this.picToArr(item.annexUrl)}
  3427. />
  3428. </div>
  3429. </div>
  3430. );
  3431. })
  3432. ) : (
  3433. <div
  3434. style={{
  3435. textAlign: "center",
  3436. height: 60,
  3437. lineHeight: "60px",
  3438. }}
  3439. >
  3440. 暂无晋升情况
  3441. </div>
  3442. )}
  3443. </TabPane>
  3444. <TabPane tab="合同情况" key={5}>
  3445. <div className="title-peo">
  3446. <span>合同情况</span>
  3447. <Button
  3448. type="primary"
  3449. onClick={(e) => {
  3450. this.contractModal(true);
  3451. }}
  3452. style={{ position: "absolute", right: 0, height: 30 }}
  3453. >
  3454. 新增合同信息
  3455. </Button>
  3456. </div>
  3457. {this.state.ModalData.contractList &&
  3458. this.state.ModalData.contractList.length > 0 ? (
  3459. this.state.ModalData.contractList.map((item, index) => {
  3460. return (
  3461. <div
  3462. style={{
  3463. width: "100%",
  3464. borderBottom: "1px dashed #ccc",
  3465. position: "relative",
  3466. }}
  3467. >
  3468. <Button
  3469. style={{
  3470. position: "absolute",
  3471. right: "50%",
  3472. bottom: 10,
  3473. transform: "translateX(50%)",
  3474. }}
  3475. type="primary"
  3476. onClick={(e) => {
  3477. this.contractModal(false, index);
  3478. }}
  3479. >
  3480. 修改信息
  3481. </Button>
  3482. <div className="clearfix">
  3483. <FormItem
  3484. className="half-item"
  3485. labelCol={{ span: 6 }}
  3486. wrapperCol={{ span: 30 }}
  3487. label="签订时间"
  3488. >
  3489. {item.startTimes}
  3490. </FormItem>
  3491. <FormItem
  3492. className="half-item"
  3493. labelCol={{ span: 6 }}
  3494. wrapperCol={{ span: 30 }}
  3495. label="到期时间"
  3496. >
  3497. {item.endTimes}
  3498. </FormItem>
  3499. </div>
  3500. <div className="clearfix">
  3501. <FormItem
  3502. style={{ width: "100%", wordBreak: "break-all" }}
  3503. className="half-item"
  3504. labelCol={{ span: 3 }}
  3505. wrapperCol={{ span: 30 }}
  3506. label="备注"
  3507. >
  3508. {item.contractRemarks}
  3509. </FormItem>
  3510. </div>
  3511. <div
  3512. className="clearfix"
  3513. style={{ paddingLeft: 70, marginBottom: 40 }}
  3514. >
  3515. <div style={{ marginBottom: 10 }}>附件:</div>
  3516. <PicModal
  3517. remarks={this.picToArr(item.annexName)}
  3518. picUrl={this.picToArr(item.annexUrl)}
  3519. />
  3520. </div>
  3521. </div>
  3522. );
  3523. })
  3524. ) : (
  3525. <div
  3526. style={{
  3527. textAlign: "center",
  3528. height: 60,
  3529. lineHeight: "60px",
  3530. }}
  3531. >
  3532. 暂无合同情况
  3533. </div>
  3534. )}
  3535. </TabPane>
  3536. <TabPane tab="奖惩情况" key={6}>
  3537. <div className="title-peo">
  3538. <span>奖惩情况</span>
  3539. <Button
  3540. type="primary"
  3541. onClick={(e) => {
  3542. this.chooseModal(true);
  3543. }}
  3544. style={{ position: "absolute", right: 0, height: 30 }}
  3545. >
  3546. 新增奖惩信息
  3547. </Button>
  3548. </div>
  3549. {this.state.ModalData.chooseList &&
  3550. this.state.ModalData.chooseList.length > 0 ? (
  3551. this.state.ModalData.chooseList.map((item, index) => {
  3552. return (
  3553. <div
  3554. style={{
  3555. width: "100%",
  3556. borderBottom: "1px dashed #ccc",
  3557. position: "relative",
  3558. }}
  3559. >
  3560. <Button
  3561. style={{
  3562. position: "absolute",
  3563. right: "50%",
  3564. bottom: 10,
  3565. transform: "translateX(50%)",
  3566. }}
  3567. type="primary"
  3568. onClick={(e) => {
  3569. this.chooseModal(false, index);
  3570. }}
  3571. >
  3572. 修改信息
  3573. </Button>
  3574. <div className="clearfix">
  3575. <FormItem
  3576. className="half-item"
  3577. labelCol={{ span: 6 }}
  3578. wrapperCol={{ span: 30 }}
  3579. label={"状态"}
  3580. >
  3581. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3582. </FormItem>
  3583. <FormItem
  3584. className="half-item"
  3585. labelCol={{ span: 6 }}
  3586. wrapperCol={{ span: 30 }}
  3587. label="时间"
  3588. >
  3589. {item.effectTimes}
  3590. </FormItem>
  3591. </div>
  3592. <div className="clearfix">
  3593. <FormItem
  3594. className="half-item"
  3595. labelCol={{ span: 6 }}
  3596. wrapperCol={{ span: 30 }}
  3597. label={"内容"}
  3598. >
  3599. {item.chooseRemarks}
  3600. </FormItem>
  3601. </div>
  3602. <div
  3603. className="clearfix"
  3604. style={{ paddingLeft: 70, marginBottom: 40 }}
  3605. >
  3606. <div style={{ marginBottom: 10 }}>附件:</div>
  3607. <PicModal
  3608. remarks={this.picToArr(item.annexName)}
  3609. picUrl={this.picToArr(item.annexUrl)}
  3610. />
  3611. </div>
  3612. </div>
  3613. );
  3614. })
  3615. ) : (
  3616. <div
  3617. style={{
  3618. textAlign: "center",
  3619. height: 60,
  3620. lineHeight: "60px",
  3621. }}
  3622. >
  3623. 暂无奖惩情况
  3624. </div>
  3625. )}
  3626. </TabPane>
  3627. <TabPane tab="离职情况" key={7}>
  3628. <div className="title-peo">
  3629. <span>离职情况</span>
  3630. <Button
  3631. type="primary"
  3632. onClick={(e) => {
  3633. this.quitModal(true);
  3634. }}
  3635. style={{ position: "absolute", right: 0, height: 30 }}
  3636. >
  3637. 新增离职信息
  3638. </Button>
  3639. </div>
  3640. {this.state.ModalData.quitList &&
  3641. this.state.ModalData.quitList.length > 0 ? (
  3642. this.state.ModalData.quitList.map((item, index) => {
  3643. return (
  3644. <div
  3645. style={{
  3646. width: "100%",
  3647. borderBottom: "1px dashed #ccc",
  3648. position: "relative",
  3649. }}
  3650. >
  3651. <Button
  3652. style={{
  3653. position: "absolute",
  3654. right: "50%",
  3655. bottom: 10,
  3656. transform: "translateX(50%)",
  3657. }}
  3658. type="primary"
  3659. onClick={(e) => {
  3660. this.quitModal(false, index);
  3661. }}
  3662. >
  3663. 修改信息
  3664. </Button>
  3665. <div className="clearfix">
  3666. <FormItem
  3667. className="half-item"
  3668. labelCol={{ span: 6 }}
  3669. wrapperCol={{ span: 30 }}
  3670. label="离职时间"
  3671. >
  3672. {item.effectTimes}
  3673. </FormItem>
  3674. <FormItem
  3675. className="half-item"
  3676. labelCol={{ span: 6 }}
  3677. wrapperCol={{ span: 30 }}
  3678. label="离职备注"
  3679. >
  3680. {item.quitRemarks}
  3681. </FormItem>
  3682. </div>
  3683. <div
  3684. className="clearfix"
  3685. style={{ paddingLeft: 70, marginBottom: 40 }}
  3686. >
  3687. <div style={{ marginBottom: 10 }}>附件:</div>
  3688. <PicModal
  3689. remarks={this.picToArr(item.annexName)}
  3690. picUrl={this.picToArr(item.annexUrl)}
  3691. />
  3692. </div>
  3693. </div>
  3694. );
  3695. })
  3696. ) : (
  3697. <div
  3698. style={{
  3699. textAlign: "center",
  3700. height: 60,
  3701. lineHeight: "60px",
  3702. }}
  3703. >
  3704. 暂无离职信息
  3705. </div>
  3706. )}
  3707. </TabPane>
  3708. <TabPane tab="福利情况" key={8}>
  3709. <div className="title-peo" style={{ marginBottom: 10 }}>
  3710. <span>福利情况</span>
  3711. <Button
  3712. type="primary"
  3713. onClick={(e) => {
  3714. this.welfareModal();
  3715. }}
  3716. style={{ position: "absolute", right: 0, height: 30 }}
  3717. >
  3718. 修改福利信息
  3719. </Button>
  3720. </div>
  3721. <Table
  3722. columns={this.state.welfareColumns}
  3723. dataSource={this.state.ModalData.welfareList}
  3724. pagination={false}
  3725. bordered
  3726. size="small"
  3727. scroll={{ x: "max-content", y: 0 }}
  3728. />
  3729. <div className="clearfix" style={{ marginTop: 10 }}>
  3730. <FormItem
  3731. className="half-item"
  3732. style={{ width: "100%", wordBreak: "break-all" }}
  3733. labelCol={{ span: 3 }}
  3734. wrapperCol={{ span: 30 }}
  3735. label="备注"
  3736. >
  3737. {this.state.ModalData.welfareRemarks}
  3738. </FormItem>
  3739. </div>
  3740. <div
  3741. className="clearfix"
  3742. style={{ paddingLeft: 70, marginBottom: 0 }}
  3743. >
  3744. <div style={{ marginBottom: 10 }}>附件:</div>
  3745. <PicModal
  3746. remarks={this.picToArr(
  3747. this.state.ModalData.welfareAnnexName
  3748. )}
  3749. picUrl={this.picToArr(
  3750. this.state.ModalData.welfareAnnexUrl
  3751. )}
  3752. />
  3753. </div>
  3754. </TabPane>
  3755. </Tabs>
  3756. )}
  3757. </Spin>
  3758. <Modal
  3759. visible={this.state.peoVisible}
  3760. onOk={this.checkOk}
  3761. footer={null}
  3762. width={800}
  3763. style={{ position: "relative", zIndex: 9999 }}
  3764. onCancel={() => {
  3765. this.loadData();
  3766. this.addPeoCancel();
  3767. }}
  3768. >
  3769. <Spin spinning={this.state.loading}>
  3770. <h2
  3771. style={{
  3772. textAlign: "center",
  3773. paddingBottom: 10,
  3774. marginBottom: 10,
  3775. }}
  3776. >
  3777. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  3778. </h2>
  3779. <div className="clearfix">
  3780. <FormItem
  3781. className="half-item"
  3782. {...formItemLayout}
  3783. label="员工编号"
  3784. >
  3785. <Input
  3786. placeholder="请输入员工编号"
  3787. style={{ width: 200 }}
  3788. value={this.state.employeeId}
  3789. onChange={(e) => {
  3790. this.setState({
  3791. employeeId: e.target.value,
  3792. });
  3793. }}
  3794. />
  3795. <Button
  3796. disabled={
  3797. this.state.employeeId || this.state.employeeId == 0
  3798. ? false
  3799. : true
  3800. }
  3801. style={{ position: "absolute" }}
  3802. type={"primary"}
  3803. onClick={this.verifyId}
  3804. >
  3805. 验证重复
  3806. </Button>
  3807. </FormItem>
  3808. <FormItem
  3809. className="half-item"
  3810. {...formItemLayout}
  3811. label="门禁编号"
  3812. >
  3813. <Input
  3814. style={{ width: 200 }}
  3815. placeholder="请输入门禁编号"
  3816. value={this.state.doorId}
  3817. onChange={(e) => {
  3818. this.setState({
  3819. doorId: e.target.value,
  3820. });
  3821. }}
  3822. />
  3823. <Button
  3824. disabled={
  3825. this.state.doorId || this.state.doorId == 0 ? false : true
  3826. }
  3827. style={{ position: "absolute" }}
  3828. type={"primary"}
  3829. onClick={this.verifyDoor}
  3830. >
  3831. 验证重复
  3832. </Button>
  3833. </FormItem>
  3834. </div>
  3835. <div className="clearfix">
  3836. <FormItem
  3837. className="half-item"
  3838. {...formItemLayout}
  3839. label="姓名"
  3840. >
  3841. <Input
  3842. placeholder="请输入姓名"
  3843. style={{ width: 200 }}
  3844. value={this.state.name}
  3845. onChange={(e) => {
  3846. this.setState({
  3847. name: e.target.value,
  3848. });
  3849. }}
  3850. />
  3851. </FormItem>
  3852. <FormItem
  3853. className="half-item"
  3854. {...formItemLayout}
  3855. label="出生日期"
  3856. >
  3857. <DatePicker
  3858. value={
  3859. this.state.birthdays ? moment(this.state.birthdays) : null
  3860. }
  3861. onChange={(e, t) => {
  3862. this.setState({
  3863. birthdays: t,
  3864. });
  3865. }}
  3866. />
  3867. </FormItem>
  3868. </div>
  3869. <div className="clearfix">
  3870. <FormItem
  3871. className="half-item"
  3872. {...formItemLayout}
  3873. label="性别"
  3874. >
  3875. <Radio.Group
  3876. onChange={(e) => {
  3877. this.setState({ sex: e.target.value });
  3878. }}
  3879. value={this.state.sex}
  3880. >
  3881. <Radio value={0}>男</Radio>
  3882. <Radio value={1}>女</Radio>
  3883. </Radio.Group>
  3884. </FormItem>
  3885. <FormItem
  3886. className="half-item"
  3887. {...formItemLayout}
  3888. label="民族"
  3889. >
  3890. <Input
  3891. placeholder="输入民族(例:汉族)"
  3892. style={{ width: 200 }}
  3893. value={this.state.nation}
  3894. onChange={(e) => {
  3895. this.setState({
  3896. nation: e.target.value,
  3897. });
  3898. }}
  3899. />
  3900. </FormItem>
  3901. </div>
  3902. <div className="clearfix">
  3903. <FormItem
  3904. className="half-item"
  3905. {...formItemLayout}
  3906. label="户籍地址"
  3907. >
  3908. <Cascader
  3909. options={this.state.Area}
  3910. value={this.state.residence}
  3911. placeholder="选择城市"
  3912. style={{ width: "200px" }}
  3913. onChange={(e, pre) => {
  3914. this.setState({ residence: e });
  3915. }}
  3916. />
  3917. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3918. </FormItem>
  3919. <FormItem
  3920. className="half-item"
  3921. {...formItemLayout}
  3922. label="户籍街道地址"
  3923. >
  3924. <Input
  3925. placeholder="输入街道地址"
  3926. style={{ width: 200 }}
  3927. value={this.state.residenceAddress}
  3928. onChange={(e) => {
  3929. this.setState({
  3930. residenceAddress: e.target.value,
  3931. });
  3932. }}
  3933. />
  3934. </FormItem>
  3935. </div>
  3936. <div className="clearfix">
  3937. <FormItem
  3938. className="half-item"
  3939. {...formItemLayout}
  3940. label="现住地址"
  3941. >
  3942. <Cascader
  3943. options={this.state.Area}
  3944. value={this.state.now}
  3945. placeholder="选择城市"
  3946. style={{ width: "200px" }}
  3947. onChange={(e, pre) => {
  3948. this.setState({ now: e });
  3949. }}
  3950. />
  3951. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3952. </FormItem>
  3953. <FormItem
  3954. className="half-item"
  3955. {...formItemLayout}
  3956. label="现住街道地址"
  3957. >
  3958. <Input
  3959. placeholder="输入街道地址"
  3960. style={{ width: 200 }}
  3961. value={this.state.nowAddress}
  3962. onChange={(e) => {
  3963. this.setState({
  3964. nowAddress: e.target.value,
  3965. });
  3966. }}
  3967. />
  3968. </FormItem>
  3969. </div>
  3970. <div className="clearfix">
  3971. <FormItem
  3972. className="half-item"
  3973. {...formItemLayout}
  3974. label="籍贯"
  3975. >
  3976. <Cascader
  3977. options={this.state.Birthplaces}
  3978. value={this.state.nativePlace}
  3979. placeholder="选择城市"
  3980. style={{ width: "200px" }}
  3981. onChange={(e, pre) => {
  3982. this.setState({ nativePlace: e });
  3983. }}
  3984. />
  3985. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3986. </FormItem>
  3987. <FormItem
  3988. className="half-item"
  3989. {...formItemLayout}
  3990. label="身份证"
  3991. >
  3992. <Input
  3993. placeholder="输入身份证信息"
  3994. style={{ width: 200 }}
  3995. value={this.state.idCard}
  3996. onChange={(e) => {
  3997. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  3998. this.setState({
  3999. idCard: e.target.value,
  4000. });
  4001. }}
  4002. />
  4003. </FormItem>
  4004. </div>
  4005. <div className="clearfix">
  4006. <FormItem
  4007. className="half-item"
  4008. {...formItemLayout}
  4009. label="身份证领证机关"
  4010. >
  4011. <Input
  4012. placeholder="输入机关名称"
  4013. style={{ width: 200 }}
  4014. value={this.state.certificationAuthority}
  4015. onChange={(e) => {
  4016. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4017. this.setState({
  4018. certificationAuthority: e.target.value,
  4019. });
  4020. }}
  4021. />
  4022. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4023. </FormItem>
  4024. <FormItem
  4025. className="half-item"
  4026. {...formItemLayout}
  4027. label="婚姻状态"
  4028. >
  4029. <Radio.Group
  4030. onChange={(e) => {
  4031. this.setState({ marriage: e.target.value });
  4032. }}
  4033. value={this.state.marriage}
  4034. >
  4035. <Radio value={0}>未婚</Radio>
  4036. <Radio value={1}>已婚</Radio>
  4037. <Radio value={2}>离异</Radio>
  4038. </Radio.Group>
  4039. </FormItem>
  4040. </div>
  4041. <div className="clearfix">
  4042. <FormItem
  4043. className="half-item"
  4044. labelCol={{ span: 6 }}
  4045. wrapperCol={{ span: 30 }}
  4046. label="子女数量"
  4047. >
  4048. <span>儿子:</span>
  4049. <Input
  4050. placeholder="输入数量"
  4051. style={{ width: 80 }}
  4052. type={"number"}
  4053. value={this.state.son}
  4054. onChange={(e) => {
  4055. this.setState({
  4056. son: e.target.value,
  4057. });
  4058. }}
  4059. />
  4060. <span style={{ marginLeft: 10 }}>女儿:</span>
  4061. <Input
  4062. placeholder="输入数量"
  4063. style={{ width: 80 }}
  4064. type={"number"}
  4065. value={this.state.girl}
  4066. onChange={(e) => {
  4067. this.setState({
  4068. girl: e.target.value,
  4069. });
  4070. }}
  4071. />
  4072. </FormItem>
  4073. <FormItem
  4074. className="half-item"
  4075. {...formItemLayout}
  4076. label="政治面貌"
  4077. >
  4078. <Select
  4079. placeholder="请选择政治面貌"
  4080. style={{ width: 200 }}
  4081. onChange={(e) => {
  4082. this.setState({ politicalOutlook: e });
  4083. }}
  4084. value={this.state.politicalOutlook}
  4085. >
  4086. <Option value={0}>群众</Option>
  4087. <Option value={1}>中共预备党员</Option>
  4088. <Option value={2}>中共党员</Option>
  4089. <Option value={3}>致公党党员</Option>
  4090. </Select>
  4091. </FormItem>
  4092. </div>
  4093. <Button
  4094. type="primary"
  4095. shape="round"
  4096. size="large"
  4097. style={{
  4098. position: "relative",
  4099. left: "50%",
  4100. transform: "translateX(-50%)",
  4101. }}
  4102. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4103. >
  4104. 保存
  4105. </Button>
  4106. </Spin>
  4107. </Modal>
  4108. </Modal>
  4109. <Modal
  4110. visible={this.state.peoVisible}
  4111. onOk={this.checkOk}
  4112. footer={null}
  4113. width={800}
  4114. style={{ position: "relative", zIndex: 9999 }}
  4115. onCancel={() => {
  4116. this.loadData();
  4117. this.addPeoCancel();
  4118. }}
  4119. >
  4120. <Spin spinning={this.state.loading}>
  4121. <h2
  4122. style={{
  4123. textAlign: "center",
  4124. paddingBottom: 10,
  4125. marginBottom: 10,
  4126. }}
  4127. >
  4128. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  4129. </h2>
  4130. <div className="clearfix">
  4131. <FormItem
  4132. className="half-item"
  4133. {...formItemLayout}
  4134. label="员工编号"
  4135. >
  4136. <Input
  4137. placeholder="请输入员工编号"
  4138. style={{ width: 200 }}
  4139. value={this.state.employeeId}
  4140. onChange={(e) => {
  4141. this.setState({
  4142. employeeId: e.target.value,
  4143. });
  4144. }}
  4145. />
  4146. <Button
  4147. disabled={
  4148. this.state.employeeId || this.state.employeeId == 0
  4149. ? false
  4150. : true
  4151. }
  4152. style={{ position: "absolute" }}
  4153. type={"primary"}
  4154. onClick={this.verifyId}
  4155. >
  4156. 验证重复
  4157. </Button>
  4158. </FormItem>
  4159. <FormItem
  4160. className="half-item"
  4161. {...formItemLayout}
  4162. label="门禁编号"
  4163. >
  4164. <Input
  4165. style={{ width: 200 }}
  4166. placeholder="请输入门禁编号"
  4167. value={this.state.doorId}
  4168. onChange={(e) => {
  4169. this.setState({
  4170. doorId: e.target.value,
  4171. });
  4172. }}
  4173. />
  4174. <Button
  4175. disabled={
  4176. this.state.doorId || this.state.doorId == 0 ? false : true
  4177. }
  4178. style={{ position: "absolute" }}
  4179. type={"primary"}
  4180. onClick={this.verifyDoor}
  4181. >
  4182. 验证重复
  4183. </Button>
  4184. </FormItem>
  4185. </div>
  4186. <div className="clearfix">
  4187. <FormItem className="half-item" {...formItemLayout} label="姓名">
  4188. <Input
  4189. placeholder="请输入姓名"
  4190. style={{ width: 200 }}
  4191. value={this.state.name}
  4192. onChange={(e) => {
  4193. this.setState({
  4194. name: e.target.value,
  4195. });
  4196. }}
  4197. />
  4198. </FormItem>
  4199. <FormItem
  4200. className="half-item"
  4201. {...formItemLayout}
  4202. label="出生日期"
  4203. >
  4204. <DatePicker
  4205. value={
  4206. this.state.birthdays ? moment(this.state.birthdays) : null
  4207. }
  4208. onChange={(e, t) => {
  4209. this.setState({
  4210. birthdays: t,
  4211. });
  4212. }}
  4213. />
  4214. </FormItem>
  4215. </div>
  4216. <div className="clearfix">
  4217. <FormItem className="half-item" {...formItemLayout} label="性别">
  4218. <Radio.Group
  4219. onChange={(e) => {
  4220. this.setState({ sex: e.target.value });
  4221. }}
  4222. value={this.state.sex}
  4223. >
  4224. <Radio value={0}>男</Radio>
  4225. <Radio value={1}>女</Radio>
  4226. </Radio.Group>
  4227. </FormItem>
  4228. <FormItem className="half-item" {...formItemLayout} label="民族">
  4229. <Input
  4230. placeholder="输入民族(例:汉族)"
  4231. style={{ width: 200 }}
  4232. value={this.state.nation}
  4233. onChange={(e) => {
  4234. this.setState({
  4235. nation: e.target.value,
  4236. });
  4237. }}
  4238. />
  4239. </FormItem>
  4240. </div>
  4241. <div className="clearfix">
  4242. <FormItem
  4243. className="half-item"
  4244. {...formItemLayout}
  4245. label="户籍地址"
  4246. >
  4247. <Cascader
  4248. options={this.state.Area}
  4249. value={this.state.residence}
  4250. placeholder="选择城市"
  4251. style={{ width: "200px" }}
  4252. onChange={(e, pre) => {
  4253. this.setState({ residence: e });
  4254. }}
  4255. />
  4256. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4257. </FormItem>
  4258. <FormItem
  4259. className="half-item"
  4260. {...formItemLayout}
  4261. label="户籍街道地址"
  4262. >
  4263. <Input
  4264. placeholder="输入街道地址"
  4265. style={{ width: 200 }}
  4266. value={this.state.residenceAddress}
  4267. onChange={(e) => {
  4268. this.setState({
  4269. residenceAddress: e.target.value,
  4270. });
  4271. }}
  4272. />
  4273. </FormItem>
  4274. </div>
  4275. <div className="clearfix">
  4276. <FormItem
  4277. className="half-item"
  4278. {...formItemLayout}
  4279. label="现住地址"
  4280. >
  4281. <Cascader
  4282. options={this.state.Area}
  4283. value={this.state.now}
  4284. placeholder="选择城市"
  4285. style={{ width: "200px" }}
  4286. onChange={(e, pre) => {
  4287. this.setState({ now: e });
  4288. }}
  4289. />
  4290. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4291. </FormItem>
  4292. <FormItem
  4293. className="half-item"
  4294. {...formItemLayout}
  4295. label="现住街道地址"
  4296. >
  4297. <Input
  4298. placeholder="输入街道地址"
  4299. style={{ width: 200 }}
  4300. value={this.state.nowAddress}
  4301. onChange={(e) => {
  4302. this.setState({
  4303. nowAddress: e.target.value,
  4304. });
  4305. }}
  4306. />
  4307. </FormItem>
  4308. </div>
  4309. <div className="clearfix">
  4310. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  4311. <Cascader
  4312. options={this.state.Birthplaces}
  4313. value={this.state.nativePlace}
  4314. placeholder="选择城市"
  4315. style={{ width: "200px" }}
  4316. onChange={(e, pre) => {
  4317. this.setState({ nativePlace: e });
  4318. }}
  4319. />
  4320. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4321. </FormItem>
  4322. <FormItem
  4323. className="half-item"
  4324. {...formItemLayout}
  4325. label="身份证"
  4326. >
  4327. <Input
  4328. placeholder="输入身份证信息"
  4329. style={{ width: 200 }}
  4330. value={this.state.idCard}
  4331. onChange={(e) => {
  4332. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4333. this.setState({
  4334. idCard: e.target.value,
  4335. });
  4336. }}
  4337. />
  4338. </FormItem>
  4339. </div>
  4340. <div className="clearfix">
  4341. <FormItem
  4342. className="half-item"
  4343. {...formItemLayout}
  4344. label="身份证领证机关"
  4345. >
  4346. <Input
  4347. placeholder="输入机关名称"
  4348. style={{ width: 200 }}
  4349. value={this.state.certificationAuthority}
  4350. onChange={(e) => {
  4351. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4352. this.setState({
  4353. certificationAuthority: e.target.value,
  4354. });
  4355. }}
  4356. />
  4357. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4358. </FormItem>
  4359. <FormItem
  4360. className="half-item"
  4361. {...formItemLayout}
  4362. label="婚姻状态"
  4363. >
  4364. <Radio.Group
  4365. onChange={(e) => {
  4366. this.setState({ marriage: e.target.value });
  4367. }}
  4368. value={this.state.marriage}
  4369. >
  4370. <Radio value={0}>未婚</Radio>
  4371. <Radio value={1}>已婚</Radio>
  4372. <Radio value={2}>离异</Radio>
  4373. </Radio.Group>
  4374. </FormItem>
  4375. </div>
  4376. <div className="clearfix">
  4377. <FormItem
  4378. className="half-item"
  4379. labelCol={{ span: 6 }}
  4380. wrapperCol={{ span: 30 }}
  4381. label="子女数量"
  4382. >
  4383. <span>儿子:</span>
  4384. <Input
  4385. placeholder="输入数量"
  4386. style={{ width: 80 }}
  4387. type={"number"}
  4388. value={this.state.son}
  4389. onChange={(e) => {
  4390. this.setState({
  4391. son: e.target.value,
  4392. });
  4393. }}
  4394. />
  4395. <span style={{ marginLeft: 10 }}>女儿:</span>
  4396. <Input
  4397. placeholder="输入数量"
  4398. style={{ width: 80 }}
  4399. type={"number"}
  4400. value={this.state.girl}
  4401. onChange={(e) => {
  4402. this.setState({
  4403. girl: e.target.value,
  4404. });
  4405. }}
  4406. />
  4407. </FormItem>
  4408. <FormItem
  4409. className="half-item"
  4410. {...formItemLayout}
  4411. label="政治面貌"
  4412. >
  4413. <Select
  4414. placeholder="请选择政治面貌"
  4415. style={{ width: 200 }}
  4416. onChange={(e) => {
  4417. this.setState({ politicalOutlook: e });
  4418. }}
  4419. value={this.state.politicalOutlook}
  4420. >
  4421. <Option value={0}>群众</Option>
  4422. <Option value={1}>中共预备党员</Option>
  4423. <Option value={2}>中共党员</Option>
  4424. <Option value={3}>致公党党员</Option>
  4425. </Select>
  4426. </FormItem>
  4427. </div>
  4428. <Button
  4429. type="primary"
  4430. shape="round"
  4431. size="large"
  4432. style={{
  4433. position: "relative",
  4434. left: "50%",
  4435. transform: "translateX(-50%)",
  4436. }}
  4437. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4438. >
  4439. 保存
  4440. </Button>
  4441. </Spin>
  4442. </Modal>
  4443. <Modal
  4444. visible={this.state.stayVisible}
  4445. footer={null}
  4446. width={800}
  4447. onCancel={() => {
  4448. this.loadData();
  4449. this.stayCancel();
  4450. }}
  4451. >
  4452. <Spin spinning={this.state.loading}>
  4453. <h3
  4454. style={{
  4455. textAlign: "center",
  4456. paddingBottom: 10,
  4457. marginBottom: 10,
  4458. }}
  4459. >
  4460. 任职信息
  4461. </h3>
  4462. <div className="clearfix">
  4463. <FormItem
  4464. className="half-item"
  4465. labelCol={{ span: 6 }}
  4466. wrapperCol={{ span: 30 }}
  4467. label="员工状态"
  4468. >
  4469. <Select
  4470. placeholder="请选择状态"
  4471. style={{ width: 200 }}
  4472. onChange={(e) => {
  4473. this.setState({ status: e });
  4474. }}
  4475. value={this.state.status}
  4476. >
  4477. <Option value="0">实习生</Option>
  4478. <Option value="1">在职(试用期)</Option>
  4479. <Option value="2">在职(合同期)</Option>
  4480. <Option value="3">兼职</Option>
  4481. <Option value="4">已离职</Option>
  4482. </Select>
  4483. </FormItem>
  4484. <FormItem
  4485. className="half-item"
  4486. {...formItemLayout}
  4487. label="所属系统"
  4488. >
  4489. <Select
  4490. placeholder="请选择所属系统"
  4491. style={{ width: 200 }}
  4492. onChange={(e) => {
  4493. this.setState({ system: e });
  4494. }}
  4495. value={this.state.system}
  4496. >
  4497. <Option value="0">管理系统</Option>
  4498. <Option value="1">营销系统</Option>
  4499. <Option value="2">技术系统</Option>
  4500. </Select>
  4501. </FormItem>
  4502. </div>
  4503. <div className="clearfix">
  4504. <FormItem
  4505. className="half-item"
  4506. labelCol={{ span: 6 }}
  4507. wrapperCol={{ span: 30 }}
  4508. label="工作性质"
  4509. >
  4510. <Radio.Group
  4511. onChange={(e) => {
  4512. this.setState({ jobNature: e.target.value });
  4513. }}
  4514. value={this.state.jobNature}
  4515. >
  4516. <Radio value="0">全职</Radio>
  4517. <Radio value="1">兼职</Radio>
  4518. <Radio value="2">其他</Radio>
  4519. </Radio.Group>
  4520. <Input
  4521. placeholder="输入性质"
  4522. style={{
  4523. width: 80,
  4524. display:
  4525. this.state.jobNature == 2 ? "inline-block" : "none",
  4526. }}
  4527. value={this.state.jobNatureRemarks}
  4528. onChange={(e) => {
  4529. this.setState({
  4530. jobNatureRemarks: e.target.value,
  4531. });
  4532. }}
  4533. />
  4534. </FormItem>
  4535. <FormItem className="half-item" {...formItemLayout} label="工龄">
  4536. <span>{this.state.ModalData.workingYear}</span>
  4537. </FormItem>
  4538. </div>
  4539. <div className="clearfix">
  4540. <FormItem
  4541. className="half-item"
  4542. {...formItemLayout}
  4543. label="入职时间"
  4544. >
  4545. <DatePicker
  4546. value={
  4547. this.state.entryTimes ? moment(this.state.entryTimes) : null
  4548. }
  4549. style={{ width: 200 }}
  4550. onChange={(e, t) => {
  4551. this.setState({
  4552. entryTimes: t,
  4553. });
  4554. }}
  4555. />
  4556. </FormItem>
  4557. <FormItem
  4558. className="half-item"
  4559. {...formItemLayout}
  4560. label="转正时间"
  4561. >
  4562. <DatePicker
  4563. value={
  4564. this.state.promotionTimes
  4565. ? moment(this.state.promotionTimes)
  4566. : null
  4567. }
  4568. style={{ width: 200 }}
  4569. onChange={(e, t) => {
  4570. this.setState({
  4571. promotionTimes: t,
  4572. });
  4573. }}
  4574. />
  4575. </FormItem>
  4576. </div>
  4577. <div className="clearfix">
  4578. <FormItem
  4579. className="half-item"
  4580. {...formItemLayout}
  4581. label="所属公司"
  4582. >
  4583. <Select
  4584. placeholder="选择公司"
  4585. style={{ width: 200, marginRight: 10 }}
  4586. value={this.state.company}
  4587. onChange={(e) => {
  4588. this.setState({ company: e });
  4589. }}
  4590. >
  4591. {departmentArr.map(function (item) {
  4592. return (
  4593. <Select.Option key={item.id}>{item.name}</Select.Option>
  4594. );
  4595. })}
  4596. </Select>
  4597. </FormItem>
  4598. <FormItem className="half-item" {...formItemLayout} label="级别">
  4599. <Select
  4600. placeholder="请选择所属级别"
  4601. style={{ width: 200 }}
  4602. onChange={(e) => {
  4603. this.setState({ lvl: e });
  4604. }}
  4605. value={this.state.lvl}
  4606. >
  4607. <Option value="0">员工</Option>
  4608. <Option value="1">主管</Option>
  4609. <Option value="2">经理</Option>
  4610. <Option value="3">总经理</Option>
  4611. <Option value="4">副总裁</Option>
  4612. <Option value="5">副总</Option>
  4613. <Option value="6">总监</Option>
  4614. <Option value="7">董事长</Option>
  4615. </Select>
  4616. </FormItem>
  4617. </div>
  4618. <div className="clearfix">
  4619. <FormItem className="half-item" {...formItemLayout} label="职位">
  4620. <Select
  4621. placeholder="选择职位"
  4622. style={{ width: 200, marginRight: 10 }}
  4623. value={this.state.jobs}
  4624. onChange={(e) => {
  4625. this.setState({ jobs: e, star: [] });
  4626. this.getList();
  4627. }}
  4628. >
  4629. <Option value="1">员工</Option>
  4630. <Option value="2">试用营销员</Option>
  4631. <Option value="3">试用营销储备经理</Option>
  4632. <Option value="4">营销经理</Option>
  4633. <Option value="5">总监合伙人</Option>
  4634. <Option value="6">技术助理</Option>
  4635. <Option value="7">咨询师</Option>
  4636. <Option value="8">咨询师主管</Option>
  4637. <Option value="9">咨询师经理</Option>
  4638. <Option value="10">高级经理</Option>
  4639. </Select>
  4640. </FormItem>
  4641. <FormItem className="half-item" {...formItemLayout} label="星级">
  4642. <Select
  4643. placeholder="请选择所属星级"
  4644. style={{ width: 200 }}
  4645. onChange={(e) => {
  4646. this.setState({ star: e });
  4647. }}
  4648. value={this.state.star}
  4649. >
  4650. {this.state.starArr
  4651. ? this.state.starArr.map((item, index) => {
  4652. return (
  4653. <Option value={item.star}>{item.starName}</Option>
  4654. );
  4655. })
  4656. : []}
  4657. </Select>
  4658. </FormItem>
  4659. </div>
  4660. <div className="clearfix">
  4661. <FormItem
  4662. className="half-item"
  4663. labelCol={{ span: 6 }}
  4664. wrapperCol={{ span: 30 }}
  4665. label="岗位津贴"
  4666. >
  4667. <Input
  4668. placeholder="输入金额"
  4669. style={{ width: 200 }}
  4670. value={this.state.allowance}
  4671. onChange={(e) => {
  4672. this.setState({
  4673. allowance: e.target.value,
  4674. });
  4675. }}
  4676. />
  4677. </FormItem>
  4678. </div>
  4679. <Button
  4680. type="primary"
  4681. shape="round"
  4682. size="large"
  4683. style={{
  4684. position: "relative",
  4685. left: "50%",
  4686. transform: "translateX(-50%)",
  4687. }}
  4688. onClick={this.editStay}
  4689. >
  4690. 保存
  4691. </Button>
  4692. </Spin>
  4693. </Modal>
  4694. <Modal
  4695. visible={this.state.phoneVisible}
  4696. footer={null}
  4697. width={800}
  4698. onCancel={() => {
  4699. this.loadData();
  4700. this.phoneCancel();
  4701. }}
  4702. >
  4703. <Spin spinning={this.state.loading}>
  4704. <h3
  4705. style={{
  4706. textAlign: "center",
  4707. paddingBottom: 10,
  4708. marginBottom: 10,
  4709. }}
  4710. >
  4711. 联系信息
  4712. </h3>
  4713. <div className="clearfix">
  4714. <FormItem
  4715. className="half-item"
  4716. labelCol={{ span: 6 }}
  4717. wrapperCol={{ span: 30 }}
  4718. label="手机号码"
  4719. >
  4720. <Input
  4721. placeholder="输入号码"
  4722. style={{ width: 200 }}
  4723. value={this.state.mobile}
  4724. onChange={(e) => {
  4725. this.setState({
  4726. mobile: e.target.value,
  4727. });
  4728. }}
  4729. />
  4730. </FormItem>
  4731. <FormItem
  4732. className="half-item"
  4733. labelCol={{ span: 6 }}
  4734. wrapperCol={{ span: 30 }}
  4735. label="办公室电话"
  4736. >
  4737. <Input
  4738. placeholder="输入电话"
  4739. style={{ width: 200 }}
  4740. value={this.state.fixedTel}
  4741. onChange={(e) => {
  4742. this.setState({
  4743. fixedTel: e.target.value,
  4744. });
  4745. }}
  4746. />
  4747. </FormItem>
  4748. </div>
  4749. <div className="clearfix">
  4750. <FormItem
  4751. className="half-item"
  4752. labelCol={{ span: 6 }}
  4753. wrapperCol={{ span: 30 }}
  4754. label="紧急联系人1"
  4755. >
  4756. <Input
  4757. placeholder="请输入名字"
  4758. style={{ width: 200 }}
  4759. value={
  4760. this.state.contactList.length
  4761. ? this.state.contactList[0].emergencyContact
  4762. : ""
  4763. }
  4764. onChange={(e) => {
  4765. this.state.contactList[0].emergencyContact = e.target.value;
  4766. let obj = this.state.contactList;
  4767. this.setState({
  4768. contactList: obj,
  4769. });
  4770. }}
  4771. />
  4772. </FormItem>
  4773. <FormItem
  4774. className="half-item"
  4775. labelCol={{ span: 6 }}
  4776. wrapperCol={{ span: 30 }}
  4777. label="紧急联系人电话"
  4778. >
  4779. <Input
  4780. placeholder="请输入电话"
  4781. style={{ width: 200 }}
  4782. value={
  4783. this.state.contactList.length
  4784. ? this.state.contactList[0].emergencyMobile
  4785. : ""
  4786. }
  4787. onChange={(e) => {
  4788. this.state.contactList[0].emergencyMobile = e.target.value;
  4789. let obj = this.state.contactList;
  4790. this.setState({
  4791. contactList: obj,
  4792. });
  4793. }}
  4794. />
  4795. </FormItem>
  4796. </div>
  4797. <div className="clearfix">
  4798. <FormItem
  4799. className="half-item"
  4800. labelCol={{ span: 6 }}
  4801. wrapperCol={{ span: 30 }}
  4802. label="紧急联系人2"
  4803. >
  4804. <Input
  4805. placeholder="请输入名字"
  4806. style={{ width: 200 }}
  4807. value={
  4808. this.state.contactList.length
  4809. ? this.state.contactList[1].emergencyContact
  4810. : ""
  4811. }
  4812. onChange={(e) => {
  4813. this.state.contactList[1].emergencyContact = e.target.value;
  4814. let obj = this.state.contactList;
  4815. this.setState({
  4816. contactList: obj,
  4817. });
  4818. }}
  4819. />
  4820. </FormItem>
  4821. <FormItem
  4822. className="half-item"
  4823. labelCol={{ span: 6 }}
  4824. wrapperCol={{ span: 30 }}
  4825. label="紧急联系人电话"
  4826. >
  4827. <Input
  4828. placeholder="请输入电话"
  4829. style={{ width: 200 }}
  4830. value={
  4831. this.state.contactList.length
  4832. ? this.state.contactList[1].emergencyMobile
  4833. : ""
  4834. }
  4835. onChange={(e) => {
  4836. this.state.contactList[1].emergencyMobile = e.target.value;
  4837. let obj = this.state.contactList;
  4838. this.setState({
  4839. contactList: obj,
  4840. });
  4841. }}
  4842. />
  4843. </FormItem>
  4844. </div>
  4845. <div className="clearfix">
  4846. <FormItem
  4847. className="half-item"
  4848. labelCol={{ span: 6 }}
  4849. wrapperCol={{ span: 30 }}
  4850. label="紧急联系人3"
  4851. >
  4852. <Input
  4853. placeholder="请输入名字"
  4854. style={{ width: 200 }}
  4855. value={
  4856. this.state.contactList.length
  4857. ? this.state.contactList[2].emergencyContact
  4858. : ""
  4859. }
  4860. onChange={(e) => {
  4861. this.state.contactList[2].emergencyContact = e.target.value;
  4862. let obj = this.state.contactList;
  4863. this.setState({
  4864. contactList: obj,
  4865. });
  4866. }}
  4867. />
  4868. </FormItem>
  4869. <FormItem
  4870. className="half-item"
  4871. labelCol={{ span: 6 }}
  4872. wrapperCol={{ span: 30 }}
  4873. label="紧急联系人电话"
  4874. >
  4875. <Input
  4876. placeholder="请输入电话"
  4877. style={{ width: 200 }}
  4878. value={
  4879. this.state.contactList.length
  4880. ? this.state.contactList[2].emergencyMobile
  4881. : ""
  4882. }
  4883. onChange={(e) => {
  4884. this.state.contactList[2].emergencyMobile = e.target.value;
  4885. let obj = this.state.contactList;
  4886. this.setState({
  4887. contactList: obj,
  4888. });
  4889. }}
  4890. />
  4891. </FormItem>
  4892. </div>
  4893. <Button
  4894. type="primary"
  4895. shape="round"
  4896. size="large"
  4897. style={{
  4898. position: "relative",
  4899. left: "50%",
  4900. transform: "translateX(-50%)",
  4901. }}
  4902. onClick={this.editPhone}
  4903. >
  4904. 保存
  4905. </Button>
  4906. </Spin>
  4907. </Modal>
  4908. <Modal
  4909. visible={this.state.entryVisible}
  4910. footer={null}
  4911. width={800}
  4912. onCancel={() => {
  4913. this.loadData();
  4914. this.entryCancel();
  4915. }}
  4916. >
  4917. <Spin spinning={this.state.loading}>
  4918. <h3
  4919. style={{
  4920. textAlign: "center",
  4921. paddingBottom: 10,
  4922. marginBottom: 10,
  4923. }}
  4924. >
  4925. 入职信息
  4926. </h3>
  4927. <div className="clearfix">
  4928. <FormItem
  4929. className="half-item"
  4930. labelCol={{ span: 6 }}
  4931. wrapperCol={{ span: 30 }}
  4932. label="毕业学校"
  4933. >
  4934. <Input
  4935. placeholder="输入学校名称"
  4936. style={{ width: 200 }}
  4937. value={this.state.school}
  4938. onChange={(e) => {
  4939. this.setState({
  4940. school: e.target.value,
  4941. });
  4942. }}
  4943. />
  4944. </FormItem>
  4945. <FormItem
  4946. className="half-item"
  4947. labelCol={{ span: 6 }}
  4948. wrapperCol={{ span: 30 }}
  4949. label="学历"
  4950. >
  4951. <Select
  4952. placeholder="请选择学历"
  4953. style={{ width: 200 }}
  4954. onChange={(e) => {
  4955. this.setState({ education: e });
  4956. }}
  4957. value={this.state.education}
  4958. >
  4959. <Option value="0">高中/中专</Option>
  4960. <Option value="1">专科/高职</Option>
  4961. <Option value="2">本科</Option>
  4962. <Option value="3">研究生</Option>
  4963. <Option value="5">博士</Option>
  4964. </Select>
  4965. </FormItem>
  4966. </div>
  4967. <div className="clearfix">
  4968. <FormItem
  4969. className="half-item"
  4970. labelCol={{ span: 6 }}
  4971. wrapperCol={{ span: 30 }}
  4972. label="所学专业"
  4973. >
  4974. <Input
  4975. placeholder="请输入专业名称"
  4976. style={{ width: 200 }}
  4977. value={this.state.major}
  4978. onChange={(e) => {
  4979. this.setState({
  4980. major: e.target.value,
  4981. });
  4982. }}
  4983. />
  4984. </FormItem>
  4985. <FormItem
  4986. className="half-item"
  4987. labelCol={{ span: 6 }}
  4988. wrapperCol={{ span: 30 }}
  4989. label="职称"
  4990. >
  4991. <Input
  4992. placeholder="请输入职称"
  4993. style={{ width: 200 }}
  4994. value={this.state.title}
  4995. onChange={(e) => {
  4996. this.setState({
  4997. title: e.target.value,
  4998. });
  4999. }}
  5000. />
  5001. </FormItem>
  5002. </div>
  5003. <div className="clearfix">
  5004. <FormItem
  5005. className="half-item"
  5006. labelCol={{ span: 6 }}
  5007. wrapperCol={{ span: 30 }}
  5008. label="备注"
  5009. >
  5010. <Input
  5011. placeholder="请输入备注"
  5012. style={{ width: 200 }}
  5013. value={this.state.entryRemarks}
  5014. onChange={(e) => {
  5015. this.setState({
  5016. entryRemarks: e.target.value,
  5017. });
  5018. }}
  5019. />
  5020. </FormItem>
  5021. </div>
  5022. <div
  5023. className="clearfix"
  5024. style={{ paddingLeft: 70, marginBottom: 10 }}
  5025. >
  5026. <div style={{ marginBottom: 10 }}>附件:</div>
  5027. <PicModal
  5028. remarks={this.picToArr(this.state.annexName)}
  5029. picUrl={this.picToArr(this.state.annexUrl)}
  5030. remove={this.ruzhiRemove}
  5031. />
  5032. <Button onClick={this.addPic}>添加附件</Button>
  5033. </div>
  5034. <Button
  5035. type="primary"
  5036. shape="round"
  5037. size="large"
  5038. style={{
  5039. position: "relative",
  5040. left: "50%",
  5041. transform: "translateX(-50%)",
  5042. }}
  5043. onClick={this.editRuzi}
  5044. >
  5045. 保存
  5046. </Button>
  5047. <AddPicModal
  5048. cancel={this.addPicModalCancel}
  5049. add={this.add()}
  5050. visible={this.state.addPicModal}
  5051. />
  5052. </Spin>
  5053. </Modal>
  5054. <Modal
  5055. visible={this.state.upgradeVisible}
  5056. footer={null}
  5057. width={800}
  5058. onCancel={() => {
  5059. this.loadData();
  5060. this.upgradeCancel();
  5061. }}
  5062. >
  5063. <Spin spinning={this.state.loading}>
  5064. <h3
  5065. style={{
  5066. textAlign: "center",
  5067. paddingBottom: 10,
  5068. marginBottom: 10,
  5069. }}
  5070. >
  5071. 晋升信息
  5072. </h3>
  5073. <div>
  5074. <div className="clearfix">
  5075. <FormItem
  5076. className="half-item"
  5077. labelCol={{ span: 6 }}
  5078. wrapperCol={{ span: 30 }}
  5079. label="当前职位"
  5080. >
  5081. <Select
  5082. placeholder="选择职位"
  5083. style={{ width: 200, marginRight: 10 }}
  5084. value={this.state.promotionList.oldJobs}
  5085. onChange={(e) => {
  5086. this.setState({ jobs: e, star: [] });
  5087. this.getList();
  5088. this.state.promotionList.oldJobs = e;
  5089. this.state.promotionList.oldLvl = [];
  5090. this.setState({
  5091. promotionList: this.state.promotionList,
  5092. });
  5093. }}
  5094. >
  5095. <Option value="1">员工</Option>
  5096. <Option value="2">试用营销员</Option>
  5097. <Option value="3">试用营销储备经理</Option>
  5098. <Option value="4">营销经理</Option>
  5099. <Option value="5">总监合伙人</Option>
  5100. <Option value="6">技术助理</Option>
  5101. <Option value="7">咨询师</Option>
  5102. <Option value="8">咨询师主管</Option>
  5103. <Option value="9">咨询师经理</Option>
  5104. <Option value="10">高级经理</Option>
  5105. </Select>
  5106. </FormItem>
  5107. <FormItem
  5108. className="half-item"
  5109. labelCol={{ span: 6 }}
  5110. wrapperCol={{ span: 30 }}
  5111. label="当前星级"
  5112. >
  5113. <Select
  5114. placeholder="请选择所属星级"
  5115. style={{ width: 200 }}
  5116. onChange={(e) => {
  5117. this.state.promotionList.oldLvl = e;
  5118. this.setState({
  5119. promotionList: this.state.promotionList,
  5120. });
  5121. }}
  5122. value={this.state.promotionList.oldLvl}
  5123. >
  5124. {this.state.starArr.map((item, index) => {
  5125. return <Option value={item.star}>{item.starName}</Option>;
  5126. })}
  5127. </Select>
  5128. </FormItem>
  5129. </div>
  5130. <div className="clearfix">
  5131. <FormItem
  5132. className="half-item"
  5133. labelCol={{ span: 6 }}
  5134. wrapperCol={{ span: 30 }}
  5135. label="晋升后职位"
  5136. >
  5137. <Select
  5138. placeholder="选择职位"
  5139. style={{ width: 200, marginRight: 10 }}
  5140. value={this.state.promotionList.newJobs}
  5141. onChange={(e) => {
  5142. this.setState({ jobss: e });
  5143. this.getLists();
  5144. this.state.promotionList.newJobs = e;
  5145. this.state.promotionList.newLvl = [];
  5146. this.setState({
  5147. promotionList: this.state.promotionList,
  5148. });
  5149. }}
  5150. >
  5151. <Option value="1">员工</Option>
  5152. <Option value="2">试用营销员</Option>
  5153. <Option value="3">试用营销储备经理</Option>
  5154. <Option value="4">营销经理</Option>
  5155. <Option value="5">总监合伙人</Option>
  5156. <Option value="6">技术助理</Option>
  5157. <Option value="7">咨询师</Option>
  5158. <Option value="8">咨询师主管</Option>
  5159. <Option value="9">咨询师经理</Option>
  5160. <Option value="10">高级经理</Option>
  5161. </Select>
  5162. </FormItem>
  5163. <FormItem
  5164. className="half-item"
  5165. labelCol={{ span: 6 }}
  5166. wrapperCol={{ span: 30 }}
  5167. label="晋升后星级"
  5168. >
  5169. <Select
  5170. placeholder="请选择所属星级"
  5171. style={{ width: 200 }}
  5172. onChange={(e) => {
  5173. this.state.promotionList.newLvl = e;
  5174. this.setState({
  5175. promotionList: this.state.promotionList,
  5176. });
  5177. }}
  5178. value={this.state.promotionList.newLvl}
  5179. >
  5180. {this.state.starArrs.map((item, index) => {
  5181. return <Option value={item.star}>{item.starName}</Option>;
  5182. })}
  5183. </Select>
  5184. </FormItem>
  5185. </div>
  5186. <div className="clearfix">
  5187. <FormItem
  5188. className="half-item"
  5189. labelCol={{ span: 6 }}
  5190. wrapperCol={{ span: 30 }}
  5191. label="晋升时间"
  5192. >
  5193. <DatePicker
  5194. value={
  5195. this.state.promotionList.promotionTimes
  5196. ? moment(this.state.promotionList.promotionTimes)
  5197. : null
  5198. }
  5199. style={{ width: 200 }}
  5200. onChange={(e, t) => {
  5201. this.state.promotionList.promotionTimes = t;
  5202. this.setState({
  5203. promotionList: this.state.promotionList,
  5204. });
  5205. }}
  5206. />
  5207. </FormItem>
  5208. </div>
  5209. <div className="clearfix">
  5210. <FormItem
  5211. className="half-item"
  5212. labelCol={{ span: 6 }}
  5213. wrapperCol={{ span: 30 }}
  5214. label="备注"
  5215. >
  5216. <Input
  5217. placeholder="请输入备注"
  5218. style={{ width: 200 }}
  5219. value={this.state.promotionList.promotionRemarks}
  5220. onChange={(e) => {
  5221. this.state.promotionList.promotionRemarks =
  5222. e.target.value;
  5223. this.setState({
  5224. promotionList: this.state.promotionList,
  5225. });
  5226. }}
  5227. />
  5228. </FormItem>
  5229. </div>
  5230. <div
  5231. className="clearfix"
  5232. style={{ paddingLeft: 70, marginBottom: 10 }}
  5233. >
  5234. <div style={{ marginBottom: 10 }}>附件:</div>
  5235. <PicModal
  5236. remarks={this.picToArr(this.state.promotionList.annexName)}
  5237. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  5238. remove={this.jinshengRemove}
  5239. />
  5240. <Button onClick={this.addPic}>添加附件</Button>
  5241. </div>
  5242. </div>
  5243. <Button
  5244. type="primary"
  5245. shape="round"
  5246. size="large"
  5247. style={{
  5248. position: "relative",
  5249. left: "50%",
  5250. transform: "translateX(-50%)",
  5251. }}
  5252. onClick={this.editUpgrade}
  5253. >
  5254. 保存
  5255. </Button>
  5256. <AddPicModal
  5257. cancel={this.addPicModalCancel}
  5258. add={this.add()}
  5259. visible={this.state.addPicModal}
  5260. />
  5261. </Spin>
  5262. </Modal>
  5263. <Modal
  5264. visible={this.state.contractVisible}
  5265. footer={null}
  5266. width={800}
  5267. onCancel={() => {
  5268. this.loadData();
  5269. this.contractCancel();
  5270. }}
  5271. >
  5272. <Spin spinning={this.state.loading}>
  5273. <h3
  5274. style={{
  5275. textAlign: "center",
  5276. paddingBottom: 10,
  5277. marginBottom: 10,
  5278. }}
  5279. >
  5280. 合同信息
  5281. </h3>
  5282. <div>
  5283. <div className="clearfix">
  5284. <FormItem
  5285. className="half-item"
  5286. labelCol={{ span: 6 }}
  5287. wrapperCol={{ span: 30 }}
  5288. label="签订时间"
  5289. >
  5290. <DatePicker
  5291. value={
  5292. this.state.contractList.startTimes
  5293. ? moment(this.state.contractList.startTimes)
  5294. : null
  5295. }
  5296. style={{ width: 200 }}
  5297. onChange={(e, t) => {
  5298. this.state.contractList.startTimes = t;
  5299. this.setState({
  5300. contractList: this.state.contractList,
  5301. });
  5302. }}
  5303. />
  5304. </FormItem>
  5305. <FormItem
  5306. className="half-item"
  5307. labelCol={{ span: 6 }}
  5308. wrapperCol={{ span: 30 }}
  5309. label="到期时间"
  5310. >
  5311. <DatePicker
  5312. disabledDate={(e) => {
  5313. let time = moment(e).valueOf();
  5314. let today = moment(
  5315. this.state.contractList.startTimes
  5316. ).valueOf();
  5317. if (time <= today) {
  5318. return true;
  5319. } else if (!this.state.contractList.startTimes) {
  5320. return true;
  5321. }
  5322. }}
  5323. value={
  5324. this.state.contractList.endTimes
  5325. ? moment(this.state.contractList.endTimes)
  5326. : null
  5327. }
  5328. style={{ width: 200 }}
  5329. onChange={(e, t) => {
  5330. this.state.contractList.endTimes = t;
  5331. this.setState({
  5332. contractList: this.state.contractList,
  5333. });
  5334. }}
  5335. />
  5336. </FormItem>
  5337. </div>
  5338. <div className="clearfix">
  5339. <FormItem
  5340. className="half-item"
  5341. labelCol={{ span: 6 }}
  5342. wrapperCol={{ span: 30 }}
  5343. label="备注"
  5344. >
  5345. <Input
  5346. placeholder="请输入备注"
  5347. style={{ width: 200 }}
  5348. value={this.state.contractList.contractRemarks}
  5349. onChange={(e) => {
  5350. this.state.contractList.contractRemarks = e.target.value;
  5351. this.setState({
  5352. contractList: this.state.contractList,
  5353. });
  5354. }}
  5355. />
  5356. </FormItem>
  5357. </div>
  5358. <div
  5359. className="clearfix"
  5360. style={{ paddingLeft: 70, marginBottom: 10 }}
  5361. >
  5362. <div style={{ marginBottom: 10 }}>附件:</div>
  5363. <PicModal
  5364. remarks={this.picToArr(this.state.contractList.annexName)}
  5365. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  5366. remove={this.contractRemove}
  5367. />
  5368. <Button onClick={this.addPic}>添加附件</Button>
  5369. </div>
  5370. </div>
  5371. <Button
  5372. type="primary"
  5373. shape="round"
  5374. size="large"
  5375. style={{
  5376. position: "relative",
  5377. left: "50%",
  5378. transform: "translateX(-50%)",
  5379. }}
  5380. onClick={this.editContract}
  5381. >
  5382. 保存
  5383. </Button>
  5384. <AddPicModal
  5385. cancel={this.addPicModalCancel}
  5386. add={this.add()}
  5387. visible={this.state.addPicModal}
  5388. />
  5389. </Spin>
  5390. </Modal>
  5391. <Modal
  5392. visible={this.state.chooseVisible}
  5393. footer={null}
  5394. width={800}
  5395. onCancel={() => {
  5396. this.loadData();
  5397. this.chooseCancel();
  5398. }}
  5399. >
  5400. <Spin spinning={this.state.loading}>
  5401. <h3
  5402. style={{
  5403. textAlign: "center",
  5404. paddingBottom: 10,
  5405. marginBottom: 10,
  5406. }}
  5407. >
  5408. 奖惩信息
  5409. </h3>
  5410. <div>
  5411. <div className="clearfix">
  5412. <FormItem
  5413. className="half-item"
  5414. labelCol={{ span: 6 }}
  5415. wrapperCol={{ span: 30 }}
  5416. label="类型"
  5417. >
  5418. <Radio.Group
  5419. onChange={(e) => {
  5420. this.state.chooseList.chooseStatus = e.target.value;
  5421. this.setState({ chooseList: this.state.chooseList });
  5422. }}
  5423. value={this.state.chooseList.chooseStatus}
  5424. >
  5425. <Radio value={0}>奖励</Radio>
  5426. <Radio value={1}>罚款</Radio>
  5427. </Radio.Group>
  5428. </FormItem>
  5429. <FormItem
  5430. className="half-item"
  5431. labelCol={{ span: 6 }}
  5432. wrapperCol={{ span: 30 }}
  5433. label="时间"
  5434. >
  5435. <DatePicker
  5436. value={
  5437. this.state.chooseList.effectTimes
  5438. ? moment(this.state.chooseList.effectTimes)
  5439. : null
  5440. }
  5441. style={{ width: 200 }}
  5442. onChange={(e, t) => {
  5443. this.state.chooseList.effectTimes = t;
  5444. this.setState({
  5445. chooseList: this.state.chooseList,
  5446. });
  5447. }}
  5448. />
  5449. </FormItem>
  5450. </div>
  5451. <div className="clearfix">
  5452. <FormItem
  5453. className="half-item"
  5454. labelCol={{ span: 6 }}
  5455. wrapperCol={{ span: 30 }}
  5456. label="内容"
  5457. >
  5458. <Input
  5459. placeholder="请输入内容"
  5460. style={{ width: 200 }}
  5461. value={this.state.chooseList.chooseRemarks}
  5462. onChange={(e) => {
  5463. this.state.chooseList.chooseRemarks = e.target.value;
  5464. this.setState({
  5465. chooseList: this.state.chooseList,
  5466. });
  5467. }}
  5468. />
  5469. </FormItem>
  5470. </div>
  5471. <div
  5472. className="clearfix"
  5473. style={{ paddingLeft: 70, marginBottom: 10 }}
  5474. >
  5475. <div style={{ marginBottom: 10 }}>附件:</div>
  5476. <PicModal
  5477. remarks={this.picToArr(this.state.chooseList.annexName)}
  5478. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  5479. remove={this.chooseRemove}
  5480. />
  5481. <Button onClick={this.addPic}>添加附件</Button>
  5482. </div>
  5483. </div>
  5484. <Button
  5485. type="primary"
  5486. shape="round"
  5487. size="large"
  5488. style={{
  5489. position: "relative",
  5490. left: "50%",
  5491. transform: "translateX(-50%)",
  5492. }}
  5493. onClick={this.editChoose}
  5494. >
  5495. 保存
  5496. </Button>
  5497. <AddPicModal
  5498. cancel={this.addPicModalCancel}
  5499. add={this.add()}
  5500. visible={this.state.addPicModal}
  5501. />
  5502. </Spin>
  5503. </Modal>
  5504. <Modal
  5505. visible={this.state.quitVisible}
  5506. footer={null}
  5507. width={800}
  5508. onCancel={() => {
  5509. this.loadData();
  5510. this.quitCancel();
  5511. }}
  5512. >
  5513. <Spin spinning={this.state.loading}>
  5514. <h3
  5515. style={{
  5516. textAlign: "center",
  5517. paddingBottom: 10,
  5518. marginBottom: 10,
  5519. }}
  5520. >
  5521. 离职信息
  5522. </h3>
  5523. <div>
  5524. <div className="clearfix">
  5525. <FormItem
  5526. className="half-item"
  5527. labelCol={{ span: 6 }}
  5528. wrapperCol={{ span: 30 }}
  5529. label="离职时间"
  5530. >
  5531. <DatePicker
  5532. value={
  5533. this.state.quitList.effectTimes
  5534. ? moment(this.state.quitList.effectTimes)
  5535. : null
  5536. }
  5537. style={{ width: 200 }}
  5538. onChange={(e, t) => {
  5539. this.state.quitList.effectTimes = t;
  5540. this.setState({
  5541. quitList: this.state.quitList,
  5542. });
  5543. }}
  5544. />
  5545. </FormItem>
  5546. </div>
  5547. <div className="clearfix">
  5548. <FormItem
  5549. className="half-item"
  5550. labelCol={{ span: 6 }}
  5551. wrapperCol={{ span: 30 }}
  5552. label="备注"
  5553. >
  5554. <Input
  5555. placeholder="请输入备注"
  5556. style={{ width: 200 }}
  5557. value={this.state.quitList.quitRemarks}
  5558. onChange={(e) => {
  5559. this.state.quitList.quitRemarks = e.target.value;
  5560. this.setState({
  5561. quitList: this.state.quitList,
  5562. });
  5563. }}
  5564. />
  5565. </FormItem>
  5566. </div>
  5567. <div
  5568. className="clearfix"
  5569. style={{ paddingLeft: 70, marginBottom: 10 }}
  5570. >
  5571. <div style={{ marginBottom: 10 }}>附件:</div>
  5572. <PicModal
  5573. remarks={this.picToArr(this.state.quitList.annexName)}
  5574. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  5575. remove={this.quitRemove}
  5576. />
  5577. <Button onClick={this.addPic}>添加附件</Button>
  5578. </div>
  5579. </div>
  5580. <Button
  5581. type="primary"
  5582. shape="round"
  5583. size="large"
  5584. style={{
  5585. position: "relative",
  5586. left: "50%",
  5587. transform: "translateX(-50%)",
  5588. }}
  5589. onClick={this.editQuit}
  5590. >
  5591. 保存
  5592. </Button>
  5593. <AddPicModal
  5594. cancel={this.addPicModalCancel}
  5595. add={this.add()}
  5596. visible={this.state.addPicModal}
  5597. />
  5598. </Spin>
  5599. </Modal>
  5600. <Modal
  5601. visible={this.state.welfareVisible}
  5602. footer={null}
  5603. width={800}
  5604. onCancel={() => {
  5605. this.loadData();
  5606. this.welfareCancel();
  5607. }}
  5608. >
  5609. <Spin spinning={this.state.loading}>
  5610. <h3
  5611. style={{
  5612. textAlign: "center",
  5613. paddingBottom: 10,
  5614. }}
  5615. >
  5616. 福利信息
  5617. </h3>
  5618. <Button
  5619. type="primary"
  5620. style={{ marginBottom: 5 }}
  5621. onClick={(e) => {
  5622. this.welfareTable();
  5623. }}
  5624. >
  5625. 新建信息
  5626. </Button>
  5627. <div>
  5628. <div className="clearfix" style={{ marginBottom: 10 }}>
  5629. <Table
  5630. columns={this.state.welfareColumnsEdit}
  5631. type="textarea"
  5632. dataSource={this.state.ModalData.welfareList}
  5633. pagination={false}
  5634. bordered
  5635. size="small"
  5636. scroll={{ x: "max-content", y: 0 }}
  5637. />
  5638. </div>
  5639. <div className="clearfix">
  5640. <FormItem
  5641. className="half-item"
  5642. labelCol={{ span: 6 }}
  5643. wrapperCol={{ span: 30 }}
  5644. label="备注"
  5645. >
  5646. <Input
  5647. placeholder="请输入备注"
  5648. style={{ width: 200 }}
  5649. value={this.state.ModalData.welfareRemarks}
  5650. onChange={(e) => {
  5651. this.state.ModalData.welfareRemarks = e.target.value;
  5652. this.setState({
  5653. ModalData: this.state.ModalData,
  5654. });
  5655. }}
  5656. />
  5657. </FormItem>
  5658. </div>
  5659. <div
  5660. className="clearfix"
  5661. style={{ paddingLeft: 70, marginBottom: 10 }}
  5662. >
  5663. <div style={{ marginBottom: 10 }}>附件:</div>
  5664. <PicModal
  5665. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  5666. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  5667. remove={this.welfareRemove}
  5668. />
  5669. <Button onClick={this.addPic}>添加附件</Button>
  5670. </div>
  5671. </div>
  5672. <Button
  5673. type="primary"
  5674. shape="round"
  5675. size="large"
  5676. style={{
  5677. position: "relative",
  5678. left: "50%",
  5679. transform: "translateX(-50%)",
  5680. }}
  5681. onClick={this.editWelfare}
  5682. >
  5683. 保存
  5684. </Button>
  5685. <AddPicModal
  5686. cancel={this.addPicModalCancel}
  5687. add={this.add()}
  5688. visible={this.state.addPicModal}
  5689. />
  5690. </Spin>
  5691. </Modal>
  5692. <Modal
  5693. visible={this.state.editWelfareVisible}
  5694. footer={null}
  5695. width={800}
  5696. onCancel={() => {
  5697. this.setState({
  5698. editWelfareVisible: false,
  5699. });
  5700. }}
  5701. >
  5702. <Spin spinning={this.state.loading}>
  5703. <div>
  5704. <div className="clearfix">
  5705. <FormItem
  5706. className="half-item"
  5707. labelCol={{ span: 6 }}
  5708. wrapperCol={{ span: 30 }}
  5709. label="福利类型"
  5710. >
  5711. <Select
  5712. placeholder="请选择类型"
  5713. value={this.state.editWelfareData.type}
  5714. onChange={(e) => {
  5715. this.state.editWelfareData.type = e;
  5716. this.setState({
  5717. editWelfareData: this.state.editWelfareData,
  5718. });
  5719. }}
  5720. style={{ width: 120, marginRight: 10 }}
  5721. >
  5722. <Option value={0}>社保</Option>
  5723. <Option value={1}>公积金</Option>
  5724. <Option value={2}>雇主险</Option>
  5725. </Select>
  5726. </FormItem>
  5727. <FormItem
  5728. className="half-item"
  5729. labelCol={{ span: 6 }}
  5730. wrapperCol={{ span: 30 }}
  5731. label="福利状态"
  5732. >
  5733. <Select
  5734. placeholder="请选择状态"
  5735. onChange={(e) => {
  5736. this.state.editWelfareData.status = e;
  5737. this.setState({
  5738. editWelfareData: this.state.editWelfareData,
  5739. });
  5740. }}
  5741. style={{ width: 120, marginRight: 10 }}
  5742. value={this.state.editWelfareData.status}
  5743. >
  5744. <Option value={0}>未购买</Option>
  5745. <Option value={1}>已购买</Option>
  5746. <Option value={2}>已停止</Option>
  5747. </Select>
  5748. </FormItem>
  5749. </div>
  5750. <div className="clearfix">
  5751. <FormItem
  5752. className="half-item"
  5753. labelCol={{ span: 6 }}
  5754. wrapperCol={{ span: 30 }}
  5755. style={{
  5756. display:
  5757. this.state.editWelfareData.status == 1 ? "block" : "none",
  5758. }}
  5759. label="购买时间"
  5760. >
  5761. <DatePicker
  5762. value={
  5763. this.state.editWelfareData.startTimes
  5764. ? moment(this.state.editWelfareData.startTimes)
  5765. : null
  5766. }
  5767. style={{ width: 200 }}
  5768. onChange={(e, t) => {
  5769. this.state.editWelfareData.startTimes = t;
  5770. this.setState({
  5771. editWelfareData: this.state.editWelfareData,
  5772. });
  5773. }}
  5774. />
  5775. </FormItem>
  5776. <FormItem
  5777. className="half-item"
  5778. labelCol={{ span: 6 }}
  5779. wrapperCol={{ span: 30 }}
  5780. style={{
  5781. display:
  5782. this.state.editWelfareData.status == 2 ? "block" : "none",
  5783. }}
  5784. label="停缴时间"
  5785. >
  5786. <DatePicker
  5787. value={
  5788. this.state.editWelfareData.endTimes
  5789. ? moment(this.state.editWelfareData.endTimes)
  5790. : null
  5791. }
  5792. style={{ width: 200 }}
  5793. onChange={(e, t) => {
  5794. this.state.editWelfareData.endTimes = t;
  5795. this.setState({
  5796. editWelfareData: this.state.editWelfareData,
  5797. });
  5798. }}
  5799. />
  5800. </FormItem>
  5801. </div>
  5802. <div className="clearfix">
  5803. <FormItem
  5804. className="half-item"
  5805. labelCol={{ span: 6 }}
  5806. wrapperCol={{ span: 30 }}
  5807. style={{
  5808. display:
  5809. this.state.editWelfareData.status == 1 ? "block" : "none",
  5810. }}
  5811. label="参保公司"
  5812. >
  5813. <Select
  5814. placeholder="选择公司"
  5815. style={{ width: 200, marginRight: 10 }}
  5816. value={
  5817. this.state.editWelfareData.depId
  5818. ? this.state.editWelfareData.depId
  5819. : undefined
  5820. }
  5821. onChange={(e) => {
  5822. this.state.editWelfareData.depId = e;
  5823. this.setState({
  5824. editWelfareData: this.state.editWelfareData,
  5825. });
  5826. }}
  5827. >
  5828. {departmentArr.map(function (item) {
  5829. return (
  5830. <Select.Option key={item.id}>{item.name}</Select.Option>
  5831. );
  5832. })}
  5833. </Select>
  5834. </FormItem>
  5835. </div>
  5836. <div className="clearfix">
  5837. <FormItem
  5838. className="half-item"
  5839. labelCol={{ span: 6 }}
  5840. wrapperCol={{ span: 30 }}
  5841. style={{
  5842. display:
  5843. this.state.editWelfareData.status == 0 ? "block" : "none",
  5844. }}
  5845. label="未购买备注"
  5846. >
  5847. <Input
  5848. placeholder="请输入备注信息"
  5849. style={{ width: 200 }}
  5850. value={this.state.editWelfareData.welfareRemarks}
  5851. onChange={(e) => {
  5852. this.state.editWelfareData.welfareRemarks =
  5853. e.target.value;
  5854. this.setState({
  5855. editWelfareData: this.state.editWelfareData,
  5856. });
  5857. }}
  5858. />
  5859. </FormItem>
  5860. </div>
  5861. </div>
  5862. <Button
  5863. type="primary"
  5864. shape="round"
  5865. size="large"
  5866. style={{
  5867. position: "relative",
  5868. left: "50%",
  5869. transform: "translateX(-50%)",
  5870. }}
  5871. onClick={this.editWelfareDataOk}
  5872. >
  5873. 保存
  5874. </Button>
  5875. </Spin>
  5876. </Modal>
  5877. </div>
  5878. );
  5879. },
  5880. });
  5881. export default PersonnelAll;