personnelAll.jsx 189 KB

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