personnelAll.jsx 189 KB

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