personnelAll.jsx 190 KB

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