personnelAll.jsx 194 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901
  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: 9999999,
  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. employeeId: this.state.employeeId,
  999. },
  1000. success: function (data) {
  1001. let theArr = [];
  1002. if (data.error && data.error.length) {
  1003. message.warning(data.error[0].message);
  1004. } else {
  1005. message.success("修改成功!");
  1006. this.loadData();
  1007. this.tableRowClick(this.state.ModalData);
  1008. this.addPeoCancel();
  1009. }
  1010. }.bind(this),
  1011. }).always(
  1012. function () {
  1013. this.setState({
  1014. loading: false,
  1015. });
  1016. }.bind(this)
  1017. );
  1018. },
  1019. editPeo() {
  1020. this.state.residence[0] = this.state.ModalData.residenceProvince;
  1021. this.state.residence[1] = this.state.ModalData.residenceCity;
  1022. this.state.residence[2] = this.state.ModalData.residenceArea;
  1023. this.state.nativePlace[0] = this.state.ModalData.nativePlaceProvince;
  1024. this.state.nativePlace[1] = this.state.ModalData.nativePlaceCity;
  1025. this.state.now[0] = this.state.ModalData.nowProvince;
  1026. this.state.now[1] = this.state.ModalData.nowCity;
  1027. this.state.now[2] = this.state.ModalData.nowArea;
  1028. this.setState({
  1029. peoVisible: true,
  1030. isAddPeo: false,
  1031. id: this.state.ModalData.id,
  1032. doorId: this.state.ModalData.doorId,
  1033. name: this.state.ModalData.name,
  1034. birthdays: this.state.ModalData.birthdays,
  1035. sex: this.state.ModalData.sex,
  1036. nation: this.state.ModalData.nation,
  1037. residence: this.state.residence ? this.state.residence : [],
  1038. residenceAddress: this.state.ModalData.residenceAddress,
  1039. now: this.state.now ? this.state.now : [],
  1040. nowAddress: this.state.ModalData.nowAddress,
  1041. nativePlace: this.state.nativePlace ? this.state.nativePlace : [],
  1042. idCard: this.state.ModalData.idCard,
  1043. certificationAuthority: this.state.ModalData.certificationAuthority,
  1044. marriage: this.state.ModalData.marriage,
  1045. son: this.state.ModalData.son,
  1046. girl: this.state.ModalData.girl,
  1047. politicalOutlook: this.state.ModalData.politicalOutlook || this.state.ModalData.politicalOutlook == 0
  1048. ? this.state.ModalData.politicalOutlook
  1049. : undefined,
  1050. marriage: this.state.ModalData.marriage,
  1051. employeeId: this.state.ModalData.employeeId,
  1052. });
  1053. },
  1054. stayModal(id) {
  1055. this.setState({
  1056. stayVisible: true,
  1057. });
  1058. this.setState({
  1059. loading: true,
  1060. });
  1061. $.ajax({
  1062. method: "get",
  1063. dataType: "json",
  1064. crossDomain: false,
  1065. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1066. data: {
  1067. id: id,
  1068. },
  1069. success: function (data) {
  1070. let res = data.data;
  1071. let theArr = [];
  1072. if (data.error && data.error.length) {
  1073. message.warning(data.error[0].message);
  1074. } else {
  1075. this.setState({
  1076. id: res.id,
  1077. status: res.status + "",
  1078. system: res.system + "",
  1079. jobNature: res.jobNature,
  1080. jobNatureRemarks: res.jobNatureRemarks,
  1081. age: res.age,
  1082. entryTimes: res.entryTimes,
  1083. promotionTimes: res.promotionTimes,
  1084. company: res.company,
  1085. lvl: res.lvl ? res.lvl + "" : [],
  1086. jobs: res.jobs ? res.jobs + "" : [],
  1087. star: res.star ? res.star + "" : [],
  1088. allowance: res.allowance,
  1089. });
  1090. this.getList();
  1091. }
  1092. }.bind(this),
  1093. }).always(
  1094. function () {
  1095. this.setState({
  1096. loading: false,
  1097. });
  1098. }.bind(this)
  1099. );
  1100. },
  1101. stayCancel() {
  1102. this.setState({
  1103. stayVisible: false,
  1104. });
  1105. },
  1106. editStay() {
  1107. if (this.state.star == "" || this.state.star == undefined) {
  1108. message.warning("请选择星级");
  1109. return;
  1110. }
  1111. this.setState({
  1112. loading: true,
  1113. });
  1114. $.ajax({
  1115. method: "post",
  1116. dataType: "json",
  1117. crossDomain: false,
  1118. url: globalConfig.context + "/api/admin/personnel/update",
  1119. data: {
  1120. id: this.state.id,
  1121. status: this.state.status,
  1122. system: this.state.system,
  1123. jobNature: this.state.jobNature,
  1124. jobNatureRemarks: this.state.jobNatureRemarks,
  1125. entryTimes: this.state.entryTimes,
  1126. promotionTimes: this.state.promotionTimes,
  1127. company: this.state.company,
  1128. lvl: this.state.lvl,
  1129. jobs: this.state.jobs,
  1130. star: this.state.star,
  1131. allowance: this.state.allowance,
  1132. },
  1133. success: function (data) {
  1134. let res = data.data;
  1135. let theArr = [];
  1136. if (data.error && data.error.length) {
  1137. message.warning(data.error[0].message);
  1138. } else {
  1139. this.setState({
  1140. stayVisible: false,
  1141. });
  1142. this.tableRowClick(this.state.ModalData);
  1143. message.success("提交成功");
  1144. }
  1145. }.bind(this),
  1146. }).always(
  1147. function () {
  1148. this.setState({
  1149. loading: false,
  1150. });
  1151. }.bind(this)
  1152. );
  1153. },
  1154. phoneModal() {
  1155. let obj = [
  1156. {
  1157. id: undefined,
  1158. pdid: this.state.ModalData.id,
  1159. emergencyContact: "",
  1160. emergencyMobile: "",
  1161. },
  1162. {
  1163. id: undefined,
  1164. pdid: this.state.ModalData.id,
  1165. emergencyContact: "",
  1166. emergencyMobile: "",
  1167. },
  1168. {
  1169. id: undefined,
  1170. pdid: this.state.ModalData.id,
  1171. emergencyContact: "",
  1172. emergencyMobile: "",
  1173. },
  1174. ];
  1175. this.setState({
  1176. phoneVisible: true,
  1177. id: this.state.ModalData.id,
  1178. mobile: this.state.ModalData.mobile,
  1179. fixedTel: this.state.ModalData.fixedTel,
  1180. contactList: this.state.ModalData.contactList.length
  1181. ? JSON.parse(JSON.stringify(this.state.ModalData.contactList))
  1182. : obj,
  1183. });
  1184. },
  1185. phoneCancel() {
  1186. this.setState({
  1187. phoneVisible: false,
  1188. });
  1189. },
  1190. editPhone() {
  1191. this.setState({
  1192. loading: true,
  1193. });
  1194. $.ajax({
  1195. method: "post",
  1196. dataType: "json",
  1197. crossDomain: false,
  1198. url: globalConfig.context + "/api/admin/personnel/updateContact",
  1199. data: {
  1200. id: this.state.id,
  1201. mobile: this.state.mobile,
  1202. fixedTel: this.state.fixedTel,
  1203. contactList: JSON.stringify(this.state.contactList),
  1204. },
  1205. success: function (data) {
  1206. let theArr = [];
  1207. if (data.error && data.error.length) {
  1208. message.warning(data.error[0].message);
  1209. } else {
  1210. this.loadData();
  1211. this.phoneCancel();
  1212. this.tableRowClick(this.state.ModalData);
  1213. message.success("修改成功");
  1214. }
  1215. }.bind(this),
  1216. }).always(
  1217. function () {
  1218. this.setState({
  1219. loading: false,
  1220. });
  1221. }.bind(this)
  1222. );
  1223. },
  1224. entryModal() {
  1225. this.setState({
  1226. entryVisible: true,
  1227. });
  1228. this.setState({
  1229. loading: true,
  1230. });
  1231. $.ajax({
  1232. method: "get",
  1233. dataType: "json",
  1234. crossDomain: false,
  1235. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1236. data: {
  1237. id: this.state.ModalData.id,
  1238. },
  1239. success: function (data) {
  1240. let theArr = [];
  1241. if (data.error && data.error.length) {
  1242. message.warning(data.error[0].message);
  1243. } else {
  1244. this.setState({
  1245. id: data.data.personnelEntry ? data.data.personnelEntry.id : "",
  1246. school: data.data.personnelEntry
  1247. ? data.data.personnelEntry.school
  1248. : "",
  1249. education: data.data.personnelEntry
  1250. ? data.data.personnelEntry.education
  1251. : "",
  1252. major: data.data.personnelEntry
  1253. ? data.data.personnelEntry.major
  1254. : "",
  1255. title: data.data.personnelEntry
  1256. ? data.data.personnelEntry.title
  1257. : "",
  1258. entryRemarks: data.data.personnelEntry
  1259. ? data.data.personnelEntry.entryRemarks
  1260. : "",
  1261. annexUrl: data.data.personnelEntry
  1262. ? data.data.personnelEntry.annexUrl
  1263. ? data.data.personnelEntry.annexUrl
  1264. : ""
  1265. : "",
  1266. annexName: data.data.personnelEntry
  1267. ? data.data.personnelEntry.annexName
  1268. ? data.data.personnelEntry.annexName
  1269. : ""
  1270. : "",
  1271. });
  1272. // }
  1273. }
  1274. }.bind(this),
  1275. }).always(
  1276. function () {
  1277. this.setState({
  1278. loading: false,
  1279. });
  1280. }.bind(this)
  1281. );
  1282. },
  1283. entryCancel() {
  1284. this.tableRowClick(this.state.ModalData);
  1285. this.setState({
  1286. entryVisible: false,
  1287. });
  1288. },
  1289. cancel() {
  1290. this.setState({
  1291. visible: false,
  1292. detailFlag: false,
  1293. active: "1",
  1294. });
  1295. },
  1296. tableRowClick(record) {
  1297. this.setState({
  1298. visible: true,
  1299. id: record.id,
  1300. });
  1301. this.setState({
  1302. loading: true,
  1303. });
  1304. $.ajax({
  1305. method: "get",
  1306. dataType: "json",
  1307. crossDomain: false,
  1308. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1309. data: {
  1310. id: record.id,
  1311. },
  1312. success: function (data) {
  1313. let theArr = [];
  1314. if (data.error && data.error.length) {
  1315. message.warning(data.error[0].message);
  1316. } else {
  1317. this.setState({
  1318. ModalData: data.data,
  1319. });
  1320. }
  1321. }.bind(this),
  1322. }).always(
  1323. function () {
  1324. this.setState({
  1325. loading: false,
  1326. });
  1327. }.bind(this)
  1328. );
  1329. },
  1330. search() {
  1331. this.loadData();
  1332. },
  1333. addPic() {
  1334. this.setState({
  1335. addPicModal: true,
  1336. });
  1337. },
  1338. addPicModalCancel() {
  1339. this.setState({
  1340. addPicModal: false,
  1341. });
  1342. },
  1343. getVoucherUrl(e) {
  1344. this.setState({
  1345. voucherUrl: e,
  1346. });
  1347. },
  1348. add() {
  1349. if (this.state.entryVisible) {
  1350. return this.addRuzhi;
  1351. } else if (this.state.upgradeVisible) {
  1352. return this.addJinsheng;
  1353. } else if (this.state.contractVisible) {
  1354. return this.addContract;
  1355. } else if (this.state.chooseVisible) {
  1356. return this.addChoose;
  1357. } else if (this.state.quitVisible) {
  1358. return this.addQuit;
  1359. } else if (this.state.welfareVisible) {
  1360. return this.addWelfare;
  1361. }
  1362. },
  1363. addRuzhi(e, i) {
  1364. this.setState({
  1365. addPicModal: false,
  1366. });
  1367. if (this.state.annexUrl.length > 0) {
  1368. this.state.annexUrl += "," + e;
  1369. this.state.annexName += "," + i;
  1370. } else {
  1371. this.state.annexUrl += e;
  1372. this.state.annexName += i;
  1373. }
  1374. this.setState({
  1375. annexUrl: this.state.annexUrl,
  1376. annexName: this.state.annexName,
  1377. });
  1378. },
  1379. addJinsheng(e, i) {
  1380. this.setState({
  1381. addPicModal: false,
  1382. });
  1383. if (
  1384. this.state.promotionList.annexUrl &&
  1385. this.state.promotionList.annexUrl.length > 0
  1386. ) {
  1387. this.state.promotionList.annexUrl += "," + e;
  1388. this.state.promotionList.annexName += "," + i;
  1389. } else {
  1390. this.state.promotionList.annexUrl = e;
  1391. this.state.promotionList.annexName = i;
  1392. }
  1393. this.setState({
  1394. promotionList: this.state.promotionList,
  1395. });
  1396. },
  1397. addContract(e, i) {
  1398. this.setState({
  1399. addPicModal: false,
  1400. });
  1401. if (
  1402. this.state.contractList.annexUrl &&
  1403. this.state.contractList.annexUrl.length > 0
  1404. ) {
  1405. this.state.contractList.annexUrl += "," + e;
  1406. this.state.contractList.annexName += "," + i;
  1407. } else {
  1408. this.state.contractList.annexUrl = e;
  1409. this.state.contractList.annexName = i;
  1410. }
  1411. this.setState({
  1412. contractList: this.state.contractList,
  1413. });
  1414. },
  1415. addChoose(e, i) {
  1416. this.setState({
  1417. addPicModal: false,
  1418. });
  1419. if (
  1420. this.state.chooseList.annexUrl &&
  1421. this.state.chooseList.annexUrl.length > 0
  1422. ) {
  1423. this.state.chooseList.annexUrl += "," + e;
  1424. this.state.chooseList.annexName += "," + i;
  1425. } else {
  1426. this.state.chooseList.annexUrl = e;
  1427. this.state.chooseList.annexName = i;
  1428. }
  1429. this.setState({
  1430. chooseList: this.state.chooseList,
  1431. });
  1432. },
  1433. addQuit(e, i) {
  1434. this.setState({
  1435. addPicModal: false,
  1436. });
  1437. if (
  1438. this.state.quitList.annexUrl &&
  1439. this.state.quitList.annexUrl.length > 0
  1440. ) {
  1441. this.state.quitList.annexUrl += "," + e;
  1442. this.state.quitList.annexName += "," + i;
  1443. } else {
  1444. this.state.quitList.annexUrl = e;
  1445. this.state.quitList.annexName = i;
  1446. }
  1447. this.setState({
  1448. quitList: this.state.quitList,
  1449. });
  1450. },
  1451. addWelfare(e, i) {
  1452. this.setState({
  1453. addPicModal: false,
  1454. });
  1455. if (
  1456. this.state.ModalData.welfareAnnexUrl &&
  1457. this.state.ModalData.welfareAnnexUrl.length > 0
  1458. ) {
  1459. this.state.ModalData.welfareAnnexUrl += "," + e;
  1460. this.state.ModalData.welfareAnnexName += "," + i;
  1461. } else {
  1462. this.state.ModalData.welfareAnnexUrl = e;
  1463. this.state.ModalData.welfareAnnexName = i;
  1464. }
  1465. this.setState({
  1466. ModalData: this.state.ModalData,
  1467. });
  1468. },
  1469. reset() {
  1470. this.state.nameSearch = undefined;
  1471. this.state.statusSearch = undefined;
  1472. this.state.departmenttList = undefined;
  1473. this.state.sexSearch = undefined;
  1474. this.state.marriageSearch = undefined;
  1475. this.state.politicalOutlookSearch = undefined;
  1476. this.state.birthdayMonthSearch = undefined;
  1477. this.state.systemSearch = undefined;
  1478. this.state.workingYearsSearch = undefined;
  1479. this.state.educationSearch = undefined;
  1480. this.state.promotionTime = [];
  1481. this.state.entryTime = [];
  1482. this.state.quitTime = [];
  1483. this.state.contractTime = [];
  1484. this.loadData();
  1485. },
  1486. peoStatus(e) {
  1487. if (e == 0) {
  1488. return "在职(试用期)";
  1489. } else if (e == 1) {
  1490. return "在职(正式工)";
  1491. } else if (e == 2) {
  1492. return "离职";
  1493. }
  1494. },
  1495. jobStatus(e, i) {
  1496. if (e == 0) {
  1497. return "全职";
  1498. } else if (e == 1) {
  1499. return "兼职";
  1500. } else if (e == 2) {
  1501. return i;
  1502. }
  1503. },
  1504. educationStatus(e) {
  1505. if (e == 0) {
  1506. return "高中/中专";
  1507. } else if (e == 1) {
  1508. return "专科/高职";
  1509. } else if (e == 2) {
  1510. return "本科";
  1511. } else if (e == 3) {
  1512. return "研究生";
  1513. } else if (e == 5) {
  1514. return "博士";
  1515. }
  1516. },
  1517. picToArr(e) {
  1518. if (!e) return [];
  1519. let arr = e.split(",");
  1520. return arr;
  1521. },
  1522. ruzhiRemove(e) {
  1523. let url = e.file.response.data;
  1524. let arr = this.state.annexUrl.split(",");
  1525. let arrName = this.state.annexName.split(",");
  1526. let num = "";
  1527. arr.forEach((item, index) => {
  1528. if (item == url) {
  1529. arr.splice(index, 1);
  1530. num = index;
  1531. }
  1532. });
  1533. arrName.splice(num, 1);
  1534. this.setState({
  1535. annexUrl: arr.join(","),
  1536. annexName: arrName.join(","),
  1537. });
  1538. },
  1539. jinshengRemove(e) {
  1540. let url = e.file.response.data;
  1541. let arr = this.state.promotionList.annexUrl.split(",");
  1542. let arrName = this.state.promotionList.annexName.split(",");
  1543. let num = "";
  1544. arr.forEach((item, index) => {
  1545. if (item == url) {
  1546. arr.splice(index, 1);
  1547. num = index;
  1548. }
  1549. });
  1550. arrName.splice(num, 1);
  1551. this.state.promotionList.annexUrl = arr.join(",");
  1552. this.state.promotionList.annexName = arrName.join(",");
  1553. this.setState({
  1554. promotionList: this.state.promotionList,
  1555. });
  1556. },
  1557. contractRemove(e) {
  1558. let url = e.file.response.data;
  1559. let arr = this.state.contractList.annexUrl.split(",");
  1560. let arrName = this.state.contractList.annexName.split(",");
  1561. let num = "";
  1562. arr.forEach((item, index) => {
  1563. if (item == url) {
  1564. arr.splice(index, 1);
  1565. num = index;
  1566. }
  1567. });
  1568. arrName.splice(num, 1);
  1569. this.state.contractList.annexUrl = arr.join(",");
  1570. this.state.contractList.annexName = arrName.join(",");
  1571. this.setState({
  1572. contractList: this.state.contractList,
  1573. });
  1574. },
  1575. chooseRemove(e) {
  1576. let url = e.file.response.data;
  1577. let arr = this.state.chooseList.annexUrl.split(",");
  1578. let arrName = this.state.chooseList.annexName.split(",");
  1579. let num = "";
  1580. arr.forEach((item, index) => {
  1581. if (item == url) {
  1582. arr.splice(index, 1);
  1583. num = index;
  1584. }
  1585. });
  1586. arrName.splice(num, 1);
  1587. this.state.chooseList.annexUrl = arr.join(",");
  1588. this.state.chooseList.annexName = arrName.join(",");
  1589. this.setState({
  1590. chooseList: this.state.chooseList,
  1591. });
  1592. },
  1593. quitRemove(e) {
  1594. let url = e.file.response.data;
  1595. let arr = this.state.quitList.annexUrl.split(",");
  1596. let arrName = this.state.quitList.annexName.split(",");
  1597. let num = "";
  1598. arr.forEach((item, index) => {
  1599. if (item == url) {
  1600. arr.splice(index, 1);
  1601. num = index;
  1602. }
  1603. });
  1604. arrName.splice(num, 1);
  1605. this.state.quitList.annexUrl = arr.join(",");
  1606. this.state.quitList.annexName = arrName.join(",");
  1607. this.setState({
  1608. quitList: this.state.quitList,
  1609. });
  1610. },
  1611. welfareRemove(e) {
  1612. let url = e.file.response.data;
  1613. let arr = this.state.ModalData.welfareAnnexUrl.split(",");
  1614. let arrName = this.state.ModalData.welfareAnnexName.split(",");
  1615. let num = "";
  1616. arr.forEach((item, index) => {
  1617. if (item == url) {
  1618. arr.splice(index, 1);
  1619. num = index;
  1620. }
  1621. });
  1622. arrName.splice(num, 1);
  1623. this.state.ModalData.welfareAnnexUrl = arr.join(",");
  1624. this.state.ModalData.welfareAnnexName = arrName.join(",");
  1625. this.setState({
  1626. ModalData: this.state.ModalData,
  1627. });
  1628. },
  1629. getList(jobs) {
  1630. this.setState({
  1631. loading: true,
  1632. });
  1633. $.ajax({
  1634. method: "get",
  1635. dataType: "json",
  1636. crossDomain: false,
  1637. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1638. data: {},
  1639. success: function (data) {
  1640. let theArr = [];
  1641. if (data.error && data.error.length) {
  1642. message.warning(data.error[0].message);
  1643. } else {
  1644. let arr = data.data;
  1645. let starArr = [];
  1646. arr.forEach((item, index) => {
  1647. if(jobs && item.jobs == jobs) {
  1648. let obj = {
  1649. star: item.lvl + "",
  1650. starName: item.lvlName,
  1651. };
  1652. starArr.push(obj);
  1653. return
  1654. }else if (!jobs && item.jobs == this.state.jobs) {
  1655. let obj = {
  1656. star: item.lvl + "",
  1657. starName: item.lvlName,
  1658. };
  1659. starArr.push(obj);
  1660. }
  1661. });
  1662. this.setState({
  1663. starArr,
  1664. });
  1665. }
  1666. }.bind(this),
  1667. }).always(
  1668. function () {
  1669. this.setState({
  1670. loading: false,
  1671. });
  1672. }.bind(this)
  1673. );
  1674. },
  1675. getLists(jobs) {
  1676. this.setState({
  1677. loading: true,
  1678. });
  1679. $.ajax({
  1680. method: "get",
  1681. dataType: "json",
  1682. crossDomain: false,
  1683. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1684. data: {},
  1685. success: function (data) {
  1686. let theArr = [];
  1687. if (data.error && data.error.length) {
  1688. message.warning(data.error[0].message);
  1689. } else {
  1690. let arr = data.data;
  1691. let starArrs = [];
  1692. arr.forEach((item, index) => {
  1693. if (jobs && item.jobs == jobs) {
  1694. let obj = {
  1695. star: item.lvl + "",
  1696. starName: item.lvlName,
  1697. };
  1698. starArrs.push(obj);
  1699. return;
  1700. }
  1701. if (item.jobs == this.state.jobss) {
  1702. let obj = {
  1703. star: item.lvl + "",
  1704. starName: item.lvlName,
  1705. };
  1706. starArrs.push(obj);
  1707. }
  1708. });
  1709. this.setState({
  1710. starArrs,
  1711. });
  1712. }
  1713. }.bind(this),
  1714. }).always(
  1715. function () {
  1716. this.setState({
  1717. loading: false,
  1718. });
  1719. }.bind(this)
  1720. );
  1721. },
  1722. editRuzi() {
  1723. this.setState({
  1724. loading: true,
  1725. });
  1726. $.ajax({
  1727. method: "post",
  1728. dataType: "json",
  1729. crossDomain: false,
  1730. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  1731. data: {
  1732. id: this.state.ModalData.id,
  1733. school: this.state.school,
  1734. education: this.state.education,
  1735. major: this.state.major,
  1736. title: this.state.title,
  1737. entryRemarks: this.state.entryRemarks,
  1738. annexUrl: this.state.annexUrl,
  1739. annexName: this.state.annexName,
  1740. },
  1741. success: function (data) {
  1742. let theArr = [];
  1743. if (data.error && data.error.length) {
  1744. message.warning(data.error[0].message);
  1745. } else {
  1746. this.loadData();
  1747. this.entryCancel();
  1748. this.tableRowClick(this.state.ModalData);
  1749. message.success("修改成功");
  1750. }
  1751. }.bind(this),
  1752. }).always(
  1753. function () {
  1754. this.setState({
  1755. loading: false,
  1756. });
  1757. }.bind(this)
  1758. );
  1759. },
  1760. upgradeCancel() {
  1761. this.tableRowClick(this.state.ModalData);
  1762. this.setState({
  1763. upgradeVisible: false,
  1764. });
  1765. },
  1766. contractCancel() {
  1767. this.tableRowClick(this.state.ModalData);
  1768. this.setState({
  1769. contractVisible: false,
  1770. });
  1771. },
  1772. chooseCancel() {
  1773. this.tableRowClick(this.state.ModalData);
  1774. this.setState({
  1775. chooseVisible: false,
  1776. });
  1777. },
  1778. quitCancel() {
  1779. this.tableRowClick(this.state.ModalData);
  1780. this.setState({
  1781. quitVisible: false,
  1782. });
  1783. },
  1784. welfareCancel() {
  1785. this.tableRowClick(this.state.ModalData);
  1786. this.setState({
  1787. welfareVisible: false,
  1788. });
  1789. },
  1790. upgradeModal(flag, index) {
  1791. this.setState({
  1792. upgradeVisible: true,
  1793. });
  1794. let obj = {
  1795. id: undefined,
  1796. pdId: this.state.ModalData.id,
  1797. oldJobs: [],
  1798. oldLvl: [],
  1799. newJobs: [],
  1800. newLvl: [],
  1801. promotionTimes: undefined,
  1802. promotionRemarks: undefined,
  1803. annexUrl: "",
  1804. annexName: "",
  1805. };
  1806. this.setState({
  1807. promotionList: flag ? obj : this.state.ModalData.promotionList[index],
  1808. });
  1809. this.getList(flag ? undefined : this.state.ModalData.promotionList[index].oldJobs);
  1810. this.getLists(flag ? undefined : this.state.ModalData.promotionList[index].newJobs);
  1811. },
  1812. contractModal(flag, index) {
  1813. this.setState({
  1814. contractVisible: true,
  1815. });
  1816. let obj = {
  1817. id: undefined,
  1818. pdId: this.state.ModalData.id,
  1819. startTimes: undefined,
  1820. endTimes: undefined,
  1821. contractRemarks: undefined,
  1822. annexUrl: "",
  1823. annexName: "",
  1824. };
  1825. this.setState({
  1826. contractList: flag ? obj : this.state.ModalData.contractList[index],
  1827. });
  1828. },
  1829. chooseModal(flag, index) {
  1830. this.setState({
  1831. chooseVisible: true,
  1832. });
  1833. let obj = {
  1834. id: undefined,
  1835. pdId: this.state.ModalData.id,
  1836. chooseStatus: undefined,
  1837. effectTimes: undefined,
  1838. chooseRemarks: undefined,
  1839. annexUrl: "",
  1840. annexName: "",
  1841. };
  1842. this.setState({
  1843. chooseList: flag ? obj : this.state.ModalData.chooseList[index],
  1844. });
  1845. },
  1846. quitModal(flag, index) {
  1847. this.setState({
  1848. quitVisible: true,
  1849. });
  1850. let obj = {
  1851. id: undefined,
  1852. pdId: this.state.ModalData.id,
  1853. effectTimes: undefined,
  1854. quitRemarks: undefined,
  1855. annexUrl: "",
  1856. annexName: "",
  1857. };
  1858. this.setState({
  1859. quitList: flag ? obj : this.state.ModalData.quitList[index],
  1860. });
  1861. },
  1862. welfareModal() {
  1863. this.setState({
  1864. welfareVisible: true,
  1865. });
  1866. },
  1867. editUpgrade() {
  1868. if(!this.state.promotionList.oldLvl.length || !this.state.promotionList.newLvl.length) {
  1869. message.warning("请选择星级")
  1870. return
  1871. }
  1872. this.setState({
  1873. loading: true,
  1874. });
  1875. $.ajax({
  1876. method: "post",
  1877. dataType: "json",
  1878. crossDomain: false,
  1879. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1880. data: {
  1881. id: this.state.promotionList.id,
  1882. pdId: this.state.promotionList.pdId,
  1883. oldJobs: this.state.promotionList.oldJobs,
  1884. oldLvl: this.state.promotionList.oldLvl,
  1885. newJobs: this.state.promotionList.newJobs,
  1886. newLvl: this.state.promotionList.newLvl,
  1887. promotionTimes: this.state.promotionList.promotionTimes,
  1888. promotionRemarks: this.state.promotionList.promotionRemarks,
  1889. annexUrl: this.state.promotionList.annexUrl,
  1890. annexName: this.state.promotionList.annexName,
  1891. },
  1892. success: function (data) {
  1893. let theArr = [];
  1894. if (data.error && data.error.length) {
  1895. message.warning(data.error[0].message);
  1896. } else {
  1897. this.loadData();
  1898. this.upgradeCancel();
  1899. message.success("修改成功");
  1900. }
  1901. }.bind(this),
  1902. }).always(
  1903. function () {
  1904. this.setState({
  1905. loading: false,
  1906. });
  1907. }.bind(this)
  1908. );
  1909. },
  1910. editContract() {
  1911. this.setState({
  1912. loading: true,
  1913. });
  1914. $.ajax({
  1915. method: "post",
  1916. dataType: "json",
  1917. crossDomain: false,
  1918. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1919. data: {
  1920. id: this.state.contractList.id,
  1921. pdId: this.state.contractList.pdId,
  1922. startTimes: this.state.contractList.startTimes,
  1923. endTimes: this.state.contractList.endTimes,
  1924. contractRemarks: this.state.contractList.contractRemarks,
  1925. annexUrl: this.state.contractList.annexUrl,
  1926. annexName: this.state.contractList.annexName,
  1927. },
  1928. success: function (data) {
  1929. let theArr = [];
  1930. if (data.error && data.error.length) {
  1931. message.warning(data.error[0].message);
  1932. } else {
  1933. this.loadData();
  1934. this.contractCancel();
  1935. message.success("修改成功");
  1936. }
  1937. }.bind(this),
  1938. }).always(
  1939. function () {
  1940. this.setState({
  1941. loading: false,
  1942. });
  1943. }.bind(this)
  1944. );
  1945. },
  1946. editChoose() {
  1947. this.setState({
  1948. loading: true,
  1949. });
  1950. $.ajax({
  1951. method: "post",
  1952. dataType: "json",
  1953. crossDomain: false,
  1954. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1955. data: {
  1956. id: this.state.chooseList.id,
  1957. pdId: this.state.chooseList.pdId,
  1958. chooseStatus: this.state.chooseList.chooseStatus,
  1959. effectTimes: this.state.chooseList.effectTimes,
  1960. chooseRemarks: this.state.chooseList.chooseRemarks,
  1961. annexUrl: this.state.chooseList.annexUrl,
  1962. annexName: this.state.chooseList.annexName,
  1963. },
  1964. success: function (data) {
  1965. let theArr = [];
  1966. if (data.error && data.error.length) {
  1967. message.warning(data.error[0].message);
  1968. } else {
  1969. this.loadData();
  1970. this.chooseCancel();
  1971. message.success("修改成功");
  1972. }
  1973. }.bind(this),
  1974. }).always(
  1975. function () {
  1976. this.setState({
  1977. loading: false,
  1978. });
  1979. }.bind(this)
  1980. );
  1981. },
  1982. editQuit() {
  1983. this.setState({
  1984. loading: true,
  1985. });
  1986. $.ajax({
  1987. method: "post",
  1988. dataType: "json",
  1989. crossDomain: false,
  1990. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1991. data: {
  1992. id: this.state.quitList.id,
  1993. pdId: this.state.quitList.pdId,
  1994. effectTimes: this.state.quitList.effectTimes,
  1995. quitRemarks: this.state.quitList.quitRemarks,
  1996. annexUrl: this.state.quitList.annexUrl,
  1997. annexName: this.state.quitList.annexName,
  1998. },
  1999. success: function (data) {
  2000. let theArr = [];
  2001. if (data.error && data.error.length) {
  2002. message.warning(data.error[0].message);
  2003. } else {
  2004. this.loadData();
  2005. this.quitCancel();
  2006. message.success("修改成功");
  2007. }
  2008. }.bind(this),
  2009. }).always(
  2010. function () {
  2011. this.setState({
  2012. loading: false,
  2013. });
  2014. }.bind(this)
  2015. );
  2016. },
  2017. editWelfare() {
  2018. this.setState({
  2019. loading: true,
  2020. });
  2021. $.ajax({
  2022. method: "post",
  2023. dataType: "json",
  2024. crossDomain: false,
  2025. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  2026. data: {
  2027. pdId: this.state.ModalData.id,
  2028. annexUrl: this.state.ModalData.welfareAnnexUrl,
  2029. annexName: this.state.ModalData.welfareAnnexName,
  2030. remarks: this.state.ModalData.welfareRemarks,
  2031. },
  2032. success: function (data) {
  2033. let theArr = [];
  2034. if (data.error && data.error.length) {
  2035. message.warning(data.error[0].message);
  2036. } else {
  2037. this.loadData();
  2038. this.welfareCancel();
  2039. message.success("修改成功");
  2040. }
  2041. }.bind(this),
  2042. }).always(
  2043. function () {
  2044. this.setState({
  2045. loading: false,
  2046. });
  2047. }.bind(this)
  2048. );
  2049. },
  2050. render() {
  2051. const rowSelection = {
  2052. selectedRowKeys: this.state.selectedRowKeys,
  2053. onChange: (selectedRowKeys, selectedRows) => {
  2054. this.setState({
  2055. selectedRows: selectedRows.slice(-1),
  2056. selectedRowKeys: selectedRowKeys.slice(-1),
  2057. });
  2058. },
  2059. };
  2060. const { RangePicker } = DatePicker;
  2061. const formItemLayout = {
  2062. labelCol: { span: 6 },
  2063. wrapperCol: { span: 16 },
  2064. };
  2065. let departmentArr = this.state.departmentArr || [];
  2066. return (
  2067. <div className="user-content">
  2068. <div className="content-title" style={{ marginBottom: 10 }}>
  2069. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  2070. </div>
  2071. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2072. <TabPane tab="搜索" key="2">
  2073. <div className="user-search" style={{ marginLeft: 10 }}>
  2074. <Input
  2075. placeholder="姓名"
  2076. style={{ width: 120 }}
  2077. value={this.state.nameSearch}
  2078. onChange={(e) => {
  2079. this.setState({ nameSearch: e.target.value });
  2080. }}
  2081. />
  2082. <Select
  2083. placeholder="员工状态"
  2084. onChange={(e) => {
  2085. this.setState({ statusSearch: e });
  2086. }}
  2087. style={{ width: 120, marginRight: 10 }}
  2088. value={this.state.statusSearch}
  2089. >
  2090. <Option value="0">实习生</Option>
  2091. <Option value="1">在职(试用期)</Option>
  2092. <Option value="2">在职(合同期)</Option>
  2093. <Option value="3">兼职</Option>
  2094. <Option value="4">离职</Option>
  2095. </Select>
  2096. <Select
  2097. placeholder="所属公司"
  2098. style={{ width: 120, marginRight: 10 }}
  2099. value={this.state.departmenttList}
  2100. onChange={(e) => {
  2101. this.setState({ departmenttList: e });
  2102. }}
  2103. >
  2104. {departmentArr.map(function (item) {
  2105. return (
  2106. <Select.Option key={item.id}>{item.name}</Select.Option>
  2107. );
  2108. })}
  2109. </Select>
  2110. <Select
  2111. placeholder="性别"
  2112. onChange={(e) => {
  2113. this.setState({ sexSearch: e });
  2114. }}
  2115. style={{ width: 120, marginRight: 10 }}
  2116. value={this.state.sexSearch}
  2117. >
  2118. <Option value="0">男</Option>
  2119. <Option value="1">女</Option>
  2120. </Select>
  2121. <Select
  2122. placeholder="婚姻状态"
  2123. onChange={(e) => {
  2124. this.setState({ marriageSearch: e });
  2125. }}
  2126. style={{ width: 120, marginRight: 10 }}
  2127. value={this.state.marriageSearch}
  2128. >
  2129. <Option value="0">未婚</Option>
  2130. <Option value="1">已婚</Option>
  2131. <Option value="2">离异</Option>
  2132. </Select>
  2133. <Select
  2134. placeholder="政治面貌"
  2135. onChange={(e) => {
  2136. this.setState({ politicalOutlookSearch: e });
  2137. }}
  2138. style={{ width: 120, marginRight: 10 }}
  2139. value={this.state.politicalOutlookSearch}
  2140. >
  2141. <Option value="0">群众</Option>
  2142. <Option value="1">中共预备党员</Option>
  2143. <Option value="2">中共党员</Option>
  2144. <Option value="3">致公党员</Option>
  2145. </Select>
  2146. <Select
  2147. placeholder="生日月份"
  2148. onChange={(e) => {
  2149. this.setState({ birthdayMonthSearch: e });
  2150. }}
  2151. style={{ width: 120, marginRight: 10 }}
  2152. value={this.state.birthdayMonthSearch}
  2153. >
  2154. <Option value="">全部</Option>
  2155. <Option value="1">一月</Option>
  2156. <Option value="2">二月</Option>
  2157. <Option value="3">三月</Option>
  2158. <Option value="4">四月</Option>
  2159. <Option value="5">五月</Option>
  2160. <Option value="6">六月</Option>
  2161. <Option value="7">七月</Option>
  2162. <Option value="8">八月</Option>
  2163. <Option value="9">九月</Option>
  2164. <Option value="10">十月</Option>
  2165. <Option value="11">十一月</Option>
  2166. <Option value="12">十二月</Option>
  2167. </Select>
  2168. <Select
  2169. placeholder="所属系统"
  2170. onChange={(e) => {
  2171. this.setState({ systemSearch: e });
  2172. }}
  2173. style={{ width: 120, marginRight: 10 }}
  2174. value={this.state.systemSearch}
  2175. >
  2176. <Option value="0">管理系统</Option>
  2177. <Option value="1">营销系统</Option>
  2178. <Option value="2">技术系统</Option>
  2179. </Select>
  2180. <Select
  2181. placeholder="工作年限"
  2182. onChange={(e) => {
  2183. this.setState({ workingYearsSearch: e });
  2184. }}
  2185. style={{ width: 120, marginRight: 10 }}
  2186. value={this.state.workingYearsSearch}
  2187. >
  2188. <Option value="0">0-1年</Option>
  2189. <Option value="1">1-3年</Option>
  2190. <Option value="2">3-10年</Option>
  2191. <Option value="3">10年以上</Option>
  2192. </Select>
  2193. <Select
  2194. placeholder="学历"
  2195. onChange={(e) => {
  2196. this.setState({ educationSearch: e });
  2197. }}
  2198. style={{ width: 120 }}
  2199. value={this.state.educationSearch}
  2200. >
  2201. <Option value="0">高中/中专</Option>
  2202. <Option value="1">专科/高职</Option>
  2203. <Option value="2">本科</Option>
  2204. <Option value="3">研究生</Option>
  2205. <Option value="5">博士</Option>
  2206. </Select>
  2207. <br />
  2208. <span style={{}}>转正日期:</span>
  2209. <RangePicker
  2210. style={{ marginRight: 10, width: 170 }}
  2211. value={[
  2212. this.state.promotionTime[0]
  2213. ? moment(this.state.promotionTime[0])
  2214. : null,
  2215. this.state.promotionTime[1]
  2216. ? moment(this.state.promotionTime[1])
  2217. : null,
  2218. ]}
  2219. onChange={(data, dataString) => {
  2220. this.setState({ promotionTime: dataString });
  2221. }}
  2222. />
  2223. <span style={{}}>入职时间:</span>
  2224. <RangePicker
  2225. style={{ marginRight: 10, width: 170 }}
  2226. value={[
  2227. this.state.entryTime[0]
  2228. ? moment(this.state.entryTime[0])
  2229. : null,
  2230. this.state.entryTime[1]
  2231. ? moment(this.state.entryTime[1])
  2232. : null,
  2233. ]}
  2234. onChange={(data, dataString) => {
  2235. this.setState({ entryTime: dataString });
  2236. }}
  2237. />
  2238. <span style={{}}>离职时间:</span>
  2239. <RangePicker
  2240. style={{ marginRight: 10, width: 170 }}
  2241. value={[
  2242. this.state.quitTime[0]
  2243. ? moment(this.state.quitTime[0])
  2244. : null,
  2245. this.state.quitTime[1]
  2246. ? moment(this.state.quitTime[1])
  2247. : null,
  2248. ]}
  2249. onChange={(data, dataString) => {
  2250. this.setState({ quitTime: dataString });
  2251. }}
  2252. />
  2253. <span style={{}}>合同时间:</span>
  2254. <RangePicker
  2255. style={{ marginRight: 10, width: 170 }}
  2256. value={[
  2257. this.state.contractTime[0]
  2258. ? moment(this.state.contractTime[0])
  2259. : null,
  2260. this.state.contractTime[1]
  2261. ? moment(this.state.contractTime[1])
  2262. : null,
  2263. ]}
  2264. onChange={(data, dataString) => {
  2265. this.setState({ contractTime: dataString });
  2266. }}
  2267. />
  2268. <Button
  2269. type="primary"
  2270. onClick={this.search}
  2271. style={{ marginLeft: 10 }}
  2272. >
  2273. 搜索
  2274. </Button>
  2275. <Button onClick={this.reset}>重置</Button>
  2276. </div>
  2277. </TabPane>
  2278. <TabPane tab="新增员工档案" key="3">
  2279. <Button
  2280. type="primary"
  2281. onClick={this.addPeo}
  2282. style={{ margin: "11px 0px 10px 10px" }}
  2283. >
  2284. 新增员工档案
  2285. </Button>
  2286. </TabPane>
  2287. <TabPane tab="导出Excel" key="4">
  2288. <Button
  2289. type="primary"
  2290. onClick={this.export}
  2291. style={{ margin: "11px 0px 10px 10px" }}
  2292. >
  2293. 导出当前列表
  2294. </Button>
  2295. </TabPane>
  2296. <TabPane tab="更改表格显示数据" key="1">
  2297. <div style={{ marginLeft: 10 }}>
  2298. <ChooseList
  2299. columns={this.state.columns}
  2300. changeFn={this.changeList}
  2301. changeList={this.state.changeList}
  2302. top={55}
  2303. margin={11}
  2304. />
  2305. </div>
  2306. </TabPane>
  2307. </Tabs>
  2308. <div className="patent-table" style={{ marginTop: 10 }}>
  2309. <Spin spinning={this.state.loading}>
  2310. <Table
  2311. bordered
  2312. columns={
  2313. this.state.changeList == undefined
  2314. ? this.state.columns
  2315. : this.state.changeList
  2316. }
  2317. onRowClick={this.tableRowClick}
  2318. dataSource={this.state.dataSource}
  2319. scroll={{ x: "max-content", y: 0 }}
  2320. pagination={this.state.pagination}
  2321. size="small"
  2322. />
  2323. </Spin>
  2324. </div>
  2325. <Modal
  2326. maskClosable={false}
  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. position:'absolute',
  2342. right: '20px',
  2343. top: '63px',
  2344. zIndex: 1,
  2345. display: this.state.detailFlag ? "block" : "none"
  2346. }}
  2347. >
  2348. 打印
  2349. </Button>
  2350. )}
  2351. content={() => this.refs}
  2352. />
  2353. <Spin
  2354. spinning={this.state.loading}
  2355. ref={(e) => {
  2356. this.refs = e;
  2357. }}
  2358. >
  2359. <h2
  2360. style={{
  2361. textAlign: "center",
  2362. paddingBottom: 10,
  2363. marginBottom: 10,
  2364. }}
  2365. >
  2366. {this.state.ModalData.name + "人事档案"}
  2367. </h2>
  2368. <Button
  2369. type="primary"
  2370. style={{ marginBottom: 15}}
  2371. onClick={(e) => {
  2372. this.setState({ detailFlag: !this.state.detailFlag });
  2373. }}
  2374. >
  2375. {this.state.detailFlag ? "切换编辑模式" : "切换查看模式"}
  2376. </Button>
  2377. <ul onClick={this.editPeo} className="peo-table">
  2378. {this.state.table.map((item) => {
  2379. let value = item.value;
  2380. if (item.render) {
  2381. let fn = item.render;
  2382. return (
  2383. <li>
  2384. <div className="peo-left">{item.key}</div>
  2385. <Tooltip
  2386. placement="top"
  2387. title={fn(
  2388. this.state.ModalData[value],
  2389. value == "son" ? this.state.ModalData.girl : 0
  2390. )}
  2391. >
  2392. <div className="peo-right">
  2393. {fn(
  2394. this.state.ModalData[value],
  2395. value == "son" ? this.state.ModalData.girl : 0
  2396. )}
  2397. </div>
  2398. </Tooltip>
  2399. </li>
  2400. );
  2401. }
  2402. return (
  2403. <li>
  2404. <div className="peo-left">{item.key}</div>
  2405. <Tooltip
  2406. placement="top"
  2407. title={this.state.ModalData[item.value]}
  2408. >
  2409. <div className="peo-right">
  2410. {this.state.ModalData[value] &&
  2411. this.state.ModalData[value].length > 10
  2412. ? this.state.ModalData[value].substring(0, 10) + "..."
  2413. : this.state.ModalData[value]}
  2414. </div>
  2415. </Tooltip>
  2416. </li>
  2417. );
  2418. })}
  2419. </ul>
  2420. {this.state.detailFlag ? (
  2421. <div>
  2422. <div className="title-peo">
  2423. <span>任职信息</span>
  2424. {/* <Button
  2425. type="primary"
  2426. onClick={(e) => {
  2427. this.stayModal(this.state.ModalData.id);
  2428. }}
  2429. style={{ position: "absolute", right: 0, height: 30 }}
  2430. >
  2431. 修改任职信息
  2432. </Button> */}
  2433. </div>
  2434. <div className="clearfix">
  2435. <FormItem
  2436. className="half-item"
  2437. labelCol={{ span: 6 }}
  2438. wrapperCol={{ span: 30 }}
  2439. label="员工状态"
  2440. >
  2441. {this.state.ModalData.statusName}
  2442. </FormItem>
  2443. <FormItem
  2444. className="half-item"
  2445. labelCol={{ span: 6 }}
  2446. wrapperCol={{ span: 30 }}
  2447. label="所属系统"
  2448. >
  2449. {this.state.ModalData.systemName}
  2450. </FormItem>
  2451. </div>
  2452. <div className="clearfix">
  2453. <FormItem
  2454. className="half-item"
  2455. labelCol={{ span: 6 }}
  2456. wrapperCol={{ span: 30 }}
  2457. label="工作性质"
  2458. >
  2459. {this.jobStatus(
  2460. this.state.ModalData.jobNature,
  2461. this.state.ModalData.jobNatureRemarks
  2462. )}
  2463. </FormItem>
  2464. <FormItem
  2465. className="half-item"
  2466. labelCol={{ span: 6 }}
  2467. wrapperCol={{ span: 30 }}
  2468. label="工龄"
  2469. >
  2470. {this.state.ModalData.workingYear}
  2471. </FormItem>
  2472. </div>
  2473. <div className="clearfix">
  2474. <FormItem
  2475. className="half-item"
  2476. labelCol={{ span: 6 }}
  2477. wrapperCol={{ span: 30 }}
  2478. label="入职时间"
  2479. >
  2480. {this.state.ModalData.entryTimes}
  2481. </FormItem>
  2482. <FormItem
  2483. className="half-item"
  2484. labelCol={{ span: 6 }}
  2485. wrapperCol={{ span: 30 }}
  2486. label="转正时间"
  2487. >
  2488. {this.state.ModalData.promotionTimes}
  2489. </FormItem>
  2490. </div>
  2491. <div className="clearfix">
  2492. <FormItem
  2493. className="half-item"
  2494. labelCol={{ span: 6 }}
  2495. wrapperCol={{ span: 30 }}
  2496. label="所属公司"
  2497. >
  2498. {this.state.ModalData.depName}
  2499. </FormItem>
  2500. <FormItem
  2501. className="half-item"
  2502. labelCol={{ span: 6 }}
  2503. wrapperCol={{ span: 30 }}
  2504. label="级别"
  2505. >
  2506. {this.state.ModalData.lvlName}
  2507. </FormItem>
  2508. </div>
  2509. <div className="clearfix">
  2510. <FormItem
  2511. className="half-item"
  2512. labelCol={{ span: 6 }}
  2513. wrapperCol={{ span: 30 }}
  2514. label="职位"
  2515. >
  2516. {this.state.ModalData.jobsName}
  2517. </FormItem>
  2518. <FormItem
  2519. className="half-item"
  2520. labelCol={{ span: 6 }}
  2521. wrapperCol={{ span: 30 }}
  2522. label="岗位津贴"
  2523. >
  2524. {this.state.ModalData.allowance}
  2525. </FormItem>
  2526. </div>
  2527. <div className="clearfix">
  2528. <FormItem
  2529. className="half-item"
  2530. labelCol={{ span: 6 }}
  2531. wrapperCol={{ span: 30 }}
  2532. label="星级"
  2533. >
  2534. {this.state.ModalData.starName}
  2535. </FormItem>
  2536. </div>
  2537. <div className="title-peo">
  2538. <span>联系信息</span>
  2539. {/* <Button
  2540. type="primary"
  2541. onClick={this.phoneModal}
  2542. style={{ position: "absolute", right: 0, height: 30 }}
  2543. >
  2544. 修改联系信息
  2545. </Button> */}
  2546. </div>
  2547. <div className="clearfix">
  2548. <FormItem
  2549. className="half-item"
  2550. labelCol={{ span: 6 }}
  2551. wrapperCol={{ span: 30 }}
  2552. label="手机号码"
  2553. >
  2554. {this.state.ModalData.mobile}
  2555. </FormItem>
  2556. <FormItem
  2557. className="half-item"
  2558. labelCol={{ span: 6 }}
  2559. wrapperCol={{ span: 30 }}
  2560. label="电话"
  2561. >
  2562. {this.state.ModalData.fixedTel}
  2563. </FormItem>
  2564. </div>
  2565. {this.state.ModalData.contactList &&
  2566. this.state.ModalData.contactList.length > 0 ? (
  2567. this.state.ModalData.contactList.map((item, index) => {
  2568. return (
  2569. <div className="clearfix">
  2570. <FormItem
  2571. className="half-item"
  2572. labelCol={{ span: 6 }}
  2573. wrapperCol={{ span: 30 }}
  2574. label={"紧急联系人" + (index + 1)}
  2575. >
  2576. {item.emergencyContact}
  2577. </FormItem>
  2578. <FormItem
  2579. className="half-item"
  2580. labelCol={{ span: 6 }}
  2581. wrapperCol={{ span: 30 }}
  2582. label={"紧急联系人" + (index + 1) + "电话"}
  2583. >
  2584. {item.emergencyMobile}
  2585. </FormItem>
  2586. </div>
  2587. );
  2588. })
  2589. ) : (
  2590. <div
  2591. style={{
  2592. textAlign: "center",
  2593. height: 60,
  2594. lineHeight: "60px",
  2595. }}
  2596. >
  2597. 暂无紧急联系人信息
  2598. </div>
  2599. )}
  2600. <div className="title-peo">
  2601. <span>入职资料</span>
  2602. {/* <Button
  2603. type="primary"
  2604. onClick={this.entryModal}
  2605. style={{ position: "absolute", right: 0, height: 30 }}
  2606. >
  2607. 修改入职信息
  2608. </Button> */}
  2609. </div>
  2610. <div className="clearfix">
  2611. <FormItem
  2612. className="half-item"
  2613. labelCol={{ span: 6 }}
  2614. wrapperCol={{ span: 30 }}
  2615. label="毕业学校"
  2616. >
  2617. {this.state.ModalData.personnelEntry
  2618. ? this.state.ModalData.personnelEntry.school
  2619. : ""}
  2620. </FormItem>
  2621. <FormItem
  2622. className="half-item"
  2623. labelCol={{ span: 6 }}
  2624. wrapperCol={{ span: 30 }}
  2625. label="学历"
  2626. >
  2627. {this.state.ModalData.personnelEntry
  2628. ? this.educationStatus(
  2629. this.state.ModalData.personnelEntry.education
  2630. )
  2631. : ""}
  2632. </FormItem>
  2633. </div>
  2634. <div className="clearfix">
  2635. <FormItem
  2636. className="half-item"
  2637. labelCol={{ span: 6 }}
  2638. wrapperCol={{ span: 30 }}
  2639. label="所学专业"
  2640. >
  2641. {this.state.ModalData.personnelEntry
  2642. ? this.state.ModalData.personnelEntry.major
  2643. : ""}
  2644. </FormItem>
  2645. <FormItem
  2646. className="half-item"
  2647. labelCol={{ span: 6 }}
  2648. wrapperCol={{ span: 30 }}
  2649. label="职称"
  2650. >
  2651. {this.state.ModalData.personnelEntry
  2652. ? this.state.ModalData.personnelEntry.title
  2653. : ""}
  2654. </FormItem>
  2655. </div>
  2656. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2657. <div style={{ marginBottom: 10 }}>附件:</div>
  2658. <PicModal
  2659. remarks={
  2660. this.state.ModalData.personnelEntry
  2661. ? this.picToArr(
  2662. this.state.ModalData.personnelEntry.annexName
  2663. )
  2664. : []
  2665. }
  2666. picUrl={
  2667. this.state.ModalData.personnelEntry
  2668. ? this.picToArr(
  2669. this.state.ModalData.personnelEntry.annexUrl
  2670. )
  2671. : []
  2672. }
  2673. />
  2674. </div>
  2675. <div className="title-peo">
  2676. <span>晋升情况</span>
  2677. {/* <Button
  2678. type="primary"
  2679. onClick={(e) => {
  2680. this.upgradeModal(true);
  2681. }}
  2682. style={{ position: "absolute", right: 0, height: 30 }}
  2683. >
  2684. 新增晋升信息
  2685. </Button> */}
  2686. </div>
  2687. {this.state.ModalData.promotionList &&
  2688. this.state.ModalData.promotionList.length > 0 ? (
  2689. this.state.ModalData.promotionList.map((item, index) => {
  2690. return (
  2691. <div
  2692. style={{
  2693. width: "100%",
  2694. borderBottom: "1px dashed #ccc",
  2695. position: "relative",
  2696. }}
  2697. >
  2698. {/* <Button
  2699. style={{
  2700. position: "absolute",
  2701. right: "50%",
  2702. bottom: 10,
  2703. transform: "translateX(50%)",
  2704. }}
  2705. type="primary"
  2706. onClick={(e) => {
  2707. this.upgradeModal(false, index);
  2708. }}
  2709. >
  2710. 修改信息
  2711. </Button> */}
  2712. <div className="clearfix">
  2713. <FormItem
  2714. className="half-item"
  2715. labelCol={{ span: 6 }}
  2716. wrapperCol={{ span: 30 }}
  2717. label="晋升职位"
  2718. >
  2719. {item.oldJobsName + "--->" + item.newJobsName}
  2720. </FormItem>
  2721. <FormItem
  2722. className="half-item"
  2723. labelCol={{ span: 6 }}
  2724. wrapperCol={{ span: 30 }}
  2725. label="晋升等级"
  2726. >
  2727. {item.oldLvlName + "--->" + item.newLvlName}
  2728. </FormItem>
  2729. </div>
  2730. <div className="clearfix">
  2731. <FormItem
  2732. className="half-item"
  2733. labelCol={{ span: 6 }}
  2734. wrapperCol={{ span: 30 }}
  2735. label="晋升时间"
  2736. >
  2737. {item.promotionTimes}
  2738. </FormItem>
  2739. </div>
  2740. <div className="clearfix">
  2741. <FormItem
  2742. className="half-item"
  2743. labelCol={{ span: 6 }}
  2744. wrapperCol={{ span: 30 }}
  2745. label="晋升备注"
  2746. >
  2747. {item.promotionRemarks}
  2748. </FormItem>
  2749. </div>
  2750. <div
  2751. className="clearfix"
  2752. style={{ paddingLeft: 70, marginBottom: 40 }}
  2753. >
  2754. <div style={{ marginBottom: 10 }}>附件:</div>
  2755. <PicModal
  2756. remarks={this.picToArr(item.annexName)}
  2757. picUrl={this.picToArr(item.annexUrl)}
  2758. />
  2759. </div>
  2760. </div>
  2761. );
  2762. })
  2763. ) : (
  2764. <div
  2765. style={{
  2766. textAlign: "center",
  2767. height: 60,
  2768. lineHeight: "60px",
  2769. }}
  2770. >
  2771. 暂无晋升情况
  2772. </div>
  2773. )}
  2774. <div className="title-peo">
  2775. <span>合同情况</span>
  2776. {/* <Button
  2777. type="primary"
  2778. onClick={(e) => {
  2779. this.contractModal(true);
  2780. }}
  2781. style={{ position: "absolute", right: 0, height: 30 }}
  2782. >
  2783. 新增合同信息
  2784. </Button> */}
  2785. </div>
  2786. {this.state.ModalData.contractList &&
  2787. this.state.ModalData.contractList.length > 0 ? (
  2788. this.state.ModalData.contractList.map((item, index) => {
  2789. return (
  2790. <div
  2791. style={{
  2792. width: "100%",
  2793. borderBottom: "1px dashed #ccc",
  2794. position: "relative",
  2795. }}
  2796. >
  2797. {/* <Button
  2798. style={{
  2799. position: "absolute",
  2800. right: "50%",
  2801. bottom: 10,
  2802. transform: "translateX(50%)",
  2803. }}
  2804. type="primary"
  2805. onClick={(e) => {
  2806. this.contractModal(false, index);
  2807. }}
  2808. >
  2809. 修改信息
  2810. </Button> */}
  2811. <div className="clearfix">
  2812. <FormItem
  2813. className="half-item"
  2814. labelCol={{ span: 6 }}
  2815. wrapperCol={{ span: 30 }}
  2816. label="签订时间"
  2817. >
  2818. {item.startTimes}
  2819. </FormItem>
  2820. <FormItem
  2821. className="half-item"
  2822. labelCol={{ span: 6 }}
  2823. wrapperCol={{ span: 30 }}
  2824. label="到期时间"
  2825. >
  2826. {item.endTimes}
  2827. </FormItem>
  2828. </div>
  2829. <div className="clearfix">
  2830. <FormItem
  2831. style={{ width: "100%", wordBreak: "break-all" }}
  2832. className="half-item"
  2833. labelCol={{ span: 3 }}
  2834. wrapperCol={{ span: 30 }}
  2835. label="备注"
  2836. >
  2837. {item.contractRemarks}
  2838. </FormItem>
  2839. </div>
  2840. <div
  2841. className="clearfix"
  2842. style={{ paddingLeft: 70, marginBottom: 40 }}
  2843. >
  2844. <div style={{ marginBottom: 10 }}>附件:</div>
  2845. <PicModal
  2846. remarks={this.picToArr(item.annexName)}
  2847. picUrl={this.picToArr(item.annexUrl)}
  2848. />
  2849. </div>
  2850. </div>
  2851. );
  2852. })
  2853. ) : (
  2854. <div
  2855. style={{
  2856. textAlign: "center",
  2857. height: 60,
  2858. lineHeight: "60px",
  2859. }}
  2860. >
  2861. 暂无合同情况
  2862. </div>
  2863. )}
  2864. <div className="title-peo">
  2865. <span>奖惩情况</span>
  2866. {/* <Button
  2867. type="primary"
  2868. onClick={(e) => {
  2869. this.chooseModal(true);
  2870. }}
  2871. style={{ position: "absolute", right: 0, height: 30 }}
  2872. >
  2873. 新增奖惩信息
  2874. </Button> */}
  2875. </div>
  2876. {this.state.ModalData.chooseList &&
  2877. this.state.ModalData.chooseList.length > 0 ? (
  2878. this.state.ModalData.chooseList.map((item, index) => {
  2879. return (
  2880. <div
  2881. style={{
  2882. width: "100%",
  2883. borderBottom: "1px dashed #ccc",
  2884. position: "relative",
  2885. }}
  2886. >
  2887. {/* <Button
  2888. style={{
  2889. position: "absolute",
  2890. right: "50%",
  2891. bottom: 10,
  2892. transform: "translateX(50%)",
  2893. }}
  2894. type="primary"
  2895. onClick={(e) => {
  2896. this.chooseModal(false, index);
  2897. }}
  2898. >
  2899. 修改信息
  2900. </Button> */}
  2901. <div className="clearfix">
  2902. <FormItem
  2903. className="half-item"
  2904. labelCol={{ span: 6 }}
  2905. wrapperCol={{ span: 30 }}
  2906. label={"状态"}
  2907. >
  2908. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2909. </FormItem>
  2910. <FormItem
  2911. className="half-item"
  2912. labelCol={{ span: 6 }}
  2913. wrapperCol={{ span: 30 }}
  2914. label="时间"
  2915. >
  2916. {item.effectTimes}
  2917. </FormItem>
  2918. </div>
  2919. <div className="clearfix">
  2920. <FormItem
  2921. className="half-item"
  2922. labelCol={{ span: 6 }}
  2923. wrapperCol={{ span: 30 }}
  2924. label={"内容"}
  2925. >
  2926. {item.chooseRemarks}
  2927. </FormItem>
  2928. </div>
  2929. <div
  2930. className="clearfix"
  2931. style={{ paddingLeft: 70, marginBottom: 40 }}
  2932. >
  2933. <div style={{ marginBottom: 10 }}>附件:</div>
  2934. <PicModal
  2935. remarks={this.picToArr(item.annexName)}
  2936. picUrl={this.picToArr(item.annexUrl)}
  2937. />
  2938. </div>
  2939. </div>
  2940. );
  2941. })
  2942. ) : (
  2943. <div
  2944. style={{
  2945. textAlign: "center",
  2946. height: 60,
  2947. lineHeight: "60px",
  2948. }}
  2949. >
  2950. 暂无奖惩情况
  2951. </div>
  2952. )}
  2953. <div className="title-peo">
  2954. <span>离职情况</span>
  2955. {/* <Button
  2956. type="primary"
  2957. onClick={(e) => {
  2958. this.quitModal(true);
  2959. }}
  2960. style={{ position: "absolute", right: 0, height: 30 }}
  2961. >
  2962. 新增离职信息
  2963. </Button> */}
  2964. </div>
  2965. {this.state.ModalData.quitList &&
  2966. this.state.ModalData.quitList.length > 0 ? (
  2967. this.state.ModalData.quitList.map((item, index) => {
  2968. return (
  2969. <div
  2970. style={{
  2971. width: "100%",
  2972. borderBottom: "1px dashed #ccc",
  2973. position: "relative",
  2974. }}
  2975. >
  2976. {/* <Button
  2977. style={{
  2978. position: "absolute",
  2979. right: "50%",
  2980. bottom: 10,
  2981. transform: "translateX(50%)",
  2982. }}
  2983. type="primary"
  2984. onClick={(e) => {
  2985. this.quitModal(false, index);
  2986. }}
  2987. >
  2988. 修改信息
  2989. </Button> */}
  2990. <div className="clearfix">
  2991. <FormItem
  2992. className="half-item"
  2993. labelCol={{ span: 6 }}
  2994. wrapperCol={{ span: 30 }}
  2995. label="离职时间"
  2996. >
  2997. {item.effectTimes}
  2998. </FormItem>
  2999. <FormItem
  3000. className="half-item"
  3001. labelCol={{ span: 6 }}
  3002. wrapperCol={{ span: 30 }}
  3003. label="离职备注"
  3004. >
  3005. {item.quitRemarks}
  3006. </FormItem>
  3007. </div>
  3008. <div
  3009. className="clearfix"
  3010. style={{ paddingLeft: 70, marginBottom: 40 }}
  3011. >
  3012. <div style={{ marginBottom: 10 }}>附件:</div>
  3013. <PicModal
  3014. remarks={this.picToArr(item.annexName)}
  3015. picUrl={this.picToArr(item.annexUrl)}
  3016. />
  3017. </div>
  3018. </div>
  3019. );
  3020. })
  3021. ) : (
  3022. <div
  3023. style={{
  3024. textAlign: "center",
  3025. height: 60,
  3026. lineHeight: "60px",
  3027. }}
  3028. >
  3029. 暂无离职信息
  3030. </div>
  3031. )}
  3032. <div className="title-peo" style={{ marginBottom: 10 }}>
  3033. <span>福利情况</span>
  3034. {/* <Button
  3035. type="primary"
  3036. onClick={(e) => {
  3037. this.welfareModal();
  3038. }}
  3039. style={{ position: "absolute", right: 0, height: 30 }}
  3040. >
  3041. 修改福利信息
  3042. </Button> */}
  3043. </div>
  3044. <Table
  3045. columns={this.state.welfareColumns}
  3046. dataSource={this.state.ModalData.welfareList}
  3047. pagination={false}
  3048. bordered
  3049. size="small"
  3050. scroll={{ x: "max-content", y: 0 }}
  3051. />
  3052. <div className="clearfix" style={{ marginTop: 10 }}>
  3053. <FormItem
  3054. className="half-item"
  3055. style={{ width: "100%", wordBreak: "break-all" }}
  3056. labelCol={{ span: 3 }}
  3057. wrapperCol={{ span: 30 }}
  3058. label="备注"
  3059. >
  3060. {this.state.ModalData.welfareRemarks}
  3061. </FormItem>
  3062. </div>
  3063. <div
  3064. className="clearfix"
  3065. style={{ paddingLeft: 70, marginBottom: 0 }}
  3066. >
  3067. <div style={{ marginBottom: 10 }}>附件:</div>
  3068. <PicModal
  3069. remarks={this.picToArr(
  3070. this.state.ModalData.welfareAnnexName
  3071. )}
  3072. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  3073. />
  3074. </div>
  3075. </div>
  3076. ) : (
  3077. <Tabs
  3078. activeKey={this.state.active}
  3079. onChange={(e) => {
  3080. this.setState({ active: e });
  3081. }}
  3082. >
  3083. <TabPane tab="任职信息" key={1}>
  3084. <div className="title-peo">
  3085. <span>任职信息</span>
  3086. <Button
  3087. type="primary"
  3088. onClick={(e) => {
  3089. this.stayModal(this.state.ModalData.id);
  3090. }}
  3091. style={{ position: "absolute", right: 0, height: 30 }}
  3092. >
  3093. 修改任职信息
  3094. </Button>
  3095. </div>
  3096. <div className="clearfix">
  3097. <FormItem
  3098. className="half-item"
  3099. labelCol={{ span: 6 }}
  3100. wrapperCol={{ span: 30 }}
  3101. label="员工状态"
  3102. >
  3103. {this.state.ModalData.statusName}
  3104. </FormItem>
  3105. <FormItem
  3106. className="half-item"
  3107. labelCol={{ span: 6 }}
  3108. wrapperCol={{ span: 30 }}
  3109. label="所属系统"
  3110. >
  3111. {this.state.ModalData.systemName}
  3112. </FormItem>
  3113. </div>
  3114. <div className="clearfix">
  3115. <FormItem
  3116. className="half-item"
  3117. labelCol={{ span: 6 }}
  3118. wrapperCol={{ span: 30 }}
  3119. label="工作性质"
  3120. >
  3121. {this.jobStatus(
  3122. this.state.ModalData.jobNature,
  3123. this.state.ModalData.jobNatureRemarks
  3124. )}
  3125. </FormItem>
  3126. <FormItem
  3127. className="half-item"
  3128. labelCol={{ span: 6 }}
  3129. wrapperCol={{ span: 30 }}
  3130. label="工龄"
  3131. >
  3132. {this.state.ModalData.workingYear}
  3133. </FormItem>
  3134. </div>
  3135. <div className="clearfix">
  3136. <FormItem
  3137. className="half-item"
  3138. labelCol={{ span: 6 }}
  3139. wrapperCol={{ span: 30 }}
  3140. label="入职时间"
  3141. >
  3142. {this.state.ModalData.entryTimes}
  3143. </FormItem>
  3144. <FormItem
  3145. className="half-item"
  3146. labelCol={{ span: 6 }}
  3147. wrapperCol={{ span: 30 }}
  3148. label="转正时间"
  3149. >
  3150. {this.state.ModalData.promotionTimes}
  3151. </FormItem>
  3152. </div>
  3153. <div className="clearfix">
  3154. <FormItem
  3155. className="half-item"
  3156. labelCol={{ span: 6 }}
  3157. wrapperCol={{ span: 30 }}
  3158. label="所属公司"
  3159. >
  3160. {this.state.ModalData.depName}
  3161. </FormItem>
  3162. <FormItem
  3163. className="half-item"
  3164. labelCol={{ span: 6 }}
  3165. wrapperCol={{ span: 30 }}
  3166. label="级别"
  3167. >
  3168. {this.state.ModalData.lvlName}
  3169. </FormItem>
  3170. </div>
  3171. <div className="clearfix">
  3172. <FormItem
  3173. className="half-item"
  3174. labelCol={{ span: 6 }}
  3175. wrapperCol={{ span: 30 }}
  3176. label="职位"
  3177. >
  3178. {this.state.ModalData.jobsName}
  3179. </FormItem>
  3180. <FormItem
  3181. className="half-item"
  3182. labelCol={{ span: 6 }}
  3183. wrapperCol={{ span: 30 }}
  3184. label="岗位津贴"
  3185. >
  3186. {this.state.ModalData.allowance}
  3187. </FormItem>
  3188. </div>
  3189. <div className="clearfix">
  3190. <FormItem
  3191. className="half-item"
  3192. labelCol={{ span: 6 }}
  3193. wrapperCol={{ span: 30 }}
  3194. label="星级"
  3195. >
  3196. {this.state.ModalData.starName}
  3197. </FormItem>
  3198. </div>
  3199. </TabPane>
  3200. <TabPane tab="联系信息" key={2}>
  3201. <div className="title-peo">
  3202. <span>联系信息</span>
  3203. <Button
  3204. type="primary"
  3205. onClick={this.phoneModal}
  3206. style={{ position: "absolute", right: 0, height: 30 }}
  3207. >
  3208. 修改联系信息
  3209. </Button>
  3210. </div>
  3211. <div className="clearfix">
  3212. <FormItem
  3213. className="half-item"
  3214. labelCol={{ span: 6 }}
  3215. wrapperCol={{ span: 30 }}
  3216. label="手机号码"
  3217. >
  3218. {this.state.ModalData.mobile}
  3219. </FormItem>
  3220. <FormItem
  3221. className="half-item"
  3222. labelCol={{ span: 6 }}
  3223. wrapperCol={{ span: 30 }}
  3224. label="电话"
  3225. >
  3226. {this.state.ModalData.fixedTel}
  3227. </FormItem>
  3228. </div>
  3229. {this.state.ModalData.contactList &&
  3230. this.state.ModalData.contactList.length > 0 ? (
  3231. this.state.ModalData.contactList.map((item, index) => {
  3232. return (
  3233. <div className="clearfix">
  3234. <FormItem
  3235. className="half-item"
  3236. labelCol={{ span: 6 }}
  3237. wrapperCol={{ span: 30 }}
  3238. label={"紧急联系人" + (index + 1)}
  3239. >
  3240. {item.emergencyContact}
  3241. </FormItem>
  3242. <FormItem
  3243. className="half-item"
  3244. labelCol={{ span: 6 }}
  3245. wrapperCol={{ span: 30 }}
  3246. label={"紧急联系人" + (index + 1) + "电话"}
  3247. >
  3248. {item.emergencyMobile}
  3249. </FormItem>
  3250. </div>
  3251. );
  3252. })
  3253. ) : (
  3254. <div
  3255. style={{
  3256. textAlign: "center",
  3257. height: 60,
  3258. lineHeight: "60px",
  3259. }}
  3260. >
  3261. 暂无紧急联系人信息
  3262. </div>
  3263. )}
  3264. </TabPane>
  3265. <TabPane tab="入职资料" key={3}>
  3266. <div className="title-peo">
  3267. <span>入职资料</span>
  3268. <Button
  3269. type="primary"
  3270. onClick={this.entryModal}
  3271. style={{ position: "absolute", right: 0, height: 30 }}
  3272. >
  3273. 修改入职信息
  3274. </Button>
  3275. </div>
  3276. <div className="clearfix">
  3277. <FormItem
  3278. className="half-item"
  3279. labelCol={{ span: 6 }}
  3280. wrapperCol={{ span: 30 }}
  3281. label="毕业学校"
  3282. >
  3283. {this.state.ModalData.personnelEntry
  3284. ? this.state.ModalData.personnelEntry.school
  3285. : ""}
  3286. </FormItem>
  3287. <FormItem
  3288. className="half-item"
  3289. labelCol={{ span: 6 }}
  3290. wrapperCol={{ span: 30 }}
  3291. label="学历"
  3292. >
  3293. {this.state.ModalData.personnelEntry
  3294. ? this.educationStatus(
  3295. this.state.ModalData.personnelEntry.education
  3296. )
  3297. : ""}
  3298. </FormItem>
  3299. </div>
  3300. <div className="clearfix">
  3301. <FormItem
  3302. className="half-item"
  3303. labelCol={{ span: 6 }}
  3304. wrapperCol={{ span: 30 }}
  3305. label="所学专业"
  3306. >
  3307. {this.state.ModalData.personnelEntry
  3308. ? this.state.ModalData.personnelEntry.major
  3309. : ""}
  3310. </FormItem>
  3311. <FormItem
  3312. className="half-item"
  3313. labelCol={{ span: 6 }}
  3314. wrapperCol={{ span: 30 }}
  3315. label="职称"
  3316. >
  3317. {this.state.ModalData.personnelEntry
  3318. ? this.state.ModalData.personnelEntry.title
  3319. : ""}
  3320. </FormItem>
  3321. </div>
  3322. <div className="clearfix" style={{ paddingLeft: 70 }}>
  3323. <div style={{ marginBottom: 10 }}>附件:</div>
  3324. <PicModal
  3325. remarks={
  3326. this.state.ModalData.personnelEntry
  3327. ? this.picToArr(
  3328. this.state.ModalData.personnelEntry.annexName
  3329. )
  3330. : []
  3331. }
  3332. picUrl={
  3333. this.state.ModalData.personnelEntry
  3334. ? this.picToArr(
  3335. this.state.ModalData.personnelEntry.annexUrl
  3336. )
  3337. : []
  3338. }
  3339. />
  3340. </div>
  3341. </TabPane>
  3342. <TabPane tab="晋升情况" key={4}>
  3343. <div className="title-peo">
  3344. <span>晋升情况</span>
  3345. <Button
  3346. type="primary"
  3347. onClick={(e) => {
  3348. this.upgradeModal(true);
  3349. }}
  3350. style={{ position: "absolute", right: 0, height: 30 }}
  3351. >
  3352. 新增晋升信息
  3353. </Button>
  3354. </div>
  3355. {this.state.ModalData.promotionList &&
  3356. this.state.ModalData.promotionList.length > 0 ? (
  3357. this.state.ModalData.promotionList.map((item, index) => {
  3358. return (
  3359. <div
  3360. style={{
  3361. width: "100%",
  3362. borderBottom: "1px dashed #ccc",
  3363. position: "relative",
  3364. }}
  3365. >
  3366. <Button
  3367. style={{
  3368. position: "absolute",
  3369. right: "50%",
  3370. bottom: 10,
  3371. transform: "translateX(50%)",
  3372. }}
  3373. type="primary"
  3374. onClick={(e) => {
  3375. this.upgradeModal(false, index);
  3376. }}
  3377. >
  3378. 修改信息
  3379. </Button>
  3380. <div className="clearfix">
  3381. <FormItem
  3382. className="half-item"
  3383. labelCol={{ span: 6 }}
  3384. wrapperCol={{ span: 30 }}
  3385. label="晋升职位"
  3386. >
  3387. {item.oldJobsName + "--->" + item.newJobsName}
  3388. </FormItem>
  3389. <FormItem
  3390. className="half-item"
  3391. labelCol={{ span: 6 }}
  3392. wrapperCol={{ span: 30 }}
  3393. label="晋升等级"
  3394. >
  3395. {item.oldLvlName + "--->" + item.newLvlName}
  3396. </FormItem>
  3397. </div>
  3398. <div className="clearfix">
  3399. <FormItem
  3400. className="half-item"
  3401. labelCol={{ span: 6 }}
  3402. wrapperCol={{ span: 30 }}
  3403. label="晋升时间"
  3404. >
  3405. {item.promotionTimes}
  3406. </FormItem>
  3407. </div>
  3408. <div className="clearfix">
  3409. <FormItem
  3410. className="half-item"
  3411. labelCol={{ span: 6 }}
  3412. wrapperCol={{ span: 30 }}
  3413. label="晋升备注"
  3414. >
  3415. {item.promotionRemarks}
  3416. </FormItem>
  3417. </div>
  3418. <div
  3419. className="clearfix"
  3420. style={{ paddingLeft: 70, marginBottom: 40 }}
  3421. >
  3422. <div style={{ marginBottom: 10 }}>附件:</div>
  3423. <PicModal
  3424. remarks={this.picToArr(item.annexName)}
  3425. picUrl={this.picToArr(item.annexUrl)}
  3426. />
  3427. </div>
  3428. </div>
  3429. );
  3430. })
  3431. ) : (
  3432. <div
  3433. style={{
  3434. textAlign: "center",
  3435. height: 60,
  3436. lineHeight: "60px",
  3437. }}
  3438. >
  3439. 暂无晋升情况
  3440. </div>
  3441. )}
  3442. </TabPane>
  3443. <TabPane tab="合同情况" key={5}>
  3444. <div className="title-peo">
  3445. <span>合同情况</span>
  3446. <Button
  3447. type="primary"
  3448. onClick={(e) => {
  3449. this.contractModal(true);
  3450. }}
  3451. style={{ position: "absolute", right: 0, height: 30 }}
  3452. >
  3453. 新增合同信息
  3454. </Button>
  3455. </div>
  3456. {this.state.ModalData.contractList &&
  3457. this.state.ModalData.contractList.length > 0 ? (
  3458. this.state.ModalData.contractList.map((item, index) => {
  3459. return (
  3460. <div
  3461. style={{
  3462. width: "100%",
  3463. borderBottom: "1px dashed #ccc",
  3464. position: "relative",
  3465. }}
  3466. >
  3467. <Button
  3468. style={{
  3469. position: "absolute",
  3470. right: "50%",
  3471. bottom: 10,
  3472. transform: "translateX(50%)",
  3473. }}
  3474. type="primary"
  3475. onClick={(e) => {
  3476. this.contractModal(false, index);
  3477. }}
  3478. >
  3479. 修改信息
  3480. </Button>
  3481. <div className="clearfix">
  3482. <FormItem
  3483. className="half-item"
  3484. labelCol={{ span: 6 }}
  3485. wrapperCol={{ span: 30 }}
  3486. label="签订时间"
  3487. >
  3488. {item.startTimes}
  3489. </FormItem>
  3490. <FormItem
  3491. className="half-item"
  3492. labelCol={{ span: 6 }}
  3493. wrapperCol={{ span: 30 }}
  3494. label="到期时间"
  3495. >
  3496. {item.endTimes}
  3497. </FormItem>
  3498. </div>
  3499. <div className="clearfix">
  3500. <FormItem
  3501. style={{ width: "100%", wordBreak: "break-all" }}
  3502. className="half-item"
  3503. labelCol={{ span: 3 }}
  3504. wrapperCol={{ span: 30 }}
  3505. label="备注"
  3506. >
  3507. {item.contractRemarks}
  3508. </FormItem>
  3509. </div>
  3510. <div
  3511. className="clearfix"
  3512. style={{ paddingLeft: 70, marginBottom: 40 }}
  3513. >
  3514. <div style={{ marginBottom: 10 }}>附件:</div>
  3515. <PicModal
  3516. remarks={this.picToArr(item.annexName)}
  3517. picUrl={this.picToArr(item.annexUrl)}
  3518. />
  3519. </div>
  3520. </div>
  3521. );
  3522. })
  3523. ) : (
  3524. <div
  3525. style={{
  3526. textAlign: "center",
  3527. height: 60,
  3528. lineHeight: "60px",
  3529. }}
  3530. >
  3531. 暂无合同情况
  3532. </div>
  3533. )}
  3534. </TabPane>
  3535. <TabPane tab="奖惩情况" key={6}>
  3536. <div className="title-peo">
  3537. <span>奖惩情况</span>
  3538. <Button
  3539. type="primary"
  3540. onClick={(e) => {
  3541. this.chooseModal(true);
  3542. }}
  3543. style={{ position: "absolute", right: 0, height: 30 }}
  3544. >
  3545. 新增奖惩信息
  3546. </Button>
  3547. </div>
  3548. {this.state.ModalData.chooseList &&
  3549. this.state.ModalData.chooseList.length > 0 ? (
  3550. this.state.ModalData.chooseList.map((item, index) => {
  3551. return (
  3552. <div
  3553. style={{
  3554. width: "100%",
  3555. borderBottom: "1px dashed #ccc",
  3556. position: "relative",
  3557. }}
  3558. >
  3559. <Button
  3560. style={{
  3561. position: "absolute",
  3562. right: "50%",
  3563. bottom: 10,
  3564. transform: "translateX(50%)",
  3565. }}
  3566. type="primary"
  3567. onClick={(e) => {
  3568. this.chooseModal(false, index);
  3569. }}
  3570. >
  3571. 修改信息
  3572. </Button>
  3573. <div className="clearfix">
  3574. <FormItem
  3575. className="half-item"
  3576. labelCol={{ span: 6 }}
  3577. wrapperCol={{ span: 30 }}
  3578. label={"状态"}
  3579. >
  3580. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3581. </FormItem>
  3582. <FormItem
  3583. className="half-item"
  3584. labelCol={{ span: 6 }}
  3585. wrapperCol={{ span: 30 }}
  3586. label="时间"
  3587. >
  3588. {item.effectTimes}
  3589. </FormItem>
  3590. </div>
  3591. <div className="clearfix">
  3592. <FormItem
  3593. className="half-item"
  3594. labelCol={{ span: 6 }}
  3595. wrapperCol={{ span: 30 }}
  3596. label={"内容"}
  3597. >
  3598. {item.chooseRemarks}
  3599. </FormItem>
  3600. </div>
  3601. <div
  3602. className="clearfix"
  3603. style={{ paddingLeft: 70, marginBottom: 40 }}
  3604. >
  3605. <div style={{ marginBottom: 10 }}>附件:</div>
  3606. <PicModal
  3607. remarks={this.picToArr(item.annexName)}
  3608. picUrl={this.picToArr(item.annexUrl)}
  3609. />
  3610. </div>
  3611. </div>
  3612. );
  3613. })
  3614. ) : (
  3615. <div
  3616. style={{
  3617. textAlign: "center",
  3618. height: 60,
  3619. lineHeight: "60px",
  3620. }}
  3621. >
  3622. 暂无奖惩情况
  3623. </div>
  3624. )}
  3625. </TabPane>
  3626. <TabPane tab="离职情况" key={7}>
  3627. <div className="title-peo">
  3628. <span>离职情况</span>
  3629. <Button
  3630. type="primary"
  3631. onClick={(e) => {
  3632. this.quitModal(true);
  3633. }}
  3634. style={{ position: "absolute", right: 0, height: 30 }}
  3635. >
  3636. 新增离职信息
  3637. </Button>
  3638. </div>
  3639. {this.state.ModalData.quitList &&
  3640. this.state.ModalData.quitList.length > 0 ? (
  3641. this.state.ModalData.quitList.map((item, index) => {
  3642. return (
  3643. <div
  3644. style={{
  3645. width: "100%",
  3646. borderBottom: "1px dashed #ccc",
  3647. position: "relative",
  3648. }}
  3649. >
  3650. <Button
  3651. style={{
  3652. position: "absolute",
  3653. right: "50%",
  3654. bottom: 10,
  3655. transform: "translateX(50%)",
  3656. }}
  3657. type="primary"
  3658. onClick={(e) => {
  3659. this.quitModal(false, index);
  3660. }}
  3661. >
  3662. 修改信息
  3663. </Button>
  3664. <div className="clearfix">
  3665. <FormItem
  3666. className="half-item"
  3667. labelCol={{ span: 6 }}
  3668. wrapperCol={{ span: 30 }}
  3669. label="离职时间"
  3670. >
  3671. {item.effectTimes}
  3672. </FormItem>
  3673. <FormItem
  3674. className="half-item"
  3675. labelCol={{ span: 6 }}
  3676. wrapperCol={{ span: 30 }}
  3677. label="离职备注"
  3678. >
  3679. {item.quitRemarks}
  3680. </FormItem>
  3681. </div>
  3682. <div
  3683. className="clearfix"
  3684. style={{ paddingLeft: 70, marginBottom: 40 }}
  3685. >
  3686. <div style={{ marginBottom: 10 }}>附件:</div>
  3687. <PicModal
  3688. remarks={this.picToArr(item.annexName)}
  3689. picUrl={this.picToArr(item.annexUrl)}
  3690. />
  3691. </div>
  3692. </div>
  3693. );
  3694. })
  3695. ) : (
  3696. <div
  3697. style={{
  3698. textAlign: "center",
  3699. height: 60,
  3700. lineHeight: "60px",
  3701. }}
  3702. >
  3703. 暂无离职信息
  3704. </div>
  3705. )}
  3706. </TabPane>
  3707. <TabPane tab="福利情况" key={8}>
  3708. <div className="title-peo" style={{ marginBottom: 10 }}>
  3709. <span>福利情况</span>
  3710. <Button
  3711. type="primary"
  3712. onClick={(e) => {
  3713. this.welfareModal();
  3714. }}
  3715. style={{ position: "absolute", right: 0, height: 30 }}
  3716. >
  3717. 修改福利信息
  3718. </Button>
  3719. </div>
  3720. <Table
  3721. columns={this.state.welfareColumns}
  3722. dataSource={this.state.ModalData.welfareList}
  3723. pagination={false}
  3724. bordered
  3725. size="small"
  3726. scroll={{ x: "max-content", y: 0 }}
  3727. />
  3728. <div className="clearfix" style={{ marginTop: 10 }}>
  3729. <FormItem
  3730. className="half-item"
  3731. style={{ width: "100%", wordBreak: "break-all" }}
  3732. labelCol={{ span: 3 }}
  3733. wrapperCol={{ span: 30 }}
  3734. label="备注"
  3735. >
  3736. {this.state.ModalData.welfareRemarks}
  3737. </FormItem>
  3738. </div>
  3739. <div
  3740. className="clearfix"
  3741. style={{ paddingLeft: 70, marginBottom: 0 }}
  3742. >
  3743. <div style={{ marginBottom: 10 }}>附件:</div>
  3744. <PicModal
  3745. remarks={this.picToArr(
  3746. this.state.ModalData.welfareAnnexName
  3747. )}
  3748. picUrl={this.picToArr(
  3749. this.state.ModalData.welfareAnnexUrl
  3750. )}
  3751. />
  3752. </div>
  3753. </TabPane>
  3754. </Tabs>
  3755. )}
  3756. </Spin>
  3757. <Modal
  3758. maskClosable={false}
  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. maskClosable={false}
  4111. visible={this.state.peoVisible}
  4112. onOk={this.checkOk}
  4113. footer={null}
  4114. width={800}
  4115. style={{ position: "relative", zIndex: 9999 }}
  4116. onCancel={() => {
  4117. this.loadData();
  4118. this.addPeoCancel();
  4119. }}
  4120. >
  4121. <Spin spinning={this.state.loading}>
  4122. <h2
  4123. style={{
  4124. textAlign: "center",
  4125. paddingBottom: 10,
  4126. marginBottom: 10,
  4127. }}
  4128. >
  4129. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  4130. </h2>
  4131. <div className="clearfix">
  4132. <FormItem
  4133. className="half-item"
  4134. {...formItemLayout}
  4135. label="员工编号"
  4136. >
  4137. <Input
  4138. placeholder="请输入员工编号"
  4139. style={{ width: 200 }}
  4140. value={this.state.employeeId}
  4141. onChange={(e) => {
  4142. this.setState({
  4143. employeeId: e.target.value,
  4144. });
  4145. }}
  4146. />
  4147. <Button
  4148. disabled={
  4149. this.state.employeeId || this.state.employeeId == 0
  4150. ? false
  4151. : true
  4152. }
  4153. style={{ position: "absolute" }}
  4154. type={"primary"}
  4155. onClick={this.verifyId}
  4156. >
  4157. 验证重复
  4158. </Button>
  4159. </FormItem>
  4160. <FormItem
  4161. className="half-item"
  4162. {...formItemLayout}
  4163. label="门禁编号"
  4164. >
  4165. <Input
  4166. style={{ width: 200 }}
  4167. placeholder="请输入门禁编号"
  4168. value={this.state.doorId}
  4169. onChange={(e) => {
  4170. this.setState({
  4171. doorId: e.target.value,
  4172. });
  4173. }}
  4174. />
  4175. <Button
  4176. disabled={
  4177. this.state.doorId || this.state.doorId == 0 ? false : true
  4178. }
  4179. style={{ position: "absolute" }}
  4180. type={"primary"}
  4181. onClick={this.verifyDoor}
  4182. >
  4183. 验证重复
  4184. </Button>
  4185. </FormItem>
  4186. </div>
  4187. <div className="clearfix">
  4188. <FormItem className="half-item" {...formItemLayout} label="姓名">
  4189. <Input
  4190. placeholder="请输入姓名"
  4191. style={{ width: 200 }}
  4192. value={this.state.name}
  4193. onChange={(e) => {
  4194. this.setState({
  4195. name: e.target.value,
  4196. });
  4197. }}
  4198. />
  4199. </FormItem>
  4200. <FormItem
  4201. className="half-item"
  4202. {...formItemLayout}
  4203. label="出生日期"
  4204. >
  4205. <DatePicker
  4206. value={
  4207. this.state.birthdays ? moment(this.state.birthdays) : null
  4208. }
  4209. onChange={(e, t) => {
  4210. this.setState({
  4211. birthdays: t,
  4212. });
  4213. }}
  4214. />
  4215. </FormItem>
  4216. </div>
  4217. <div className="clearfix">
  4218. <FormItem className="half-item" {...formItemLayout} label="性别">
  4219. <Radio.Group
  4220. onChange={(e) => {
  4221. this.setState({ sex: e.target.value });
  4222. }}
  4223. value={this.state.sex}
  4224. >
  4225. <Radio value={0}>男</Radio>
  4226. <Radio value={1}>女</Radio>
  4227. </Radio.Group>
  4228. </FormItem>
  4229. <FormItem className="half-item" {...formItemLayout} label="民族">
  4230. <Input
  4231. placeholder="输入民族(例:汉族)"
  4232. style={{ width: 200 }}
  4233. value={this.state.nation}
  4234. onChange={(e) => {
  4235. this.setState({
  4236. nation: e.target.value,
  4237. });
  4238. }}
  4239. />
  4240. </FormItem>
  4241. </div>
  4242. <div className="clearfix">
  4243. <FormItem
  4244. className="half-item"
  4245. {...formItemLayout}
  4246. label="户籍地址"
  4247. >
  4248. <Cascader
  4249. options={this.state.Area}
  4250. value={this.state.residence}
  4251. placeholder="选择城市"
  4252. style={{ width: "200px" }}
  4253. onChange={(e, pre) => {
  4254. this.setState({ residence: e });
  4255. }}
  4256. />
  4257. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4258. </FormItem>
  4259. <FormItem
  4260. className="half-item"
  4261. {...formItemLayout}
  4262. label="户籍街道地址"
  4263. >
  4264. <Input
  4265. placeholder="输入街道地址"
  4266. style={{ width: 200 }}
  4267. value={this.state.residenceAddress}
  4268. onChange={(e) => {
  4269. this.setState({
  4270. residenceAddress: e.target.value,
  4271. });
  4272. }}
  4273. />
  4274. </FormItem>
  4275. </div>
  4276. <div className="clearfix">
  4277. <FormItem
  4278. className="half-item"
  4279. {...formItemLayout}
  4280. label="现住地址"
  4281. >
  4282. <Cascader
  4283. options={this.state.Area}
  4284. value={this.state.now}
  4285. placeholder="选择城市"
  4286. style={{ width: "200px" }}
  4287. onChange={(e, pre) => {
  4288. this.setState({ now: e });
  4289. }}
  4290. />
  4291. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4292. </FormItem>
  4293. <FormItem
  4294. className="half-item"
  4295. {...formItemLayout}
  4296. label="现住街道地址"
  4297. >
  4298. <Input
  4299. placeholder="输入街道地址"
  4300. style={{ width: 200 }}
  4301. value={this.state.nowAddress}
  4302. onChange={(e) => {
  4303. this.setState({
  4304. nowAddress: e.target.value,
  4305. });
  4306. }}
  4307. />
  4308. </FormItem>
  4309. </div>
  4310. <div className="clearfix">
  4311. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  4312. <Cascader
  4313. options={this.state.Birthplaces}
  4314. value={this.state.nativePlace}
  4315. placeholder="选择城市"
  4316. style={{ width: "200px" }}
  4317. onChange={(e, pre) => {
  4318. this.setState({ nativePlace: e });
  4319. }}
  4320. />
  4321. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4322. </FormItem>
  4323. <FormItem
  4324. className="half-item"
  4325. {...formItemLayout}
  4326. label="身份证"
  4327. >
  4328. <Input
  4329. placeholder="输入身份证信息"
  4330. style={{ width: 200 }}
  4331. value={this.state.idCard}
  4332. onChange={(e) => {
  4333. // 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]$/;
  4334. this.setState({
  4335. idCard: e.target.value,
  4336. });
  4337. }}
  4338. />
  4339. </FormItem>
  4340. </div>
  4341. <div className="clearfix">
  4342. <FormItem
  4343. className="half-item"
  4344. {...formItemLayout}
  4345. label="身份证领证机关"
  4346. >
  4347. <Input
  4348. placeholder="输入机关名称"
  4349. style={{ width: 200 }}
  4350. value={this.state.certificationAuthority}
  4351. onChange={(e) => {
  4352. // 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]$/;
  4353. this.setState({
  4354. certificationAuthority: e.target.value,
  4355. });
  4356. }}
  4357. />
  4358. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4359. </FormItem>
  4360. <FormItem
  4361. className="half-item"
  4362. {...formItemLayout}
  4363. label="婚姻状态"
  4364. >
  4365. <Radio.Group
  4366. onChange={(e) => {
  4367. this.setState({ marriage: e.target.value });
  4368. }}
  4369. value={this.state.marriage}
  4370. >
  4371. <Radio value={0}>未婚</Radio>
  4372. <Radio value={1}>已婚</Radio>
  4373. <Radio value={2}>离异</Radio>
  4374. </Radio.Group>
  4375. </FormItem>
  4376. </div>
  4377. <div className="clearfix">
  4378. <FormItem
  4379. className="half-item"
  4380. labelCol={{ span: 6 }}
  4381. wrapperCol={{ span: 30 }}
  4382. label="子女数量"
  4383. >
  4384. <span>儿子:</span>
  4385. <Input
  4386. placeholder="输入数量"
  4387. style={{ width: 80 }}
  4388. type={"number"}
  4389. value={this.state.son}
  4390. onChange={(e) => {
  4391. this.setState({
  4392. son: e.target.value,
  4393. });
  4394. }}
  4395. />
  4396. <span style={{ marginLeft: 10 }}>女儿:</span>
  4397. <Input
  4398. placeholder="输入数量"
  4399. style={{ width: 80 }}
  4400. type={"number"}
  4401. value={this.state.girl}
  4402. onChange={(e) => {
  4403. this.setState({
  4404. girl: e.target.value,
  4405. });
  4406. }}
  4407. />
  4408. </FormItem>
  4409. <FormItem
  4410. className="half-item"
  4411. {...formItemLayout}
  4412. label="政治面貌"
  4413. >
  4414. <Select
  4415. placeholder="请选择政治面貌"
  4416. style={{ width: 200 }}
  4417. onChange={(e) => {
  4418. this.setState({ politicalOutlook: e });
  4419. }}
  4420. value={this.state.politicalOutlook}
  4421. >
  4422. <Option value={0}>群众</Option>
  4423. <Option value={1}>中共预备党员</Option>
  4424. <Option value={2}>中共党员</Option>
  4425. <Option value={3}>致公党党员</Option>
  4426. </Select>
  4427. </FormItem>
  4428. </div>
  4429. <Button
  4430. type="primary"
  4431. shape="round"
  4432. size="large"
  4433. style={{
  4434. position: "relative",
  4435. left: "50%",
  4436. transform: "translateX(-50%)",
  4437. }}
  4438. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4439. >
  4440. 保存
  4441. </Button>
  4442. </Spin>
  4443. </Modal>
  4444. <Modal
  4445. maskClosable={false}
  4446. visible={this.state.stayVisible}
  4447. footer={null}
  4448. width={800}
  4449. onCancel={() => {
  4450. this.loadData();
  4451. this.stayCancel();
  4452. }}
  4453. >
  4454. <Spin spinning={this.state.loading}>
  4455. <h3
  4456. style={{
  4457. textAlign: "center",
  4458. paddingBottom: 10,
  4459. marginBottom: 10,
  4460. }}
  4461. >
  4462. 任职信息
  4463. </h3>
  4464. <div className="clearfix">
  4465. <FormItem
  4466. className="half-item"
  4467. labelCol={{ span: 6 }}
  4468. wrapperCol={{ span: 30 }}
  4469. label="员工状态"
  4470. >
  4471. <Select
  4472. placeholder="请选择状态"
  4473. style={{ width: 200 }}
  4474. onChange={(e) => {
  4475. this.setState({ status: e });
  4476. }}
  4477. value={this.state.status}
  4478. >
  4479. <Option value="0">实习生</Option>
  4480. <Option value="1">在职(试用期)</Option>
  4481. <Option value="2">在职(合同期)</Option>
  4482. <Option value="3">兼职</Option>
  4483. <Option value="4">已离职</Option>
  4484. </Select>
  4485. </FormItem>
  4486. <FormItem
  4487. className="half-item"
  4488. {...formItemLayout}
  4489. label="所属系统"
  4490. >
  4491. <Select
  4492. placeholder="请选择所属系统"
  4493. style={{ width: 200 }}
  4494. onChange={(e) => {
  4495. this.setState({ system: e });
  4496. }}
  4497. value={this.state.system}
  4498. >
  4499. <Option value="0">管理系统</Option>
  4500. <Option value="1">营销系统</Option>
  4501. <Option value="2">技术系统</Option>
  4502. </Select>
  4503. </FormItem>
  4504. </div>
  4505. <div className="clearfix">
  4506. <FormItem
  4507. className="half-item"
  4508. labelCol={{ span: 6 }}
  4509. wrapperCol={{ span: 30 }}
  4510. label="工作性质"
  4511. >
  4512. <Radio.Group
  4513. onChange={(e) => {
  4514. this.setState({ jobNature: e.target.value });
  4515. }}
  4516. value={this.state.jobNature}
  4517. >
  4518. <Radio value="0">全职</Radio>
  4519. <Radio value="1">兼职</Radio>
  4520. <Radio value="2">其他</Radio>
  4521. </Radio.Group>
  4522. <Input
  4523. placeholder="输入性质"
  4524. style={{
  4525. width: 80,
  4526. display:
  4527. this.state.jobNature == 2 ? "inline-block" : "none",
  4528. }}
  4529. value={this.state.jobNatureRemarks}
  4530. onChange={(e) => {
  4531. this.setState({
  4532. jobNatureRemarks: e.target.value,
  4533. });
  4534. }}
  4535. />
  4536. </FormItem>
  4537. <FormItem className="half-item" {...formItemLayout} label="工龄">
  4538. <span>{this.state.ModalData.workingYear}</span>
  4539. </FormItem>
  4540. </div>
  4541. <div className="clearfix">
  4542. <FormItem
  4543. className="half-item"
  4544. {...formItemLayout}
  4545. label="入职时间"
  4546. >
  4547. <DatePicker
  4548. value={
  4549. this.state.entryTimes ? moment(this.state.entryTimes) : null
  4550. }
  4551. style={{ width: 200 }}
  4552. onChange={(e, t) => {
  4553. this.setState({
  4554. entryTimes: t,
  4555. });
  4556. }}
  4557. />
  4558. </FormItem>
  4559. <FormItem
  4560. className="half-item"
  4561. {...formItemLayout}
  4562. label="转正时间"
  4563. >
  4564. <DatePicker
  4565. value={
  4566. this.state.promotionTimes
  4567. ? moment(this.state.promotionTimes)
  4568. : null
  4569. }
  4570. style={{ width: 200 }}
  4571. onChange={(e, t) => {
  4572. this.setState({
  4573. promotionTimes: t,
  4574. });
  4575. }}
  4576. />
  4577. </FormItem>
  4578. </div>
  4579. <div className="clearfix">
  4580. <FormItem
  4581. className="half-item"
  4582. {...formItemLayout}
  4583. label="所属公司"
  4584. >
  4585. <Select
  4586. placeholder="选择公司"
  4587. style={{ width: 200, marginRight: 10 }}
  4588. value={this.state.company}
  4589. onChange={(e) => {
  4590. this.setState({ company: e });
  4591. }}
  4592. >
  4593. {departmentArr.map(function (item) {
  4594. return (
  4595. <Select.Option key={item.id}>{item.name}</Select.Option>
  4596. );
  4597. })}
  4598. </Select>
  4599. </FormItem>
  4600. <FormItem className="half-item" {...formItemLayout} label="级别">
  4601. <Select
  4602. placeholder="请选择所属级别"
  4603. style={{ width: 200 }}
  4604. onChange={(e) => {
  4605. this.setState({ lvl: e });
  4606. }}
  4607. value={this.state.lvl}
  4608. >
  4609. <Option value="0">员工</Option>
  4610. <Option value="1">主管</Option>
  4611. <Option value="2">经理</Option>
  4612. <Option value="3">总经理</Option>
  4613. <Option value="4">副总裁</Option>
  4614. <Option value="5">副总</Option>
  4615. <Option value="6">总监</Option>
  4616. <Option value="7">董事长</Option>
  4617. </Select>
  4618. </FormItem>
  4619. </div>
  4620. <div className="clearfix">
  4621. <FormItem className="half-item" {...formItemLayout} label="职位">
  4622. <Select
  4623. placeholder="选择职位"
  4624. style={{ width: 200, marginRight: 10 }}
  4625. value={this.state.jobs}
  4626. onChange={(e) => {
  4627. this.setState({ jobs: e, star: [] });
  4628. this.getList();
  4629. }}
  4630. >
  4631. <Option value="1">员工</Option>
  4632. <Option value="2">试用营销员</Option>
  4633. <Option value="3">试用营销储备经理</Option>
  4634. <Option value="4">营销经理</Option>
  4635. <Option value="5">总监合伙人</Option>
  4636. <Option value="6">技术助理</Option>
  4637. <Option value="7">咨询师</Option>
  4638. <Option value="8">咨询师主管</Option>
  4639. <Option value="9">咨询师经理</Option>
  4640. <Option value="10">高级经理</Option>
  4641. </Select>
  4642. </FormItem>
  4643. <FormItem className="half-item" {...formItemLayout} label="星级">
  4644. <Select
  4645. placeholder="请选择所属星级"
  4646. style={{ width: 200 }}
  4647. onChange={(e) => {
  4648. this.setState({ star: e });
  4649. }}
  4650. value={this.state.star}
  4651. >
  4652. {this.state.starArr
  4653. ? this.state.starArr.map((item, index) => {
  4654. return (
  4655. <Option value={item.star}>{item.starName}</Option>
  4656. );
  4657. })
  4658. : []}
  4659. </Select>
  4660. </FormItem>
  4661. </div>
  4662. <div className="clearfix">
  4663. <FormItem
  4664. className="half-item"
  4665. labelCol={{ span: 6 }}
  4666. wrapperCol={{ span: 30 }}
  4667. label="岗位津贴"
  4668. >
  4669. <Input
  4670. placeholder="输入金额"
  4671. style={{ width: 200 }}
  4672. value={this.state.allowance}
  4673. onChange={(e) => {
  4674. this.setState({
  4675. allowance: e.target.value,
  4676. });
  4677. }}
  4678. />
  4679. </FormItem>
  4680. </div>
  4681. <Button
  4682. type="primary"
  4683. shape="round"
  4684. size="large"
  4685. style={{
  4686. position: "relative",
  4687. left: "50%",
  4688. transform: "translateX(-50%)",
  4689. }}
  4690. onClick={this.editStay}
  4691. >
  4692. 保存
  4693. </Button>
  4694. </Spin>
  4695. </Modal>
  4696. <Modal
  4697. maskClosable={false}
  4698. visible={this.state.phoneVisible}
  4699. footer={null}
  4700. width={800}
  4701. onCancel={() => {
  4702. this.loadData();
  4703. this.phoneCancel();
  4704. }}
  4705. >
  4706. <Spin spinning={this.state.loading}>
  4707. <h3
  4708. style={{
  4709. textAlign: "center",
  4710. paddingBottom: 10,
  4711. marginBottom: 10,
  4712. }}
  4713. >
  4714. 联系信息
  4715. </h3>
  4716. <div className="clearfix">
  4717. <FormItem
  4718. className="half-item"
  4719. labelCol={{ span: 6 }}
  4720. wrapperCol={{ span: 30 }}
  4721. label="手机号码"
  4722. >
  4723. <Input
  4724. placeholder="输入号码"
  4725. style={{ width: 200 }}
  4726. value={this.state.mobile}
  4727. onChange={(e) => {
  4728. this.setState({
  4729. mobile: e.target.value,
  4730. });
  4731. }}
  4732. />
  4733. </FormItem>
  4734. <FormItem
  4735. className="half-item"
  4736. labelCol={{ span: 6 }}
  4737. wrapperCol={{ span: 30 }}
  4738. label="办公室电话"
  4739. >
  4740. <Input
  4741. placeholder="输入电话"
  4742. style={{ width: 200 }}
  4743. value={this.state.fixedTel}
  4744. onChange={(e) => {
  4745. this.setState({
  4746. fixedTel: e.target.value,
  4747. });
  4748. }}
  4749. />
  4750. </FormItem>
  4751. </div>
  4752. <div className="clearfix">
  4753. <FormItem
  4754. className="half-item"
  4755. labelCol={{ span: 6 }}
  4756. wrapperCol={{ span: 30 }}
  4757. label="紧急联系人1"
  4758. >
  4759. <Input
  4760. placeholder="请输入名字"
  4761. style={{ width: 200 }}
  4762. value={
  4763. this.state.contactList.length
  4764. ? this.state.contactList[0].emergencyContact
  4765. : ""
  4766. }
  4767. onChange={(e) => {
  4768. this.state.contactList[0].emergencyContact = e.target.value;
  4769. let obj = this.state.contactList;
  4770. this.setState({
  4771. contactList: obj,
  4772. });
  4773. }}
  4774. />
  4775. </FormItem>
  4776. <FormItem
  4777. className="half-item"
  4778. labelCol={{ span: 6 }}
  4779. wrapperCol={{ span: 30 }}
  4780. label="紧急联系人电话"
  4781. >
  4782. <Input
  4783. placeholder="请输入电话"
  4784. style={{ width: 200 }}
  4785. value={
  4786. this.state.contactList.length
  4787. ? this.state.contactList[0].emergencyMobile
  4788. : ""
  4789. }
  4790. onChange={(e) => {
  4791. this.state.contactList[0].emergencyMobile = e.target.value;
  4792. let obj = this.state.contactList;
  4793. this.setState({
  4794. contactList: obj,
  4795. });
  4796. }}
  4797. />
  4798. </FormItem>
  4799. </div>
  4800. <div className="clearfix">
  4801. <FormItem
  4802. className="half-item"
  4803. labelCol={{ span: 6 }}
  4804. wrapperCol={{ span: 30 }}
  4805. label="紧急联系人2"
  4806. >
  4807. <Input
  4808. placeholder="请输入名字"
  4809. style={{ width: 200 }}
  4810. value={
  4811. this.state.contactList.length
  4812. ? this.state.contactList[1].emergencyContact
  4813. : ""
  4814. }
  4815. onChange={(e) => {
  4816. this.state.contactList[1].emergencyContact = e.target.value;
  4817. let obj = this.state.contactList;
  4818. this.setState({
  4819. contactList: obj,
  4820. });
  4821. }}
  4822. />
  4823. </FormItem>
  4824. <FormItem
  4825. className="half-item"
  4826. labelCol={{ span: 6 }}
  4827. wrapperCol={{ span: 30 }}
  4828. label="紧急联系人电话"
  4829. >
  4830. <Input
  4831. placeholder="请输入电话"
  4832. style={{ width: 200 }}
  4833. value={
  4834. this.state.contactList.length
  4835. ? this.state.contactList[1].emergencyMobile
  4836. : ""
  4837. }
  4838. onChange={(e) => {
  4839. this.state.contactList[1].emergencyMobile = e.target.value;
  4840. let obj = this.state.contactList;
  4841. this.setState({
  4842. contactList: obj,
  4843. });
  4844. }}
  4845. />
  4846. </FormItem>
  4847. </div>
  4848. <div className="clearfix">
  4849. <FormItem
  4850. className="half-item"
  4851. labelCol={{ span: 6 }}
  4852. wrapperCol={{ span: 30 }}
  4853. label="紧急联系人3"
  4854. >
  4855. <Input
  4856. placeholder="请输入名字"
  4857. style={{ width: 200 }}
  4858. value={
  4859. this.state.contactList.length
  4860. ? this.state.contactList[2].emergencyContact
  4861. : ""
  4862. }
  4863. onChange={(e) => {
  4864. this.state.contactList[2].emergencyContact = e.target.value;
  4865. let obj = this.state.contactList;
  4866. this.setState({
  4867. contactList: obj,
  4868. });
  4869. }}
  4870. />
  4871. </FormItem>
  4872. <FormItem
  4873. className="half-item"
  4874. labelCol={{ span: 6 }}
  4875. wrapperCol={{ span: 30 }}
  4876. label="紧急联系人电话"
  4877. >
  4878. <Input
  4879. placeholder="请输入电话"
  4880. style={{ width: 200 }}
  4881. value={
  4882. this.state.contactList.length
  4883. ? this.state.contactList[2].emergencyMobile
  4884. : ""
  4885. }
  4886. onChange={(e) => {
  4887. this.state.contactList[2].emergencyMobile = e.target.value;
  4888. let obj = this.state.contactList;
  4889. this.setState({
  4890. contactList: obj,
  4891. });
  4892. }}
  4893. />
  4894. </FormItem>
  4895. </div>
  4896. <Button
  4897. type="primary"
  4898. shape="round"
  4899. size="large"
  4900. style={{
  4901. position: "relative",
  4902. left: "50%",
  4903. transform: "translateX(-50%)",
  4904. }}
  4905. onClick={this.editPhone}
  4906. >
  4907. 保存
  4908. </Button>
  4909. </Spin>
  4910. </Modal>
  4911. <Modal
  4912. visible={this.state.entryVisible}
  4913. footer={null}
  4914. width={800}
  4915. onCancel={() => {
  4916. this.loadData();
  4917. this.entryCancel();
  4918. }}
  4919. >
  4920. <Spin spinning={this.state.loading}>
  4921. <h3
  4922. style={{
  4923. textAlign: "center",
  4924. paddingBottom: 10,
  4925. marginBottom: 10,
  4926. }}
  4927. >
  4928. 入职信息
  4929. </h3>
  4930. <div className="clearfix">
  4931. <FormItem
  4932. className="half-item"
  4933. labelCol={{ span: 6 }}
  4934. wrapperCol={{ span: 30 }}
  4935. label="毕业学校"
  4936. >
  4937. <Input
  4938. placeholder="输入学校名称"
  4939. style={{ width: 200 }}
  4940. value={this.state.school}
  4941. onChange={(e) => {
  4942. this.setState({
  4943. school: e.target.value,
  4944. });
  4945. }}
  4946. />
  4947. </FormItem>
  4948. <FormItem
  4949. className="half-item"
  4950. labelCol={{ span: 6 }}
  4951. wrapperCol={{ span: 30 }}
  4952. label="学历"
  4953. >
  4954. <Select
  4955. placeholder="请选择学历"
  4956. style={{ width: 200 }}
  4957. onChange={(e) => {
  4958. this.setState({ education: e });
  4959. }}
  4960. value={this.state.education}
  4961. >
  4962. <Option value="0">高中/中专</Option>
  4963. <Option value="1">专科/高职</Option>
  4964. <Option value="2">本科</Option>
  4965. <Option value="3">研究生</Option>
  4966. <Option value="5">博士</Option>
  4967. </Select>
  4968. </FormItem>
  4969. </div>
  4970. <div className="clearfix">
  4971. <FormItem
  4972. className="half-item"
  4973. labelCol={{ span: 6 }}
  4974. wrapperCol={{ span: 30 }}
  4975. label="所学专业"
  4976. >
  4977. <Input
  4978. placeholder="请输入专业名称"
  4979. style={{ width: 200 }}
  4980. value={this.state.major}
  4981. onChange={(e) => {
  4982. this.setState({
  4983. major: e.target.value,
  4984. });
  4985. }}
  4986. />
  4987. </FormItem>
  4988. <FormItem
  4989. className="half-item"
  4990. labelCol={{ span: 6 }}
  4991. wrapperCol={{ span: 30 }}
  4992. label="职称"
  4993. >
  4994. <Input
  4995. placeholder="请输入职称"
  4996. style={{ width: 200 }}
  4997. value={this.state.title}
  4998. onChange={(e) => {
  4999. this.setState({
  5000. title: e.target.value,
  5001. });
  5002. }}
  5003. />
  5004. </FormItem>
  5005. </div>
  5006. <div className="clearfix">
  5007. <FormItem
  5008. className="half-item"
  5009. labelCol={{ span: 6 }}
  5010. wrapperCol={{ span: 30 }}
  5011. label="备注"
  5012. >
  5013. <Input
  5014. placeholder="请输入备注"
  5015. style={{ width: 200 }}
  5016. value={this.state.entryRemarks}
  5017. onChange={(e) => {
  5018. this.setState({
  5019. entryRemarks: e.target.value,
  5020. });
  5021. }}
  5022. />
  5023. </FormItem>
  5024. </div>
  5025. <div
  5026. className="clearfix"
  5027. style={{ paddingLeft: 70, marginBottom: 10 }}
  5028. >
  5029. <div style={{ marginBottom: 10 }}>附件:</div>
  5030. <PicModal
  5031. remarks={this.picToArr(this.state.annexName)}
  5032. picUrl={this.picToArr(this.state.annexUrl)}
  5033. remove={this.ruzhiRemove}
  5034. />
  5035. <Button onClick={this.addPic}>添加附件</Button>
  5036. </div>
  5037. <Button
  5038. type="primary"
  5039. shape="round"
  5040. size="large"
  5041. style={{
  5042. position: "relative",
  5043. left: "50%",
  5044. transform: "translateX(-50%)",
  5045. }}
  5046. onClick={this.editRuzi}
  5047. >
  5048. 保存
  5049. </Button>
  5050. <AddPicModal
  5051. cancel={this.addPicModalCancel}
  5052. add={this.add()}
  5053. visible={this.state.addPicModal}
  5054. />
  5055. </Spin>
  5056. </Modal>
  5057. <Modal
  5058. visible={this.state.upgradeVisible}
  5059. footer={null}
  5060. width={800}
  5061. onCancel={() => {
  5062. this.loadData();
  5063. this.upgradeCancel();
  5064. }}
  5065. >
  5066. <Spin spinning={this.state.loading}>
  5067. <h3
  5068. style={{
  5069. textAlign: "center",
  5070. paddingBottom: 10,
  5071. marginBottom: 10,
  5072. }}
  5073. >
  5074. 晋升信息
  5075. </h3>
  5076. <div>
  5077. <div className="clearfix">
  5078. <FormItem
  5079. className="half-item"
  5080. labelCol={{ span: 6 }}
  5081. wrapperCol={{ span: 30 }}
  5082. label="当前职位"
  5083. >
  5084. <Select
  5085. placeholder="选择职位"
  5086. style={{ width: 200, marginRight: 10 }}
  5087. value={this.state.promotionList.oldJobs}
  5088. onChange={(e) => {
  5089. this.setState({ jobs: e, star: [] });
  5090. this.getList();
  5091. this.state.promotionList.oldJobs = e;
  5092. this.state.promotionList.oldLvl = [];
  5093. this.setState({
  5094. promotionList: this.state.promotionList,
  5095. });
  5096. }}
  5097. >
  5098. <Option value="1">员工</Option>
  5099. <Option value="2">试用营销员</Option>
  5100. <Option value="3">试用营销储备经理</Option>
  5101. <Option value="4">营销经理</Option>
  5102. <Option value="5">总监合伙人</Option>
  5103. <Option value="6">技术助理</Option>
  5104. <Option value="7">咨询师</Option>
  5105. <Option value="8">咨询师主管</Option>
  5106. <Option value="9">咨询师经理</Option>
  5107. <Option value="10">高级经理</Option>
  5108. </Select>
  5109. </FormItem>
  5110. <FormItem
  5111. className="half-item"
  5112. labelCol={{ span: 6 }}
  5113. wrapperCol={{ span: 30 }}
  5114. label="当前星级"
  5115. >
  5116. <Select
  5117. placeholder="请选择所属星级"
  5118. style={{ width: 200 }}
  5119. onChange={(e) => {
  5120. this.state.promotionList.oldLvl = e;
  5121. this.setState({
  5122. promotionList: this.state.promotionList,
  5123. });
  5124. }}
  5125. value={this.state.promotionList.oldLvl}
  5126. >
  5127. {this.state.starArr.map((item, index) => {
  5128. return <Option value={item.star}>{item.starName}</Option>;
  5129. })}
  5130. </Select>
  5131. </FormItem>
  5132. </div>
  5133. <div className="clearfix">
  5134. <FormItem
  5135. className="half-item"
  5136. labelCol={{ span: 6 }}
  5137. wrapperCol={{ span: 30 }}
  5138. label="晋升后职位"
  5139. >
  5140. <Select
  5141. placeholder="选择职位"
  5142. style={{ width: 200, marginRight: 10 }}
  5143. value={this.state.promotionList.newJobs}
  5144. onChange={(e) => {
  5145. this.setState({ jobss: e });
  5146. this.getLists();
  5147. this.state.promotionList.newJobs = e;
  5148. this.state.promotionList.newLvl = [];
  5149. this.setState({
  5150. promotionList: this.state.promotionList,
  5151. });
  5152. }}
  5153. >
  5154. <Option value="1">员工</Option>
  5155. <Option value="2">试用营销员</Option>
  5156. <Option value="3">试用营销储备经理</Option>
  5157. <Option value="4">营销经理</Option>
  5158. <Option value="5">总监合伙人</Option>
  5159. <Option value="6">技术助理</Option>
  5160. <Option value="7">咨询师</Option>
  5161. <Option value="8">咨询师主管</Option>
  5162. <Option value="9">咨询师经理</Option>
  5163. <Option value="10">高级经理</Option>
  5164. </Select>
  5165. </FormItem>
  5166. <FormItem
  5167. className="half-item"
  5168. labelCol={{ span: 6 }}
  5169. wrapperCol={{ span: 30 }}
  5170. label="晋升后星级"
  5171. >
  5172. <Select
  5173. placeholder="请选择所属星级"
  5174. style={{ width: 200 }}
  5175. onChange={(e) => {
  5176. this.state.promotionList.newLvl = e;
  5177. this.setState({
  5178. promotionList: this.state.promotionList,
  5179. });
  5180. }}
  5181. value={this.state.promotionList.newLvl}
  5182. >
  5183. {this.state.starArrs.map((item, index) => {
  5184. return <Option value={item.star}>{item.starName}</Option>;
  5185. })}
  5186. </Select>
  5187. </FormItem>
  5188. </div>
  5189. <div className="clearfix">
  5190. <FormItem
  5191. className="half-item"
  5192. labelCol={{ span: 6 }}
  5193. wrapperCol={{ span: 30 }}
  5194. label="晋升时间"
  5195. >
  5196. <DatePicker
  5197. value={
  5198. this.state.promotionList.promotionTimes
  5199. ? moment(this.state.promotionList.promotionTimes)
  5200. : null
  5201. }
  5202. style={{ width: 200 }}
  5203. onChange={(e, t) => {
  5204. this.state.promotionList.promotionTimes = t;
  5205. this.setState({
  5206. promotionList: this.state.promotionList,
  5207. });
  5208. }}
  5209. />
  5210. </FormItem>
  5211. </div>
  5212. <div className="clearfix">
  5213. <FormItem
  5214. className="half-item"
  5215. labelCol={{ span: 6 }}
  5216. wrapperCol={{ span: 30 }}
  5217. label="备注"
  5218. >
  5219. <Input
  5220. placeholder="请输入备注"
  5221. style={{ width: 200 }}
  5222. value={this.state.promotionList.promotionRemarks}
  5223. onChange={(e) => {
  5224. this.state.promotionList.promotionRemarks =
  5225. e.target.value;
  5226. this.setState({
  5227. promotionList: this.state.promotionList,
  5228. });
  5229. }}
  5230. />
  5231. </FormItem>
  5232. </div>
  5233. <div
  5234. className="clearfix"
  5235. style={{ paddingLeft: 70, marginBottom: 10 }}
  5236. >
  5237. <div style={{ marginBottom: 10 }}>附件:</div>
  5238. <PicModal
  5239. remarks={this.picToArr(this.state.promotionList.annexName)}
  5240. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  5241. remove={this.jinshengRemove}
  5242. />
  5243. <Button onClick={this.addPic}>添加附件</Button>
  5244. </div>
  5245. </div>
  5246. <Button
  5247. type="primary"
  5248. shape="round"
  5249. size="large"
  5250. style={{
  5251. position: "relative",
  5252. left: "50%",
  5253. transform: "translateX(-50%)",
  5254. }}
  5255. onClick={this.editUpgrade}
  5256. >
  5257. 保存
  5258. </Button>
  5259. <AddPicModal
  5260. cancel={this.addPicModalCancel}
  5261. add={this.add()}
  5262. visible={this.state.addPicModal}
  5263. />
  5264. </Spin>
  5265. </Modal>
  5266. <Modal
  5267. visible={this.state.contractVisible}
  5268. footer={null}
  5269. width={800}
  5270. onCancel={() => {
  5271. this.loadData();
  5272. this.contractCancel();
  5273. }}
  5274. >
  5275. <Spin spinning={this.state.loading}>
  5276. <h3
  5277. style={{
  5278. textAlign: "center",
  5279. paddingBottom: 10,
  5280. marginBottom: 10,
  5281. }}
  5282. >
  5283. 合同信息
  5284. </h3>
  5285. <div>
  5286. <div className="clearfix">
  5287. <FormItem
  5288. className="half-item"
  5289. labelCol={{ span: 6 }}
  5290. wrapperCol={{ span: 30 }}
  5291. label="签订时间"
  5292. >
  5293. <DatePicker
  5294. value={
  5295. this.state.contractList.startTimes
  5296. ? moment(this.state.contractList.startTimes)
  5297. : null
  5298. }
  5299. style={{ width: 200 }}
  5300. onChange={(e, t) => {
  5301. this.state.contractList.startTimes = t;
  5302. this.setState({
  5303. contractList: this.state.contractList,
  5304. });
  5305. }}
  5306. />
  5307. </FormItem>
  5308. <FormItem
  5309. className="half-item"
  5310. labelCol={{ span: 6 }}
  5311. wrapperCol={{ span: 30 }}
  5312. label="到期时间"
  5313. >
  5314. <DatePicker
  5315. disabledDate={(e) => {
  5316. let time = moment(e).valueOf();
  5317. let today = moment(
  5318. this.state.contractList.startTimes
  5319. ).valueOf();
  5320. if (time <= today) {
  5321. return true;
  5322. } else if (!this.state.contractList.startTimes) {
  5323. return true;
  5324. }
  5325. }}
  5326. value={
  5327. this.state.contractList.endTimes
  5328. ? moment(this.state.contractList.endTimes)
  5329. : null
  5330. }
  5331. style={{ width: 200 }}
  5332. onChange={(e, t) => {
  5333. this.state.contractList.endTimes = t;
  5334. this.setState({
  5335. contractList: this.state.contractList,
  5336. });
  5337. }}
  5338. />
  5339. </FormItem>
  5340. </div>
  5341. <div className="clearfix">
  5342. <FormItem
  5343. className="half-item"
  5344. labelCol={{ span: 6 }}
  5345. wrapperCol={{ span: 30 }}
  5346. label="备注"
  5347. >
  5348. <Input
  5349. placeholder="请输入备注"
  5350. style={{ width: 200 }}
  5351. value={this.state.contractList.contractRemarks}
  5352. onChange={(e) => {
  5353. this.state.contractList.contractRemarks = e.target.value;
  5354. this.setState({
  5355. contractList: this.state.contractList,
  5356. });
  5357. }}
  5358. />
  5359. </FormItem>
  5360. </div>
  5361. <div
  5362. className="clearfix"
  5363. style={{ paddingLeft: 70, marginBottom: 10 }}
  5364. >
  5365. <div style={{ marginBottom: 10 }}>附件:</div>
  5366. <PicModal
  5367. remarks={this.picToArr(this.state.contractList.annexName)}
  5368. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  5369. remove={this.contractRemove}
  5370. />
  5371. <Button onClick={this.addPic}>添加附件</Button>
  5372. </div>
  5373. </div>
  5374. <Button
  5375. type="primary"
  5376. shape="round"
  5377. size="large"
  5378. style={{
  5379. position: "relative",
  5380. left: "50%",
  5381. transform: "translateX(-50%)",
  5382. }}
  5383. onClick={this.editContract}
  5384. >
  5385. 保存
  5386. </Button>
  5387. <AddPicModal
  5388. cancel={this.addPicModalCancel}
  5389. add={this.add()}
  5390. visible={this.state.addPicModal}
  5391. />
  5392. </Spin>
  5393. </Modal>
  5394. <Modal
  5395. visible={this.state.chooseVisible}
  5396. footer={null}
  5397. width={800}
  5398. onCancel={() => {
  5399. this.loadData();
  5400. this.chooseCancel();
  5401. }}
  5402. >
  5403. <Spin spinning={this.state.loading}>
  5404. <h3
  5405. style={{
  5406. textAlign: "center",
  5407. paddingBottom: 10,
  5408. marginBottom: 10,
  5409. }}
  5410. >
  5411. 奖惩信息
  5412. </h3>
  5413. <div>
  5414. <div className="clearfix">
  5415. <FormItem
  5416. className="half-item"
  5417. labelCol={{ span: 6 }}
  5418. wrapperCol={{ span: 30 }}
  5419. label="类型"
  5420. >
  5421. <Radio.Group
  5422. onChange={(e) => {
  5423. this.state.chooseList.chooseStatus = e.target.value;
  5424. this.setState({ chooseList: this.state.chooseList });
  5425. }}
  5426. value={this.state.chooseList.chooseStatus}
  5427. >
  5428. <Radio value={0}>奖励</Radio>
  5429. <Radio value={1}>罚款</Radio>
  5430. </Radio.Group>
  5431. </FormItem>
  5432. <FormItem
  5433. className="half-item"
  5434. labelCol={{ span: 6 }}
  5435. wrapperCol={{ span: 30 }}
  5436. label="时间"
  5437. >
  5438. <DatePicker
  5439. value={
  5440. this.state.chooseList.effectTimes
  5441. ? moment(this.state.chooseList.effectTimes)
  5442. : null
  5443. }
  5444. style={{ width: 200 }}
  5445. onChange={(e, t) => {
  5446. this.state.chooseList.effectTimes = t;
  5447. this.setState({
  5448. chooseList: this.state.chooseList,
  5449. });
  5450. }}
  5451. />
  5452. </FormItem>
  5453. </div>
  5454. <div className="clearfix">
  5455. <FormItem
  5456. className="half-item"
  5457. labelCol={{ span: 6 }}
  5458. wrapperCol={{ span: 30 }}
  5459. label="内容"
  5460. >
  5461. <Input
  5462. placeholder="请输入内容"
  5463. style={{ width: 200 }}
  5464. value={this.state.chooseList.chooseRemarks}
  5465. onChange={(e) => {
  5466. this.state.chooseList.chooseRemarks = e.target.value;
  5467. this.setState({
  5468. chooseList: this.state.chooseList,
  5469. });
  5470. }}
  5471. />
  5472. </FormItem>
  5473. </div>
  5474. <div
  5475. className="clearfix"
  5476. style={{ paddingLeft: 70, marginBottom: 10 }}
  5477. >
  5478. <div style={{ marginBottom: 10 }}>附件:</div>
  5479. <PicModal
  5480. remarks={this.picToArr(this.state.chooseList.annexName)}
  5481. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  5482. remove={this.chooseRemove}
  5483. />
  5484. <Button onClick={this.addPic}>添加附件</Button>
  5485. </div>
  5486. </div>
  5487. <Button
  5488. type="primary"
  5489. shape="round"
  5490. size="large"
  5491. style={{
  5492. position: "relative",
  5493. left: "50%",
  5494. transform: "translateX(-50%)",
  5495. }}
  5496. onClick={this.editChoose}
  5497. >
  5498. 保存
  5499. </Button>
  5500. <AddPicModal
  5501. cancel={this.addPicModalCancel}
  5502. add={this.add()}
  5503. visible={this.state.addPicModal}
  5504. />
  5505. </Spin>
  5506. </Modal>
  5507. <Modal
  5508. visible={this.state.quitVisible}
  5509. footer={null}
  5510. width={800}
  5511. onCancel={() => {
  5512. this.loadData();
  5513. this.quitCancel();
  5514. }}
  5515. >
  5516. <Spin spinning={this.state.loading}>
  5517. <h3
  5518. style={{
  5519. textAlign: "center",
  5520. paddingBottom: 10,
  5521. marginBottom: 10,
  5522. }}
  5523. >
  5524. 离职信息
  5525. </h3>
  5526. <div>
  5527. <div className="clearfix">
  5528. <FormItem
  5529. className="half-item"
  5530. labelCol={{ span: 6 }}
  5531. wrapperCol={{ span: 30 }}
  5532. label="离职时间"
  5533. >
  5534. <DatePicker
  5535. value={
  5536. this.state.quitList.effectTimes
  5537. ? moment(this.state.quitList.effectTimes)
  5538. : null
  5539. }
  5540. style={{ width: 200 }}
  5541. onChange={(e, t) => {
  5542. this.state.quitList.effectTimes = t;
  5543. this.setState({
  5544. quitList: this.state.quitList,
  5545. });
  5546. }}
  5547. />
  5548. </FormItem>
  5549. </div>
  5550. <div className="clearfix">
  5551. <FormItem
  5552. className="half-item"
  5553. labelCol={{ span: 6 }}
  5554. wrapperCol={{ span: 30 }}
  5555. label="备注"
  5556. >
  5557. <Input
  5558. placeholder="请输入备注"
  5559. style={{ width: 200 }}
  5560. value={this.state.quitList.quitRemarks}
  5561. onChange={(e) => {
  5562. this.state.quitList.quitRemarks = e.target.value;
  5563. this.setState({
  5564. quitList: this.state.quitList,
  5565. });
  5566. }}
  5567. />
  5568. </FormItem>
  5569. </div>
  5570. <div
  5571. className="clearfix"
  5572. style={{ paddingLeft: 70, marginBottom: 10 }}
  5573. >
  5574. <div style={{ marginBottom: 10 }}>附件:</div>
  5575. <PicModal
  5576. remarks={this.picToArr(this.state.quitList.annexName)}
  5577. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  5578. remove={this.quitRemove}
  5579. />
  5580. <Button onClick={this.addPic}>添加附件</Button>
  5581. </div>
  5582. </div>
  5583. <Button
  5584. type="primary"
  5585. shape="round"
  5586. size="large"
  5587. style={{
  5588. position: "relative",
  5589. left: "50%",
  5590. transform: "translateX(-50%)",
  5591. }}
  5592. onClick={this.editQuit}
  5593. >
  5594. 保存
  5595. </Button>
  5596. <AddPicModal
  5597. cancel={this.addPicModalCancel}
  5598. add={this.add()}
  5599. visible={this.state.addPicModal}
  5600. />
  5601. </Spin>
  5602. </Modal>
  5603. <Modal
  5604. visible={this.state.welfareVisible}
  5605. footer={null}
  5606. width={800}
  5607. onCancel={() => {
  5608. this.loadData();
  5609. this.welfareCancel();
  5610. }}
  5611. >
  5612. <Spin spinning={this.state.loading}>
  5613. <h3
  5614. style={{
  5615. textAlign: "center",
  5616. paddingBottom: 10,
  5617. }}
  5618. >
  5619. 福利信息
  5620. </h3>
  5621. <Button
  5622. type="primary"
  5623. style={{ marginBottom: 5 }}
  5624. onClick={(e) => {
  5625. this.welfareTable();
  5626. }}
  5627. >
  5628. 新建信息
  5629. </Button>
  5630. <div>
  5631. <div className="clearfix" style={{ marginBottom: 10 }}>
  5632. <Table
  5633. columns={this.state.welfareColumnsEdit}
  5634. type="textarea"
  5635. dataSource={this.state.ModalData.welfareList}
  5636. pagination={false}
  5637. bordered
  5638. size="small"
  5639. scroll={{ x: "max-content", y: 0 }}
  5640. />
  5641. </div>
  5642. <div className="clearfix">
  5643. <FormItem
  5644. className="half-item"
  5645. labelCol={{ span: 6 }}
  5646. wrapperCol={{ span: 30 }}
  5647. label="备注"
  5648. >
  5649. <Input
  5650. placeholder="请输入备注"
  5651. style={{ width: 200 }}
  5652. value={this.state.ModalData.welfareRemarks}
  5653. onChange={(e) => {
  5654. this.state.ModalData.welfareRemarks = e.target.value;
  5655. this.setState({
  5656. ModalData: this.state.ModalData,
  5657. });
  5658. }}
  5659. />
  5660. </FormItem>
  5661. </div>
  5662. <div
  5663. className="clearfix"
  5664. style={{ paddingLeft: 70, marginBottom: 10 }}
  5665. >
  5666. <div style={{ marginBottom: 10 }}>附件:</div>
  5667. <PicModal
  5668. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  5669. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  5670. remove={this.welfareRemove}
  5671. />
  5672. <Button onClick={this.addPic}>添加附件</Button>
  5673. </div>
  5674. </div>
  5675. <Button
  5676. type="primary"
  5677. shape="round"
  5678. size="large"
  5679. style={{
  5680. position: "relative",
  5681. left: "50%",
  5682. transform: "translateX(-50%)",
  5683. }}
  5684. onClick={this.editWelfare}
  5685. >
  5686. 保存
  5687. </Button>
  5688. <AddPicModal
  5689. cancel={this.addPicModalCancel}
  5690. add={this.add()}
  5691. visible={this.state.addPicModal}
  5692. />
  5693. </Spin>
  5694. </Modal>
  5695. <Modal
  5696. visible={this.state.editWelfareVisible}
  5697. footer={null}
  5698. width={800}
  5699. onCancel={() => {
  5700. this.setState({
  5701. editWelfareVisible: false,
  5702. });
  5703. }}
  5704. >
  5705. <Spin spinning={this.state.loading}>
  5706. <div>
  5707. <div className="clearfix">
  5708. <FormItem
  5709. className="half-item"
  5710. labelCol={{ span: 6 }}
  5711. wrapperCol={{ span: 30 }}
  5712. label="福利类型"
  5713. >
  5714. <Select
  5715. placeholder="请选择类型"
  5716. value={this.state.editWelfareData.type}
  5717. onChange={(e) => {
  5718. this.state.editWelfareData.type = e;
  5719. this.setState({
  5720. editWelfareData: this.state.editWelfareData,
  5721. });
  5722. }}
  5723. style={{ width: 120, marginRight: 10 }}
  5724. >
  5725. <Option value={0}>社保</Option>
  5726. <Option value={1}>公积金</Option>
  5727. <Option value={2}>雇主险</Option>
  5728. </Select>
  5729. </FormItem>
  5730. <FormItem
  5731. className="half-item"
  5732. labelCol={{ span: 6 }}
  5733. wrapperCol={{ span: 30 }}
  5734. label="福利状态"
  5735. >
  5736. <Select
  5737. placeholder="请选择状态"
  5738. onChange={(e) => {
  5739. this.state.editWelfareData.status = e;
  5740. this.setState({
  5741. editWelfareData: this.state.editWelfareData,
  5742. });
  5743. }}
  5744. style={{ width: 120, marginRight: 10 }}
  5745. value={this.state.editWelfareData.status}
  5746. >
  5747. <Option value={0}>未购买</Option>
  5748. <Option value={1}>已购买</Option>
  5749. <Option value={2}>已停止</Option>
  5750. </Select>
  5751. </FormItem>
  5752. </div>
  5753. <div className="clearfix">
  5754. <FormItem
  5755. className="half-item"
  5756. labelCol={{ span: 6 }}
  5757. wrapperCol={{ span: 30 }}
  5758. style={{
  5759. display:
  5760. this.state.editWelfareData.status == 1 ? "block" : "none",
  5761. }}
  5762. label="购买时间"
  5763. >
  5764. <DatePicker
  5765. value={
  5766. this.state.editWelfareData.startTimes
  5767. ? moment(this.state.editWelfareData.startTimes)
  5768. : null
  5769. }
  5770. style={{ width: 200 }}
  5771. onChange={(e, t) => {
  5772. this.state.editWelfareData.startTimes = t;
  5773. this.setState({
  5774. editWelfareData: this.state.editWelfareData,
  5775. });
  5776. }}
  5777. />
  5778. </FormItem>
  5779. <FormItem
  5780. className="half-item"
  5781. labelCol={{ span: 6 }}
  5782. wrapperCol={{ span: 30 }}
  5783. style={{
  5784. display:
  5785. this.state.editWelfareData.status == 2 ? "block" : "none",
  5786. }}
  5787. label="停缴时间"
  5788. >
  5789. <DatePicker
  5790. value={
  5791. this.state.editWelfareData.endTimes
  5792. ? moment(this.state.editWelfareData.endTimes)
  5793. : null
  5794. }
  5795. style={{ width: 200 }}
  5796. onChange={(e, t) => {
  5797. this.state.editWelfareData.endTimes = t;
  5798. this.setState({
  5799. editWelfareData: this.state.editWelfareData,
  5800. });
  5801. }}
  5802. />
  5803. </FormItem>
  5804. </div>
  5805. <div className="clearfix">
  5806. <FormItem
  5807. className="half-item"
  5808. labelCol={{ span: 6 }}
  5809. wrapperCol={{ span: 30 }}
  5810. style={{
  5811. display:
  5812. this.state.editWelfareData.status == 1 ? "block" : "none",
  5813. }}
  5814. label="参保公司"
  5815. >
  5816. <Select
  5817. placeholder="选择公司"
  5818. style={{ width: 200, marginRight: 10 }}
  5819. value={
  5820. this.state.editWelfareData.depId
  5821. ? this.state.editWelfareData.depId
  5822. : undefined
  5823. }
  5824. onChange={(e) => {
  5825. this.state.editWelfareData.depId = e;
  5826. this.setState({
  5827. editWelfareData: this.state.editWelfareData,
  5828. });
  5829. }}
  5830. >
  5831. {departmentArr.map(function (item) {
  5832. return (
  5833. <Select.Option key={item.id}>{item.name}</Select.Option>
  5834. );
  5835. })}
  5836. </Select>
  5837. </FormItem>
  5838. </div>
  5839. <div className="clearfix">
  5840. <FormItem
  5841. className="half-item"
  5842. labelCol={{ span: 6 }}
  5843. wrapperCol={{ span: 30 }}
  5844. style={{
  5845. display:
  5846. this.state.editWelfareData.status == 0 ? "block" : "none",
  5847. }}
  5848. label="未购买备注"
  5849. >
  5850. <Input
  5851. placeholder="请输入备注信息"
  5852. style={{ width: 200 }}
  5853. value={this.state.editWelfareData.welfareRemarks}
  5854. onChange={(e) => {
  5855. this.state.editWelfareData.welfareRemarks =
  5856. e.target.value;
  5857. this.setState({
  5858. editWelfareData: this.state.editWelfareData,
  5859. });
  5860. }}
  5861. />
  5862. </FormItem>
  5863. </div>
  5864. </div>
  5865. <Button
  5866. type="primary"
  5867. shape="round"
  5868. size="large"
  5869. style={{
  5870. position: "relative",
  5871. left: "50%",
  5872. transform: "translateX(-50%)",
  5873. }}
  5874. onClick={this.editWelfareDataOk}
  5875. >
  5876. 保存
  5877. </Button>
  5878. </Spin>
  5879. </Modal>
  5880. </div>
  5881. );
  5882. },
  5883. });
  5884. export default PersonnelAll;